Skip to content

Yeti 7.0.0-alpha.4

Pre-release
Pre-release

Choose a tag to compare

@joeworkman joeworkman released this 01 Dec 23:54
· 2 commits to develop since this release
b7472a5

Yeti 7.0.0-alpha.4 is a color release. data-paint now does every fill: the page's surfaces, every hue at four shades, and eleven tones per hue. Each one sets the text that reads on it. Forms get two smaller fixes.

npm install @foundation/yeti@next
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@foundation/yeti@7.0.0-alpha.4/dist/yeti.min.css">

One breaking change

  • data-surface is removed. Use data-paint. The three values move across unchanged: data-surface="raised" becomes data-paint="raised", and the same for base and sunken. They now work on any element, not only a box.

Nothing else was renamed or removed.

Two changes you will see

  • Bare checkboxes and radios are the size of their text. Browsers draw them at 13px, smaller than body text. They now take the size of the text beside them and line up with the middle of its capitals, the same in Chrome, Safari and Firefox. A field still draws its own, larger.
  • A field's label sits closer to its input. --yeti-field-gap is now half the smallest space stop, and a label above its control has tighter line spacing. The space between fields is the form's stack gap, so that does not change. To get the alpha.3 spacing back, set --yeti-field-gap: var(--yeti-space-xs).

Painting

  • Surfaces. data-paint="base", "raised" and "sunken" paint the page's own surfaces on any element. A link on a surface keeps the page's link color.
  • Four shades of every hue. primary-subtle, primary-soft, primary and primary-strong, and the same for secondary, success, warning, alert and neutral. Subtle and soft take the page text, at 7:1 or more. The base and strong shades take the text made for the hue, at 4.5:1 or more. Both hold at any hue and at any --yeti-chroma up to 0.3. With a brand color, every pair reaches at least 4.5:1.
  • Eleven tones of every hue. primary-0 to primary-100 are the greyscale with the hue under it, so they flip with the scheme the way the greys do. primary-10 is a quiet tint near the page in both light and dark mode. Text follows the greys' rule, the page text up to 40 and the page surface from 50, and reaches 4.5:1 from 0 to 30 and from 70 to 100. Keep 40 to 60 for fills.
  • A new section in the color guide, "Painting an element", shows every hue at its shades and tones.

data-text takes the same colors as before: the hues, the constants and the greys.

Size

yeti.min.css is 27.2 kB gzipped, 0.6 kB more than alpha.3, nearly all of it the new paint values. yeti.min.js is unchanged at 5.9 kB.