Giter Site home page Giter Site logo

kendo-themes's Introduction

Kendo UI Themes Monorepo

kendo-themes is a lerna managed monorepo project for all Kendo UI themes that are used across the Kendo UI suites and Telerik UI for Blazor. The themes are built with sass using scss syntax. The syntax is compatible with both node-sass and dart-sass, as we currently do not use the sass module system. Browser-specific properties are generated at build-time through PostCSS autoprefixer.

Setup

  • Make sure you have Node v20 or later.
  • Clone the repo and run npm ci to install dependencies.

Development Server

To run it, execute npm start and navigate to http://localhost:3000/

Building Packages

The following npm commands are available for building the themes:

  • To build all themes run npm run sass.
  • To build all swatches run npm run sass:swatches.

There are additional commands, which can be found in package.json and gulpfile.js.

Directory structure

  • build -- various bash scripts
  • lib -- files which we didn't put elsewhere
  • packages
    • theme-name
      • build -- theme specific files needed for building
      • docs -- per theme documentation
      • lib -- files that are not strictly scss, like swatches in json format
      • scripts -- theme specific javascript files
      • scss -- source of the themes
  • scripts -- various javascript files
  • tests -- visual tests

Development

Inside each theme source directory, there is a per-component directory containing the respective styles.

Note: we mostly have aptly named direcotries, so they match component names. In few cases, however, we chose different names. For example, multicolumncombobox is a mouthful, so its directory is dropdowngrid.

Each component consists of index file that is the entry points for component styles. Inside, we import core files, all dependencies (for example, datepicker needs calendar) and the components layout (metrics) and theme (appearance) files.

Note: We list all dependencies is because we want components to be compiled standalone without the developer needing to know which component depends on which other component. However, recursive importing creates exponentially large dist files, unles handled.

To workaround this limitation, we use a mixin -- import-once -- which takes care to output only once!

During development, the scss files are linted on every commit and built on every push command.

Changes in develop branch release a new package version every monday in the dev channel and in (version)-dev.(integer) format. To install the latest development version of a given theme, run npm install (themename)@dev -- for example, npm install @progress/kendo-theme-default@dev.

Stable channel is released manually trough a github action.

Visual tests

To guard against regressions and make pull request reviews easier, the CI build makes screenshots of the sample pages in packages/html/src/[component]/tests/*.html. This happens automatically for all feature branches. The sample pages contain static HTML that is the recommended rendering for components that use the theme.

To generate screenshots for a specific theme:

  1. Build the theme with npm run sass
  2. Run npm run create-screenshots <theme>, substituting <theme> with a theme name.

These steps will create new screenshots in tests/_output. Note that due to platform differences, all of the files will be marked as changed.

Embedding Resources

To avoid hosting-related issues in projects that use the themes, the resources are embedded by encoding them in the output CSS. For more details, refer to this issue.

To embed the latest resources:

  1. Run the npm run embed-assets task. The task generates a file with the same name which registers a Base64-encoded version in the $data-uris SCSS map. For example, the foo.woff font file will be encoded in a foo.scss file which can later be imported through @import './font/foo';.
  2. Inline the encoded file inside the CSS through map-get( $data-uris, 'foo.woff' ). For example:
$web-font-uri: map-get( $data-uris, 'WebComponentsIcons.woff' );

@font-face {
    font-family: 'WebComponentsIcons';
    src: url( $web-font-uri ) format( "woff" );
}

Documenting Variables

The available variables for customizing each theme are listed in the article on customization for each theme (docs/customization.md) The file is generated from the SCSS source files by running the npm run docs command.

To document a variable, use triple-slash comments (///) before its definition.

/// Variable description
$foo: 42 !default;

To group variables, use the @group directive.

/// Variable description
/// @group random
$foo: 42 !default;

/// Another variable description
/// @group random
$bar: 1024 !default;

To change the layout or the front meter of the generated help topic, change the docs/_templates/customization.md.njk source file.

License

This package is part of the following suites:

All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.

If you do not own a commercial license, the usage of this software shall be governed by the Apache License, Version 2.0.

Copyright © 2021 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.

kendo-themes's People

Contributors

danielkaradachki avatar dependabot[bot] avatar dimitar-pechev avatar elena-gancheva avatar epetrow avatar georgegindev avatar ggkrustev avatar gyoshev avatar inikolova avatar joneff avatar joomfx avatar juveniel avatar kendo-bot avatar kikostadinov avatar kirilnn avatar kspeyanski avatar magdalenaan avatar mishoo avatar nikopenev21 avatar paskalevstoyan avatar petarmetodiev avatar petyosi avatar preslavkozovski avatar silviyaboteva avatar svetq avatar teyaves avatar theorlin avatar tsvetomir avatar veselints avatar zhpenkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kendo-themes's Issues

Themebuilder BorderRadius

Hi,

could you add the option to set the BorderRadius in the Themebuilder, that would be cool.
like:

$border-radius:  0px;   
$border-radius-lg: 0px;
$border-radius-sm: 0px; 

Allow widget selectors to be styled independently of buttons.

Currently the input widget selectors (combobox, date/time pickers, the entire dropdownlist) take the same coloring as secondary buttons.

Can the widget selectors be setup to be styled independently. They can still default to the button colors, but allow a way to change them without changing the buttons.

For example, if the secondary bootstrap color is a dark grey, the entire dropdownlist box is also a dark grey and stands out greatly from the default bootstrap select lists. Or the date picker - the selector stands out a lot - would be nice to tone that down without impacting other styles.

Inconsistent Scheduler event selection in Agenda View

Selected event highlights the date slot in Agenda View, which is unexpected. If there are several events for a date, the date is highlighted only when selecting the first event.
If grouping is applied, the issue is more obvious - Dojo

Reproduction of the problem

  1. Go to Scheduler / Keyboard Navigation in Default 2, Bootstrap 4.
  2. Switch to Agenda View
  3. Select the first event

Current behavior

image

Expected behavior

The date slot is not highlighted, as in all other themes, or when selecting an event other than the first one for a date.

Environment

  • Kendo UI version: 2017.3.1026
  • Browser: [all]

Dropdownlist items not displayed properly in IE when selected/hovered

Reproducible in the following example:

http://plnkr.co/edit/dv5VRXmG77tQprsyXdmh?p=preview

Set the popup width to 'auto' (optional, if no width is set, other issues are observed).

  • An unexpected horizontal scrollbar is rendered.
    Scroll horizontal to the right.
    Select or hover the top (longest) item.

Issues:
When selecting, the long word is cut.
When selecting row, not the whole row gets selected. There is unnecessary space on the right.

Reported in ticket ID: 1122413

Theming: Bootstrap rules not applied

  • Bug report

Current behavior

DropDowns / DateInputs aren't taking the whole width, in my case col-md-6 (50%)

Expected behavior

Controls should fit the defined bootstrap width

Minimal reproduction of the problem with instructions

http://plnkr.co/edit/GeNsU2wJLV8RYqrUFrNa?p=preview

Environment

Package versions:
"progress/kendo-angular-buttons": "1.1.0",
"progress/kendo-angular-dateinputs": "1.2.0",
"progress/kendo-angular-dialog": "1.1.0",
"progress/kendo-angular-dropdowns": "1.2.1",
"progress/kendo-angular-excel-export": "1.0.4",
"progress/kendo-angular-grid": "1.4.2",
"progress/kendo-angular-inputs": "1.3.0",
"progress/kendo-angular-intl": "1.2.2",
"progress/kendo-angular-l10n": "1.0.3",
"progress/kendo-angular-popup": "1.2.1",
"progress/kendo-angular-sortable": "1.0.3",
"progress/kendo-angular-upload": "1.2.1",
"progress/kendo-data-query": "1.0.7",
"progress/kendo-date-math": "1.0.3",
"progress/kendo-drawing": "1.4.0",
"progress/kendo-file-saver": "1.0.4",
"progress/kendo-theme-bootstrap": "2.8.1",
"telerik/kendo-intl": "1.2.1"

Browser:

  • Chrome (desktop) version 61

kendoValidator tooltip background color not applied

I noticed that the kendoValidator tooltips are appearing with a black background in our app now, and it seems to be because the variables below are using a function called "color-level" that no longer exists in Bootstrap (that I can find). I think it may have been renamed to theme-color-level, but that didn't work for me either. In our generated CSS, it actually shows the function name now, like:

.k-tooltip-validation {
    border-color: color-level(#ffc107,9);
    color: color-level(#ffc107,-6);
    background-color: color-level(#ffc107,10)
}

// Notification
$notification-info-bg: color-level($info, 10) !default;
$notification-info-text: color-level($info, -6) !default;
$notification-info-border: color-level($info, 9) !default;
$notification-success-bg: color-level($success, 10) !default;
$notification-success-text: color-level($success, -6) !default;
$notification-success-border: color-level($success, 9) !default;
$notification-warning-bg: color-level($warning, 10) !default;
$notification-warning-text: color-level($warning, -6) !default;
$notification-warning-border: color-level($warning, 9) !default;
$notification-error-bg: color-level($error, 10) !default;
$notification-error-text: color-level($error, -6) !default;
$notification-error-border: color-level($error, 9) !default;

Provide option for default action alignment

Providing a variable that controls whether the primary action is on the left or the right by default allows developers to match the components to the UX guidelines of their application. Adding a variable like $align-primary-action: left | right; and taking it into account in dialogs / pickers will make this easier.

Error Compiling Default Theme SCSS

Based on customer report: In grid layout and extra & causes grunt build to fail.

&.k-grid-no-scrollbar .k-grid-header-wrap {
border-width: 0;
}

Running "sass:build" (sass) task
Error: Base-level rules cannot contain the parent-selector-referencing character '&'.
on line 844 of node_modules/@progress/kendo-theme-default/scss/grid/_layout.scss, in `@content'
from line 12 of node_modules/@progress/kendo-theme-default/scss/mixins/core/_import-once.scss, in `exports'
from line 1 of node_modules/@progress/kendo-theme-default/scss/grid/_layout.scss
from line 12 of node_modules/@progress/kendo-theme-default/scss/grid.scss
from line 13 of public/vendors/kendo-ui/scss/audatacy.scss
Use --trace for backtrace.
Warning: Exited with error code 65� Use --force to continue.

TID: 1151647

Enhance Bootstrap forms integration

Currently "input-group-sm" is not working in conjunction with kendo-theme-bootstrap. It would be nice to enhance our Bootstrap forms integration to include it.

Reported in a support thread - Ticket ID: 1131020

Inputs have different heights when in a bootstrap form. Reported in 1491744, public in the Blazor Feedback Portal in 1491801
Sample project : TelerikBlazorApp1.zip
Issues: The textbox (the second input) is 2px taller than the numeric textbox (the first input). Both of them are several pixels taller than the combo box and date picker. The heights vary between the three themes too.
Goal: unified heights of the inputs in a bootstrap layout.

Displaced Sort buttons inside Spreadsheet sort and filter menu

  • Default - button icon and text are to the left of their expected place. The icons are out of the menu borders:
    image
  • Bootstrap - button icon and text are to the left of their expected place:
    image

Reproduction of the problem

  1. Go to https://demos.telerik.com/kendo-ui/spreadsheet/sorting-filtering
  2. Click on the toggle icon of a sorted column to display the Sort and Filter menu

Expected/desired behavior

image

Environment

  • Kendo UI version: 2017.3.913+
  • Browser: [all]

Bootstrap 4 validation doesn't show up.

Bootstrap 4 altered the way validation works before going to RTM, in that it no longer uses
has-warning has-error etc, but now supports both HTML5 pseudoclasses
:invalid and :valid

As a fallback for controls that don't set :invalid or :valid pseudoclasses we can set is-valid or is-invalid regular CSS classes on the controls.

However, neither of those are reflected visually. (no red/green border + outline is shown) around the control.

Secondary, when entering the input field of a combobox, it does wrongly show an outline on that one.

I tried setting the is-invalid class on the combobox (which also has the form-control class) and I also tried to call setCustomValidity from javascript on the inner input of the combobox, which already got rid of the wrongly displaying green outline and replaced it with the correct RED outline.

We are not using kendo validation at the moment, as we already have a validation framework in place (aurelia-validation + bootstrap styling)

Add prebuilt swatches to NPM package

The swatches functionality in the ThemeBuilder has proven very useful, so much that it might be a good idea to ship prebuilt swatches in the NPM package.

This also aligns nicely with the Material design concept (which does not depend on fixed colors), as well as with the K2 theme chooser.

Where is _bootstrap-map.scss? Or what is the alternative?

I want to use Bootstrap 4 and I want Kendo to get all possible values from my customized Bootstrap's _variables.scss. As I understand, there was a solution for that with using _bootstrap-map.scss, but it's now absent in repository.

What is the right solution for this task right now?

[Dialog] Page is scrollable while Dialog is opened

I'm submitting an Enhancement

  • Suggestion for improvement
    Lock the vertical scrolling of the long content when you open the Dialog

Current behavior

Preview the issue in Themebuilder Kendo Angular UI
When you open the Dialog button, you can scroll the main page as well.

If the Dialog's height > viewport's height, the browser page will show up 2 scrollings: scroll of the main page (body element) and scroll of the dialog.

Expected behavior

Hide the vertical scrolling of the main page while the Dialog is opened.

Minimal reproduction of the problem with instructions

Add/Remove the below CSS lines when the dialog is opened/closed:

body {
 overflow: hidden;
}

Reference Bootstrap Modal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.