-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Typography): add general .dnb-t
helper classes and add typography props to Span
#4235
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
54f663a
to
97cb87f
Compare
9f1e491
to
b82528f
Compare
.dnb-t
helper classes and add typography props to Span
packages/dnb-design-system-portal/src/docs/quickguide-designer/typography/font-families.mdx
Outdated
Show resolved
Hide resolved
packages/dnb-design-system-portal/src/docs/quickguide-designer/typography/font-families.mdx
Outdated
Show resolved
Hide resolved
packages/dnb-design-system-portal/src/docs/quickguide-designer/typography/font-families.mdx
Outdated
Show resolved
Hide resolved
packages/dnb-design-system-portal/src/docs/quickguide-designer/typography/font-families.mdx
Outdated
Show resolved
Hide resolved
packages/dnb-design-system-portal/src/docs/quickguide-designer/typography/font-families.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 🥇
I've compared/tested the the docs which use this, deploy preview towards main and it looks exactly the same 🥳
I also tested it locally to see that old classes, .dnb-typo-regular
, .dnb-typo-medium
and .dnb-typo-bold
, still work. And they do 😍
Other than my comments regarding changing dnd
to dnb
, I only have this comment that we could discuss, in regards to line
vs lineHeight
and __line
vs __line-height
.
packages/dnb-design-system-portal/src/docs/uilib/elements/paragraph/demos.mdx
Outdated
Show resolved
Hide resolved
type: `'underline'`, | ||
status: 'optional', | ||
}, | ||
slant: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious what does slant mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lean, tilt, bent. It's used in font lingo.
The problem is that the css property is "font-style" but we don't want to use the word "style" in a prop. But in essence, the font-style
css property sets the slanting of the font. normal
italic
oblique
oblique 40deg
. So it's the best i could come up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, in font lingo, "slanted" means the text is mechanically slanted, so the machine prints the regular character with the top gradually more to the right than the bottom. More like a projection. And "italic" means that the font is already designed slanted.
But in a CSS context italic it both. You can either define a specific font for italic, or it will be "slanted", as in, the "machine" (browser) "mechanically" (programatically) slants the regular font.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, underline and italic couldn't use the same prop name decoration
as they aren't mutually exclusive, you should be able to have both at the same time.
73e6d56
to
808dda8
Compare
dbcfa07
to
f426dc1
Compare
f426dc1
to
ddfd55c
Compare
## [10.57.0](v10.56.0...v10.57.0) (2024-11-22) ### 📝 Documentation * **Field.Upload:** adds `asyncFileHandler` property ([#4288](#4288)) ([fb09758](fb09758)) * **Field.Upload:** adds asyncFileHandler property ([7ccdabd](7ccdabd)) ### 🐛 Bug Fixes * **Forms:** align Value.SummaryList when Value.* has no label ([#4311](#4311)) ([b6621c2](b6621c2)) * **Forms:** ensure fields inside composition share submit indicator ([#4309](#4309)) ([e726e20](e726e20)) * **Forms:** safeguard errorMessages to avoid infinite loops when not wrapped in useMemo ([#4305](#4305)) ([f14bacc](f14bacc)) * **Forms:** show indicator with async onBlurValidator call when `validateInitially` is used ([#4303](#4303)) ([c585491](c585491)) * **Icon:** ensure icon name is rendered as `data-testid` ([#4304](#4304)) ([235b823](235b823)) ### ✨ Features * **Card, Section:** add `outset` property for moderate layout breakout ([#4317](#4317)) ([6008d9a](6008d9a)) * **DrawerList, Dropdown, Autocomplete, Field.Selection, Field.ArraySelection:** disabled options ([#4154](#4154)) ([8786d5d](8786d5d)) * **Field.Upload:** adds support for async and sync fn in `fileHandler` ([#4294](#4294)) ([2cc816a](2cc816a)) * **Forms:** add `Form.Card` with different default appearance than Card (use `Form.Card` in forms instead of Card) ([#4318](#4318)) ([7bbc0ca](7bbc0ca)) * **Forms:** add `labelSrOnly` to Value.* components ([#4319](#4319)) ([46f68ae](46f68ae)), closes [#4311](#4311) * **Forms:** deprecate `validator` in favor of `onChangeValidator` ([#4314](#4314)) ([5a06b2e](5a06b2e)) * **Typography:** add general `.dnb-t` helper classes and add typography props to Span ([#4235](#4235)) ([9dfe66d](9dfe66d))
🎉 This PR is included in version 10.57.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
.dnb-t
.dnb-p
classes<Span>
component