Overview
The classes below are to set the dimensions of general html elements. In addition to the below options, most components have individual size options available (such as ds-button --large).
These general classes may be overridden by other components styles or general restrictions of the html element itself.
Setting the width, max-width, height, or max-height of element using the following classes will automatically set any overflowing content to scroll.
Format
The format of width and height utility classes is:
For pixels based:
--{number}-{w|h}
For other units:
--{number}-{w|h}-{unit}
Where:
Units
Pixel based
The default size is based on a 10px ‘space’, where --20-w would result in a width of 200px (20 x 10px).
The available space increments are: 1-100
For example:
Percentage based
The following percentage based units are supported:
The available percentage increments are: 1-100
For example:
Character based
The following character based units are supported:
The available character length increments are: 1-100
Character widths is a rough estimate of actual line length, and is dependent on the characters in a specific line. Generally, the width is 10-30% wider than the number of characters.
For example:
Widths — General
Set the widths, min-widths, or max-widths of the element.
-w width
Element widths will be the set width and are responsive.
-wmin min width
Elements will be as wide as the minimum width, expand to fit the content, and are responsive.
-wmax max width
Elements will be as narrow as it’s content up to the maximum width and are responsive.
Widths — Table columns
See also ds-datatable Column widths documentation.
-w width
Table column widths will be the set width, widths are not responsive, they will force the table to overflow if neccessary.
-wmin min width
Table column widths will be the minimum width or wider if space permits.
-wmax max width
-wmax is not supported for table column widths
Heights — General
Set the heights, min-heights, or max-heights of the element.
-h height
Element heights will be the set height and are responsive.
-hmin min height
Elements will be as high as the minimum height, expand to fit the content, and are responsive.
-hmin-pc (percentage) is not supported -hmax max height
Elements will be as short as it’s content up to the maximum height and are responsive.
-hmax-pc (percentage) is not supported