-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Text): Text component to use CSS modules behind primer_react…
…_css_modules_team feature flag (#4874) * refactor(Text): To CSS modules behind primer_react_css_modules_team feature flag * Create tidy-clocks-marry.md * Adjust playground argtypes for tsc * Make this minor release
- Loading branch information
Showing
5 changed files
with
135 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": minor | ||
--- | ||
|
||
Refactor `Text` to CSS modules behind primer_react_css_modules_team feature flag |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.Text { | ||
&:where([data-size='small']) { | ||
font-size: var(--text-body-size-small); | ||
line-height: var(--text-body-lineHeight-small); | ||
} | ||
|
||
&:where([data-size='medium']) { | ||
font-size: var(--text-body-size-medium); | ||
line-height: var(--text-body-lineHeight-medium); | ||
} | ||
|
||
&:where([data-size='large']) { | ||
font-size: var(--text-body-size-large); | ||
line-height: var(--text-body-lineHeight-large); | ||
} | ||
|
||
&:where([data-weight='light']) { | ||
font-weight: var(--base-text-weight-light); | ||
} | ||
|
||
&:where([data-weight='normal']) { | ||
font-weight: var(--base-text-weight-normal); | ||
} | ||
|
||
&:where([data-weight='medium']) { | ||
font-weight: var(--base-text-weight-medium); | ||
} | ||
|
||
&:where([data-weight='semibold']) { | ||
font-weight: var(--base-text-weight-semibold); | ||
} | ||
} |
This file contains 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
This file contains 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