New to Kendo UI for AngularStart a free 30-day trial

SASS Variables Overview

All Kendo UI themes rely on SASS variables.

What Are SASS Variables

A SASS variable is a name with an assigned value. All SASS variables start with $. For more detailed information, take a look at the official SASS docs.

Variables Defaults

Each variable in Kendo UI Themes include !default flag which allows you to override the default variable value. All Kendo UI themes rely on common style rules and thus share the same set of variables. However, some variables may not need to have a specific value in a particular theme. That is why such variables are set to null in that theme and don't output the property.

Anatomy of the Kendo UI Themes Variables

When defining variables, the Kendo UI themes follow patterns in their names for consistency. Depending on its purpose, a variable name has to contain one of the following words.

Metrics

  • padding—A padding-related variable.

    scss
    $kendo-padding-x: 8px !default;

Colors

  • bg—A background-color related variable.

    scss
    $kendo-base-bg: #f6f6f6 !default;
  • text—A text-color related variable.

    scss
    $kendo-base-text: #656565 !default;
  • border—A border color-, size-, style-, and radius-related variable.

    scss
    $kendo-base-border: rgba( black, .08 ) !default;
  • gradient—A gradient-related variable.

    scss
    $kendo-base-gradient: $kendo-base-bg, darken( $kendo-base-bg, 2% ) !default;

States

  • hover, hovered—A hover-state related variable.

    scss
    $kendo-hovered-bg: #ededed !default;
  • focus, focused—A focus-state related variable.

    scss
    $kendo-focused-shadow: inset 0 0 0 2px rgba(0, 0, 0, .13) !default;
  • selected—A selected-state related variable.

    scss
    $kendo-selected-bg: $kendo-color-primary !default;
  • disabled—A disabled-state related variable.

    scss
    $kendo-disabled-opacity: .6 !default;

Component-Specific Variables

Each component has a list of its specific variables. They are located in the _variables.scss file in the scss folder of the component. The names of these variables start with the component name itself.

scss
$kendo-grid-padding-x;
$kendo-grid-padding-y;

List of Variables

The following list contains the common variables that are used in the themes. For the complete list of variables, refer to https://github.com/telerik/kendo-themes/blob/develop/packages/default/scss/_variables.scss.

NameDescription
$kendo-font-sizeThe base font size across all components.
$kendo-font-familyThe font family across all components.
$kendo-line-heightThe line height used along with $font-size.
$kendo-border-radiusThe border radius for all components.
$kendo-color-primaryThe color that focuses the user attention. Used for primary buttons and for elements of primary importance across the theme.
$kendo-base-textThe text color of the components' chrome area.
$kendo-base-bgThe background of the components' chrome area.
$kendo-base-borderThe border color of the components' chrome area.
$kendo-base-gradientThe gradient background of the components' chrome area.
$kendo-hovered-textThe text color of hovered items.
$kendo-hovered-bgThe background of hovered items.
$kendo-hovered-borderThe border color of hovered items.
$kendo-hovered-gradientThe gradient background of hovered items.
$kendo-selected-textThe text color of selected items.
$kendo-selected-bgThe background of selected items.
$kendo-selected-borderThe border color of selected items.
$kendo-selected-gradientThe gradient background of selected items.
$kendo-disabled-opacityThe opacity of disabled items.
$kendo-color-errorThe color for error messages and states.
$kendo-color-warningThe color for warning messages and states.
$kendo-color-successThe color for success messages and states.
$kendo-color-infoThe color for informational messages and states.