v2.0.0
This release includes a complete rebuild of the design-system.sf.gov site with Eleventy. There are a lot of changes to the system included:
Tailwind
We've enabled a bunch of Tailwind plugins:
flexDirectionandflexWrapto support reverse-column ordering and wrapping of flex contentsinsetto support positioning viatop,right,bottom, andleftCSS properties with our spacing scalepositionCSS utilities of the same nameoverflowfor overflow visibility utilities and scrolling support
I also updated some variants:
displaynow also hasgroup-hovervariants to support showing heading links on hover (in docs)flexDirectionis responsive, so you can vary the flex direction by viewport widthinsetandpositionare also responsive, because relative and absolute positioning usually differ responsively
Theme
Our Tailwind theme has some changes to support docs:
borderWidth.DEFAULThas changed from4pxto3px, affecting theborderand related utilitiesborderRadius['0'] = '0'gives usrounded-0and edge- and corner-specific utilities to flatten corners on certain elements- I've added
2,3, and4keys (allpxvalues) to theborderWidthobject to give us more explicit utilities fontFamily.inherit = 'inherit'andtextColor.inherit = 'inherit'enable thefont-inheritandtext-inheritutilities, which make it easier to explicitly allow typography settings to affect child elements- The
widthandheighttheme keys now include our spacing scale so you can set the sizes of elements to any size in our scale withw-andh-utilities
CSS updates
base.css
Base styles now:
- reset padding and margin on
<html>and<body> - set
<a>color to bright ("action") blue withtext-action - color input placeholders (
::placeholder) withtext-slate-light
docs.css
The new docs.css bundle includes styles to support the new docs site. There is currently a .prose scope that applies styles to elements like headings, but it's very much a work in progress and nowhere near ready to roll out on, say, Drupal-generated content on sf.gov. The most important part of this are the syntax highlighting colors.
fonts.css
The fonts bundle now also loads the Traditional Chinese subset of Noto Sans TC.
typography.css
Our typography bundle now explicitly styles <pre> and <code> elements with font-mono and forces children to inherit the monospace font with font-inherit. <pre> elements also get whitespace-pre-wrap out of the box.
Postcss config
I've removed two things from our postcss setup because we weren't using them:
- SCSS syntax (
postcss-scss) postcss-custom-properties