Skip to content

refactor(css / components)!: stabilize token contracts, layout mechan…#334

Open
ascartabelli wants to merge 1 commit into
mainfrom
wip-tweaks
Open

refactor(css / components)!: stabilize token contracts, layout mechan…#334
ascartabelli wants to merge 1 commit into
mainfrom
wip-tweaks

Conversation

@ascartabelli

Copy link
Copy Markdown
Member

…ics and component anatomy

  • restructured Storybook titles to mirror the design system taxonomy (Display, Feedback, Interactive and Layout)

@duskit/css:

  • BREAKING CHANGE: renamed icon size contracts in display.css as they weren't following the naming rules
  • tweaked icon sizing
  • made icon sizes follow the optical scale instead of the macro one
  • tweaked headings scale
  • added fluid typography for all headings
  • added new contracts in display.css for headings
  • tweaked paddings of interactive components
  • tweaked sizes of toggle indicators
  • added missing contracts for main background and text colors in layout.css
  • tweaked text size of headings and titles in layout.css
  • added contracts for boundary colours in layout.css

@duskit/components:

  • updated styles of Banner and Icon to use the new icon size contracts
  • updated Drawer and NotificationFeed to use the new layout boundary contracts
  • added Heading component
  • tweaked paddings of interactive components
  • buttons in the "naked" variant now have a default padding
  • added a more distinct style to toggle buttons while pressed
  • gave a fixed line height of 1.5 to Agreement, Button, ContentSwitch, ExclusiveChoice, Select, Tabs and Textbox instead of inheriting it
  • icon buttons are now guaranteed to be square
  • updated ContentSwitch to use standard padding and font size
  • added missing min-block-size in ContentSwitch and Tabs interactive elements
  • updated Tabs to used the "naked" variant for scroll buttons
  • stabilized header height in Notification by deriving minimum block size from interactive density tokens
  • added a defensive layout rule to ensure card structural slots always stretch to the full available width, preventing parent flex alignment from affecting the component layout
  • added flex: 1 to Banner's content wrapper to ensure it spans the full remaining width next to the icon
  • prevented layout blowout in Banner and text overflow when handling long unbreakable strings

…ics and component anatomy

- restructured Storybook titles to mirror the design system taxonomy (`Display`, `Feedback`, `Interactive` and `Layout`)

`@duskit/css`:
- **BREAKING CHANGE**: renamed icon size contracts in `display.css` as they weren't following the naming rules
- tweaked icon sizing
- made icon sizes follow the optical scale instead of the macro one
- tweaked headings scale
- added fluid typography for all headings
- added new contracts in `display.css` for headings
- tweaked paddings of interactive components
- tweaked sizes of toggle indicators
- added missing contracts for main background and text colors in `layout.css`
- tweaked text size of headings and titles in `layout.css`
- added contracts for boundary colours in `layout.css`

`@duskit/components`:
- updated styles of `Banner` and `Icon` to use the new icon size contracts
- updated `Drawer` and `NotificationFeed` to use the new layout boundary contracts
- added `Heading` component
- tweaked paddings of interactive components
- buttons in the "naked" variant now have a default padding
- added a more distinct style to toggle buttons while pressed
- gave a fixed line height of `1.5` to `Agreement`, `Button`, `ContentSwitch`, `ExclusiveChoice`, `Select`, `Tabs` and `Textbox` instead of inheriting it
- icon buttons are now guaranteed to be square
- updated `ContentSwitch` to use standard padding and font size
- added missing `min-block-size` in `ContentSwitch` and `Tabs` interactive elements
- updated `Tabs` to used the "naked" variant for scroll buttons
- stabilized header height in `Notification` by deriving minimum block size from interactive density tokens
- added a defensive layout rule to ensure card structural slots always stretch to the full available width, preventing parent flex alignment from affecting the component layout
- added `flex: 1` to `Banner`'s content wrapper to ensure it spans the full remaining width next to the icon
- prevented layout blowout in `Banner` and text overflow when handling long unbreakable strings
@ascartabelli ascartabelli self-assigned this Jun 12, 2026
@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 87d0212

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@duskit/components Major
@duskit/css Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ascartabelli ascartabelli marked this pull request as ready for review June 12, 2026 12:50
@ascartabelli ascartabelli requested a review from HDauven June 12, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant