@@ -10,35 +10,31 @@ import IntrinsicElements = React.JSX.IntrinsicElements;
1010
1111const overwriteHeadlineMarkdown = `/* Select a headline tag to be overwritten */
1212h1 {
13- font-size: var(--db-type-headline-font-size-XX);
14- line-height: var(--db-type-headline-line-height-XX);
13+ font: var(--db-type-headline-XX);
1514
1615 /* spacings may vary depending on the project */
1716 margin-block: var(--db-spacing-fixed-XX);
1817}
1918` ;
2019
2120const getCodeExampleBodyFontSize = ( size : string ) => `.db-font-size-${ size } {
22- font-size: var(--db-type-body-font-size-${ size } );
23- line-height: var(--db-type-body-line-height-${ size } );
21+ font: var(--db-type-body-${ size } );
2422
2523 /* custom properties only for components */
2624 --db-icon-font-weight: var(--db-base-body-icon-weight-${ size } );
2725 --db-icon-font-size: var(--db-base-body-icon-font-size-${ size } );
2826}
2927` ;
3028const getCodeExampleHeadlineTag = ( tag : string , size : string ) => `${ tag } {
31- line-height: var(--db-type-headline-line-height-${ size } );
32- font-size: var(--db-type-headline-font-size-${ size } );
29+ font: var(--db-type-headline-${ size } );
3330 margin-block: var(--db-spacing-fixed-${ size } );
3431}
3532` ;
3633
3734const getCodeExampleHeadlineSizes = (
3835 size : string
3936) => `.custom-headline-selector {
40- line-height: var(--db-type-headline-line-height-${ size } );
41- font-size: var(--db-type-headline-font-size-${ size } );
37+ font: var(--db-type-headline-${ size } );
4238 margin-block: var(--db-spacing-fixed-${ size } );
4339}
4440` ;
@@ -200,8 +196,7 @@ const ColorOverview = () => {
200196 < >
201197 < h3
202198 style = { {
203- fontSize : `var(--db-type-headline-font-size-${ size } )` ,
204- lineHeight : `var(--db-type-headline-line-height-${ size } )` ,
199+ font : `var(--db-type-headline-${ size } )` ,
205200 marginBlock : `var(--db-spacing-fixed-${ size } )`
206201 } } >
207202 Headline with size: < u > { size } </ u >
@@ -240,9 +235,9 @@ const ColorOverview = () => {
240235 < p >
241236 < b > These custom properties must be used for overwrites:</ b >
242237 </ p >
243- < code > --db-type-headline-font-size- XX</ code >
244- < br />
245- < code > --db-type-headline- line-height-XX </ code >
238+ < code > --db-type-headline-XX</ code > (This shorthand custom
239+ property sets both < code > font-size </ code > and { ' ' }
240+ < code > line-height</ code > )
246241 < br />
247242 < code > --db-spacing-fixed-XX</ code > (optional e.g. for margin)
248243 < p >
0 commit comments