-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BaseStyles): Convert BaseStyles to CSS modules behind team featu…
…re flag (#5361) * Create css modules for BaseStyles * Convert BaseStyles to CSS modules behind team feature flag * Add changeset * Update anchoroverlay snapshot for BaseStyles * Fix lint * Fix integration regression * Update snapshot to remove unnecessary whitespace --------- Co-authored-by: Jon Rohan <yes@jonrohan.codes>
- Loading branch information
1 parent
b5ff840
commit 2fbdd3b
Showing
4 changed files
with
88 additions
and
8 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 | ||
--- | ||
|
||
Convert BaseStyles to CSS modules behind 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* stylelint-disable selector-max-specificity */ | ||
/* stylelint-disable selector-type-no-unknown */ | ||
|
||
/* -------------------------------- | ||
* Global Styles | ||
*--------------------------------- */ | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
table { | ||
/* stylelint-disable-next-line primer/borders */ | ||
border-collapse: collapse; | ||
} | ||
|
||
[role='button']:focus:not(:focus-visible):not(.focus-visible), | ||
[role='tabpanel'][tabindex='0']:focus:not(:focus-visible):not(.focus-visible), | ||
button:focus:not(:focus-visible):not(.focus-visible), | ||
summary:focus:not(:focus-visible):not(.focus-visible), | ||
a:focus:not(:focus-visible):not(.focus-visible) { | ||
outline: none; | ||
box-shadow: none; | ||
} | ||
|
||
[tabindex='0']:focus:not(:focus-visible):not(.focus-visible), | ||
details-dialog:focus:not(:focus-visible):not(.focus-visible) { | ||
outline: none; | ||
} | ||
|
||
/* -------------------------------------------------------------------------- */ | ||
|
||
.BaseStyles { | ||
/* Global styles for light mode */ | ||
&:has([data-color-mode='light']) { | ||
input & { | ||
color-scheme: light; | ||
} | ||
} | ||
|
||
/* Global styles for dark mode */ | ||
&:has([data-color-mode='dark']) { | ||
input & { | ||
color-scheme: dark; | ||
} | ||
} | ||
} |
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