Spacing

Spacing boosts the visual structure and logic by defining the size and border radius of the components and the relations between them.

Overview of Spacing

The Telerik and Kendo UI Design System provides a set of steps with predefined values for creating harmonious and yet logical usage inside of and between the components.

Note that along with typography, spacing is the other key element when building a component as spacing controls the negative area between the elements. For example, the height of the Button component is defined by the line height of its label and the vertical paddings.

Well-established spacing systems and their mindful and consistent usage is the foundation both for aesthetically pleasing and balanced UI, and for responsive and accessible design.

Scale

The Telerik and Kendo UI spacing scale consists of multiple steps. Except for step 0, which is used for borders, each step is represented by an even-numbered spacing value with a base unit of 8px. Each spacing value is a multiple of the base and, in the smaller 1-8 steps, the increments increase by 2px. This approach provides greater flexibility for setting the size of the components especially for more compact ones such as the Badge.

StepExamplerempx
00.06251
0.50.1252
10.254
1.50.3756
20.58
2.50.62510
30.7512
3.50.87514
4116
4.51.12518
51.2520
5.51.37522
61.524
6.51.62526
71.7528
7.51.87530
8232
92.2536
102.540
112.7544
12348
133.2552
143.556
153.7560
16464
174.2568
184.572
194.7576
20580
215.2584
225.588
235.7592
24696

Variables

Each step of the spacing scale is controlled by the $kendo-spacing variable. $kendo-spacing is also related to paddings and margins, and not only affects the layout inside single components but also influences the spacing between multiple components. 

$kendo-padding-x: 8px !default;
$kendo-padding-y: 4px !default;
$kendo-padding-sm-x: k-map-get( $kendo-spacing, 1 ) !default;
$kendo-padding-sm-y: k-map-get( $kendo-spacing, 0.5 ) !default; // sass-lint:disable-line leading-zero
$kendo-padding-md-x: k-map-get( $kendo-spacing, 2 ) !default;
$kendo-padding-md-y: k-map-get( $kendo-spacing, 1 ) !default;
$kendo-padding-lg-x: k-map-get( $kendo-spacing, 3 ) !default;
$kendo-padding-lg-y: k-map-get( $kendo-spacing, 1.5 ) !default;

The value of the border radius also depends on the $kendo-spacing values:

$kendo-border-radius: k-map-get( $kendo-spacing, 1 ) !default;
$kendo-border-radius-sm: $kendo-border-radius - k-map-get( $kendo-spacing, 0.5 ) !default; // sass-lint:disable-line leading-zero
$kendo-border-radius-md: $kendo-border-radius !default;
$kendo-border-radius-lg: $kendo-border-radius + k-map-get( $kendo-spacing, 0.5 ) !default; // sass-lint:disable-line leading-zero