Skip to content
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: Add css layers to fix specificity #1721

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<style>
* {
font-feature-settings: 'cv05' 1 !important;
font-feature-settings: 'cv05' 1;
}
html {
font-family: 'Inter', sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<style>
* {
font-feature-settings: 'cv05' 1 !important;
font-feature-settings: 'cv05' 1;
}
html {
font-family: 'Inter', sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The `font-feature-settings` adds a tail to lowercase `L`'s and must be set with
```css
body {
font-family: 'Inter', sans-serif;
font-feature-settings: 'cv05' 1 !important; /* Enable lowercase l with tail */
font-feature-settings: 'cv05' 1; /* Enable lowercase l with tail */
}
```

Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body {

* {
box-sizing: border-box;
font-feature-settings: 'cv05' 1 !important;
font-feature-settings: 'cv05' 1;
}

h1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For å aktivere lowercase l with tail, legg til følgende i din CSS:

<CodeSnippet language='css'>
{`font-family: 'Inter', sans-serif;
font-feature-settings: 'cv05' 1 !important; /* Enable lowercase l with tail */`}
font-feature-settings: 'cv05' 1; /* Enable lowercase l with tail */`}
</CodeSnippet>

Bruk `!important` på `font-feature-settings` fordi våre typography tokens og komponenter bruker [font](https://developer.mozilla.org/en-US/docs/Web/CSS/font) shorthand som resetter dette til sin initielle verdi.
Expand Down
Loading
Loading