Skip to content

Commit

Permalink
chore: Remove text about !important (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes authored Apr 15, 2024
1 parent 5efc4ee commit 22ed61d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
}

* {
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The components are designed and developed using the [Inter font](https://github.

Add the `<link>` tag in `<head>`, and set `font-family` to `Inter` in your global css file.

The `font-feature-settings` adds a tail to lowercase `L`'s and must be set with the `!important` flag.
The `font-feature-settings` adds a tail to lowercase `L`'s.

##### HTML

Expand All @@ -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,11 +54,9 @@ 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``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.

## Tekststørrelse

Tekststørrelse-variablene blir angitt i **rem**. Denne verdien er relativ til `html`-elementet sin `font-size`,
Expand Down
2 changes: 1 addition & 1 deletion packages/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Legg til `<link>` taggen i `<head>`, og sett `font-family` til `Inter` i din glo
```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

0 comments on commit 22ed61d

Please sign in to comment.