-
Notifications
You must be signed in to change notification settings - Fork 14
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: use typography tokens in o-topper and o-teaser #1938
base: 2025-release
Are you sure you want to change the base?
feat: use typography tokens in o-topper and o-teaser #1938
Conversation
Todo: cross check topper components |
Todo: there are some other private typography uses e.g |
7dbc994
to
4f39f1d
Compare
facabe1
to
d9c80c1
Compare
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.
Lots here! I'm not convinced it's all related to this PR though...
font-family: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-family'); | ||
font-size: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-size'); | ||
font-weight: 400; | ||
line-height: oPrivateFoundationGet('o3-typography-use-case-display-sm-line-height'); |
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.
This isn't using the usecase properly as it's a custom font weight (400 is also too high compared with Metric is seems). I think headline-md
fits better here (please double check)?
font-family: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-family'); | |
font-size: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-size'); | |
font-weight: 400; | |
line-height: oPrivateFoundationGet('o3-typography-use-case-display-sm-line-height'); | |
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-family'); | |
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-size'); | |
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-md-line-height'); | |
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-md-line-height'); |
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.
Fixed, though turns out there's more specific classes applying styles for this element.
components/o-private-foundation/src/scss/o-typography/main.scss
Outdated
Show resolved
Hide resolved
@@ -103,7 +118,10 @@ | |||
} | |||
|
|||
@mixin _oTopperTags { | |||
@include oPrivateTypographySans(0); |
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.
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.
Seems to be related to the private foundation colour changes we did a few sprints ago. Will take a look.
color: oPrivateFoundationGet('o3-color-palette-white'); | ||
position: absolute; | ||
text-shadow: 1px 1px 1px oPrivateFoundationGet('o3-color-palette-slate'); |
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.
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.
@@ -8,7 +8,10 @@ | |||
} | |||
|
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.
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.
I believe most of the colour issues are unrelated to the typography changes. I am happy to fix on this PR or move to a ticket. Either way it will need fixing this sprint!
font-family: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-family'); | ||
font-size: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-size'); | ||
font-weight: oPrivateFoundationGet('o3-typography-use-case-display-sm-font-weight'); | ||
line-height: oPrivateFoundationGet('o3-typography-use-case-display-sm-line-height'); | ||
@include oPrivateGridRespondTo('L') { | ||
@include oPrivateTypographyDisplay(7); | ||
font-family: oPrivateFoundationGet('o3-typography-use-case-display-lg-font-family'); | ||
font-size: oPrivateFoundationGet('o3-typography-use-case-display-lg-font-size'); | ||
font-weight: oPrivateFoundationGet('o3-typography-use-case-display-lg-font-weight'); | ||
line-height: oPrivateFoundationGet('o3-typography-use-case-display-lg-line-height'); |
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.
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.
@@ -4,7 +4,6 @@ | |||
|
|||
@import 'src/scss/variables'; | |||
@import 'src/scss/mixins'; |
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.
…ain.scss Co-authored-by: Lee Moody <[email protected]>
@include oEditorialTypographyHeading($level: 1); | ||
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-family'); | ||
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-size'); | ||
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-weight'); | ||
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-md-line-height'); | ||
margin-bottom: oPrivateSpacingByIncrement(5); | ||
} | ||
|
||
.o-topper__headline--large { | ||
@include oEditorialTypographyHeadline(); | ||
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-family'); | ||
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-size'); | ||
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-weight'); | ||
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-lg-line-height'); |
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.
oEditorialTypographyHeading(1)
/ oEditorialTypographyHeadline
were responsive before right? This should recreate that using tokens. o-topper__headline
should match the headline o3-editorial-typography component and o-topper__headline--large
should match the display component, both change the type usecase size responsively.
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.
Something like
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-sm-font-family');
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-sm-font-size');
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-sm-font-weight');
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-sm-line-height');
@include oPrivateGridRespondTo('S') {
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-family');
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-size');
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-md-font-weight');
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-md-line-height');
}
@include oPrivateGridRespondTo('L') {
font-family: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-family');
font-size: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-size');
font-weight: oPrivateFoundationGet('o3-typography-use-case-headline-lg-font-weight');
line-height: oPrivateFoundationGet('o3-typography-use-case-headline-lg-line-height');
}
Describe your changes
Uses typography tokens within the o-topper component
Issue ticket number and link
Link to Figma designs
Checklist before requesting a review
percy
label for o-[COMPONENT] orchromatic
label for o3-[COMPONENT] on my PR before merging and after review. Find more details in CONTRIBUTING.md