feat(theme): lighten heading and body type, and align the Message icon to the first line - #876
Open
gabriel-lisboa-azion wants to merge 3 commits into
Open
feat(theme): lighten heading and body type, and align the Message icon to the first line#876gabriel-lisboa-azion wants to merge 3 commits into
gabriel-lisboa-azion wants to merge 3 commits into
Conversation
Headings (2xl → xxs) and every body step now render at 300 instead of 400, and the body steps tighten from 1.5 to 1.375 leading. The four `text-body-*` steps plus `text-body-xxs` gain a `--text-*-font-weight` custom property that did not exist before, so the utilities emit a weight rather than inheriting one. Tag steps drop from 600 to 400. `text-body-xxs` moves next to its siblings so the generated block reads in order; `dist/v4` and the webkit token catalog are regenerated.
The icon and the copy were siblings of the root's `items-center` row, so a message whose text wrapped to two or more lines drifted the icon to the vertical middle of the block instead of leaving it beside the first line. The icon and the copy now share an `items-start` block, and the icon rides an alignment box the height of the copy's line box — `h-5.25` (21px) at medium, `h-4.5` (18px) at small — so it centers on the first line and stays there at any wrap depth.
…e and Message icon alignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text-heading-*and everytext-body-*step drop from weight 400 to 300, and the body steps tighten from 1.5 to 1.375 leading;text-tag-*drops from 600 to 400. The four body steps plustext-body-xxsnow emit a--text-*-font-weightcustom property they previously lacked, so the utilities set a weight instead of inheriting one.Messagekept its icon on the root'sitems-centerrow, so wrapped copy dragged the icon to the vertical middle of the block. The icon and the copy now share anitems-startblock, with the icon on an alignment box the height of the copy's line box (h-5.25medium /h-4.5small).packages/theme/dist/v4/*andpackages/webkit/catalog.jsonare regenerated from the token sources.How to test
pnpm --filter @aziontech/webkit test -- src/components/feedback/message/message.test.ts→ 33 passing.pnpm storybook:dev, open Components/Feedback/Message. Widen the label until it wraps to two lines at bothsmallandmedium: the icon stays beside the first line instead of drifting to the middle. Measured line boxes are 21px (medium,text-label-md) and 18px (small,text-label-sm), matching the alignment box.cd packages/theme && node src/scripts/build-tokens.mjsthengit diff --exit-code packages/theme/dist→ no drift. Same forpnpm --filter @aziontech/webkit run catalog:check.Notes
--text-body-*-font-weightproperties are new surface, hence thefeattype.