Repository navigation
@chassis-ui/css v0.10.0
Minor Changes
-
36ad9f7: Breaking: Chassis CSS is built with
@chassis-ui/tokens0.10, which names the font families by their job and gives every text role its own size and line height. The HTML font tokens, the size scale of the display family and five unused roles are gone.- The family for components is
ui, the name oftextuntil now:$font-family-ui, the"ui"key of$font-families,--cx-font-family-uiand.font-ui(font-uiin the Tailwind entry). Its scale is renamed with it:$font-size-ui-largeand the other sizes, weights and line heights, the maps$ui-font-sizes,$ui-font-weightsand$ui-line-heights, the custom properties--cx-font-size-ui-lg,--cx-font-weight-ui-strong,--cx-line-height-ui-lgand the others, and the font maps$font-ui-large-normaland the others.$font-size-lg,--cx-font-size-lg,.font-lgand the other names without a family keep their names and point at theuiscale. .font-textand--cx-font-family-text(var(--cx-font-family-ui)) stay in this minor as deprecated names of.font-uiand--cx-font-family-ui, and are removed in the next breaking minor. The Sass variable$font-family-textis removed.- New family for reading content:
prose, with$font-family-prose,--cx-font-family-proseand.font-prose, a scale of ten sizes and line heights and four weights ($prose-font-sizes,$prose-font-weights,$prose-line-heights,--cx-font-size-prose-lgand the others), and the compound utilities.font-prose.font-lgand.font-prose.font-strongbeside the ones ofcode. In the default tokensproseis the typeface ofui, with the same sizes. - The display family has no scale of its own. Removed:
$font-size-display-*,$line-height-display-*,$display-font-sizes,$display-line-heights,--cx-font-size-display-*,--cx-line-height-display-*and the compound utilities.font-display.font-lgand the other sizes, with no replacement: use a text role, or.font-prosewith a size..font-display,.font-display.font-strongand the other weights stay. - The HTML font tokens are removed:
$font-size-html-*,$line-height-html-*,$font-weight-html-*,$font-family-html-heading,$html-font-sizes,$html-font-weights,$html-line-heights, the font maps$font-html-*and the 32--cx-*-html-*custom properties. The headings,.blockquoteand.attributiontake their sizes from the text roles, with the values they had. $context-fontsholds 20 text roles:jumbo,hero,h1toh6,lead,blockquote,cite, and three sizes each oftitle,bodyandlabel. Their font maps are$font-h1,$font-lead,$font-title-largeand the others ($font-context-*until now, and$font-blockquoteand$font-citefor$font-html-blockquoteand$font-html-cite). Theheading,highlight,link,expiredandcoderoles are removed, and.font-headingwith them: use.font-h1to.font-h6.:rootdeclares the size and line height of each role,--cx-font-size-h1,--cx-line-height-title-lgand the others (jumbo and hero keep their sizes in their classes), and the family and weight of each role group:--cx-font-family-heading,--cx-font-weight-titleand the others ofjumbo,hero,heading,lead,body,title,label,blockquoteandcite. The Sass variables are$font-size-h1,$line-height-h1,$font-family-heading,$font-weight-headingand the others, in the maps$context-font-sizes,$context-line-heights,$context-font-families,$context-font-weightsand$context-font-groups.- New classes
.font-h1to.font-h6,.font-blockquoteand.font-cite. The headings styleh1,.font-h1and.h1together;.h1to.h6are deprecated and removed in the next breaking minor. - A role class reads the family and weight of its role group, so
--cx-font-family-titlechanges every title class and--cx-font-family-headingevery heading. It setsfont-style,text-transform,text-decorationandletter-spacingonly where the role gives them a value: the italic of.font-blockquote, the letter spacing of.font-jumboand.font-hero. A role class inside<em>or an underlined link now keeps the italic or the underline it inherits. $heading-font-familyisvar(--font-family-heading),$heading-font-weightisvar(--font-weight-heading),$h1-font-sizeisvar(--font-size-h1)and$h1-line-heightisvar(--line-height-h1), and the same for the other levels. The custom properties--cx-h1-font-size,--cx-h1-line-heightand the other levels,--cx-heading-font-familyand--cx-heading-font-weightare no longer read: set--cx-font-size-h1or--cx-font-family-headinginstead.$bold-font-weightisvar(--font-weight-mass),700as before.- With tokens 0.10, the title classes of the
chassisbrand use the display family, Montserrat, instead of Inter, with the weight they had. - A project with its own token source builds it with
@chassis-ui/tokens0.10.scss/tokens/reads$cx-typography-font-family-ui, theprosescale and thecontextroles, which 0.9 does not have.
- The family for components is