variable ITypeScale public view code open_in_new
A list consisting of 13 different category type styles
$ITypeScale: (h1, h2, h3, h4, h5, h6, subtitle-1, subtitle-2, body-1, body-2, button, caption, overline);
A list consisting of 13 different category type styles
$ITypeScale: (h1, h2, h3, h4, h5, h6, subtitle-1, subtitle-2, body-1, body-2, button, caption, overline);
A set of style rules for all categories
$ITypeStyle: ( font-family: inherit, font-size: null, font-weight: normal, font-style: normal, line-height: normal, letter-spacing: normal, text-transform: none, margin-top: 0, margin-bottom: 0,);
A list of all category type styles that can be maped to native elements
$IElementCategories: ( h1: 'h1', h2: 'h2', h3: 'h3', h4: 'h4', h5: 'h5', h6: 'h6', body-1: 'p',);
Converts pixels to relative values (em).
.my-component { margin: em(10px) em(5px);}
// Output.my-component { margin: 0.625em 0.3125em;}
Name | Type | Default | Description |
---|---|---|---|
$pixels * | number|string | - | The pixel value to be converted. |
$context | number|string | $browser-context | The base context to convert against. |
Converts pixels to root relative values (rem).
.my-component { margin: rem(10px) rem(5px);}
// Output.my-component { margin: 0.625rem 0.3125rem;}
Name | Type | Default | Description |
---|---|---|---|
$pixels * | number|string | - | The pixel value to be converted. |
$context | number|string | $browser-context | The base context to convert against. |
Converts relative value (em/rem) to pixel.
.my-component { margin: px(3rem);}
// Output.my-component { margin: 48px;}
Name | Type | Default | Description |
---|---|---|---|
$num * | number|string | - | The relative value to be converted. |
$context | number|string | $browser-context | The base context to convert against. |
Produces a type style map of values that adheres to the ITypeStyle map.
$main_navigation: type-style( $font-size: rem(14px), $font-weight: 600, $letter-spacing: rem(.1px), $line-height: rem(14px), $text-transform: none,);
// Use the type-style() mixin to consume the new type style produced from the type-style() function..main-nav { @include type-style($main_navigation);}
Name | Type | Default | Description |
---|---|---|---|
$font-family | String | var(--ig-font-family) | The font family of the type style. |
$font-size * | String | - | The font size of the type style. |
$font-weight | Number | String | normal | The font weight of the type style. |
$font-style | String | normal | The font style of the type style. |
$line-height | Number | String | normal | The line height of the type style. |
$letter-spacing | Number | String | normal | The letter spacing of the type style. |
$text-transform | String | none | The text-transform property of the type style. |
$margin-top | Number | 0 | The margin-top property of the type style. |
$margin-bottom | Number | 0 | The margin-bottom property of the type style. |
Produces a type scale map containing type styles that adheres to the ITypeScale list.
// First define type styles to use$my-body-1: type-style( $font-size: rem(14px),);
// Use the type style map to override one of the existing maps$type-scale: type-scale( ... $body-1: $my-body-1, ...);
Name | Type | Default | Description |
---|---|---|---|
$h1 * | Map | - | A map containing type style properties as produced by the type-style function. |
$h2 * | Map | - | A map containing type style properties as produced by the type-style function. |
$h3 * | Map | - | A map containing type style properties as produced by the type-style function. |
$h4 * | Map | - | A map containing type style properties as produced by the type-style function. |
$h5 * | Map | - | A map containing type style properties as produced by the type-style function. |
$h6 * | Map | - | A map containing type style properties as produced by the type-style function. |
$subtitle-1 * | Map | - | A map containing type style properties as produces by the type-style function. |
$subtitle-2 * | Map | - | A map containing type style properties as produces by the type-style function. |
$body-1 * | Map | - | A map containing type style properties as produces by the type-style function. |
$body-2 * | Map | - | A map containing type style properties as produces by the type-style function. |
$button * | Map | - | A map containing type style properties as produces by the type-style function. |
$caption * | Map | - | A map containing type style properties as produces by the type-style function. |
$overline * | Map | - | A map containing type style properties as produces by the type-style function. |
$_theme | String | null | The theme related to this type scale. Internal use only. |
Get type scale category config.
Get the type scale category config for the `h1` scale.
$h1-type-scale: type-scale-category($type-scale, 'h1');
Name | Type | Default | Description |
---|---|---|---|
$scale * | Map | - | A type scale map reference as produces by type-scale. |
$category * | String | - | The scale category you want config for. For instance - 'h1'; |
Adds typography styles for the igx-badge component. Uses the 'caption' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (text: 'caption') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-banner component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (message: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-bottom-nav component. Uses the 'caption' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'caption') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-button-group component. Uses the 'button' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | String | (text: 'button') | The category from the typographic scale used for type styles. |
Adds typography styles for the igx-button component. Uses the 'button' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | String | (text: 'button') | The category from the typographic scale used for type styles. |
Adds typography styles for the igx-calendar component. Uses the 'h4', 'subtitle-1' and 'body-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (header-year: 'subtitle-1', header-date: 'h4', picker-date: 'subtitle-1', content: 'body-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-card component. Uses the 'h6', 'subtitle-2' and 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'h6', title-small: 'subtitle-2', subtitle: 'subtitle-2', content: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-checkbox component. Uses the 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-chip component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (text: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-column-actions component. Uses the 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-date-range-picker component. Uses the 'subtitle-1' categories from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-dialog component. Uses the 'h6' and 'body-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'h6', content: 'body-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-drop-down component. Uses the 'overline', 'body-2', 'subtitle-1' categories from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (header: 'overline', item: 'body-2', select-item: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-expansion-panel component.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'h5', description: 'subtitle-2', body: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-icon-button component. Uses the 'button' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | String | (text: 'button') | The category from the typographic scale used for type styles. |
Adds typography styles for the igx-input-group component. Uses the 'subtitle-1', 'caption' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (helper-text: 'caption', input-text: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-label component. Uses the 'caption' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'caption') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-list component. Uses the 'caption' and 'subtitle-1' categories from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (header: 'overline', item: 'subtitle-1', title: 'subtitle-1', subtitle: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-navbar component. Uses the 'body-1', 'caption' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'h6') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-navdrawer component. Uses the 'subtitle-1', 'subtitle-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (item: 'subtitle-2', header: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-linear-bar component. Uses the 'subtitle-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (value: 'subtitle-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-radio component. Uses the 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-slider component. Uses the 'caption' categories from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (ticks-label: 'caption', thumb-label: 'caption') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-snackbar component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (text: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-stepper component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (title: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-switch component. Uses the 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-tabs component. Uses the 'subtitle-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'button') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-calendar component. Uses the 'h4', 'subtitle-1' and 'body-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (header-time-period: 'subtitle-1', header-hour: 'h4', content: 'body-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-toast component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (text: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-tooltip component. Uses custom typography.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (tooltip-text: null | The categories from the typographic scale used for type styles. |
Adds typography styles for the igx-tree component. Uses the 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$categories | Map | (label: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the category-chart component. Uses the 'h6', 'subtitle-1' and 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$type-scale * | Map | - | A typographic scale as produced by type-scale. |
$categories | Map | ( 'title': 'h6', 'subtitle': 'subtitle-1, 'x-axis-label-text-style': 'body-2', 'y-axis-label-text-style': 'body-2', 'x-axis-title-text-style': 'body-2', 'y-axis-title-text-style': 'body-2', ) | The categories from the typographic scale used for type styles. |
Adds typography styles for the data-chart component. Uses the 'h6' and 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$type-scale * | Map | - | A typographic scale as produced by type-scale. |
$categories | Map | (title: 'h6', subtitle: 'subtitle-1') | The categories from the typographic scale used for type styles. |
Adds typography styles for the pie-chart component. Uses the 'body-2' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$type-scale * | Map | - | A typographic scale as produced by type-scale. |
$categories | Map | (text: 'body-2') | The categories from the typographic scale used for type styles. |
Adds typography styles for the shape-chart component. Uses the 'h3', 'h4', 'h6', and 'subtitle-1' category from the typographic scale.
Name | Type | Default | Description |
---|---|---|---|
$type-scale * | Map | - | A typographic scale as produced by igx-type-scale. |
$categories | Map | ( 'title': 'h6', 'subtitle': 'subtitle-1, 'x-axis-label-text-style': 'h4', 'y-axis-label-text-style': 'h4', 'x-axis-title-text-style': 'h3', 'y-axis-title-text-style': 'h3', ) | The categories from the typographic scale used for type styles. |
Includes all category related styles into the current style block.
Add the `h1` styles to custom CSS selector.
.fancy-h1 { @include type-style('h1');
color: mediumvioletred;}
Name | Type | Default | Description |
---|---|---|---|
$category * | String | - | The type scale category. |
$check | String | true | Toggles category checks against ITypeScale. Set to false when using a custom type scale. |
Transforms a type style map into css font variables.
Assign the `h1` styles to custom CSS property using the CSS font shorthand syntax.
$h1-style: type-scale-category($type-scale, 'h1');@include type-style-vars('h1', $h1-style);
Name | Type | Default | Description |
---|---|---|---|
$name * | String | - | The custom CSS variable name. |
$type-style * | Map | - | A type style map reference as produced by type-style. |
Styles all native elements that match the IElementCategories map.
Add type styles to all native elements.
.ig-typography { @include type-style-elements();}
Creates CSS classes with style rules for all categories in the ITypeScale map.
Create CSS classes for all type styles.
.ig-typography { @include type-style-classes();}
Transforms a type style map into a font style rule assigned to a css variable.
Assign the `h1` styles to custom CSS property using the CSS font shorthand syntax.
$h1-style: type-scale-category($type-scale, 'h1');@include font-var('h1-font', $h1-style);
Name | Type | Default | Description |
---|---|---|---|
$name * | String | - | The custom CSS variable name. |
$type-style * | Map | - | A type style map reference as produces by type-style. |
$prefix | String | null | Optional prefix. |
Adds typography styles for h1-h6, paragraph and creates custom typography class selectors. The produces styles are based on the passed typeface and type scale. If omitted the $material-typeface and $material-type-scale will be used.
@include typography('Roboto', $my-type-scale);
Name | Type | Default | Description |
---|---|---|---|
$font-family * | String | - | The font family to be used across all typographic elements. |
$type-scale * | Map | - | A type scale map as produced by type-scale. |
Adds typography styles for h1-h6, paragraph and creates custom typography class selectors. The produces styles are based on the passed typeface and type scale. If omitted the $material-typeface and $material-type-scale will be used.
Name | Type | Default | Description |
---|---|---|---|
$font-family | String | $material-typeface | The font family to be used across all typographic elements. |
$type-scale | Map | $material-type-scale | A type scale map as produced by type-scale. |
$exclude | Map | null | A list of typography styles to be excluded. |
Includes all chart related typography styles for a given type-scale and target.
Name | Type | Default | Description |
---|---|---|---|
$type-scale * | Map | - | The type-scale to be used when including typography styles. |
$target | String | 'angular' | The target platform. Could be 'angular', 'webc', or 'blazor'. |