Learn / Upgrading to 0.41

foldkit-mixins: styles and themes

The default theme

Five defaults changed: shadow.strength is 70, shape.radius 1, the accent's lightness 54 in both schemes, surface.saturation 0.005 and menu.panel default. To keep the 0.40 look:

ts
import { Theme } from 'foldkit-mixins/theme'

export const theme040 = Theme.make({
  shadow: { strength: 0 },
  shape: { radius: 0.45 },
  accent: { lightness: { light: 55, dark: 70 } },
  surface: { saturation: 0 },
  menu: { panel: 'inverted' },
})

The rest

  • A view's pipe takes typed steps only. A list of Behaviors is one step: Behavior.attachAll(list).
  • Composing a conditional rule (media, pseudo, nest, states, whenInput) beside an inline declaration of the same property throws mixins:dead-conditional-rule, since the inline declaration always won.
  • A NamedStyle of one Slots contract no longer passes where another contract's is asked for (types only).