Skip to content

Commit

Permalink
style: support design tokens in ::selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed May 4, 2023
1 parent 508f158 commit fb62efe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion proprietary/design-tokens/src/background-image-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*/

.utrecht-theme,
.utrecht-theme ::backdrop {
.utrecht-theme ::backdrop,
.utrecht-theme ::selection {
--utrecht-menulijst-item-background-image: url("./pijltje.svg");
--utrecht-link-icon-left-background-image: url("./pijltje.svg");
--utrecht-search-bar-input-background-image: url("./icoon-zoek-rood.svg");
Expand Down
3 changes: 2 additions & 1 deletion proprietary/design-tokens/src/dark/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import "../../dist/dark/mixin-theme";

.utrecht-theme--color-scheme-dark,
.utrecht-theme--color-scheme-dark ::backdrop {
.utrecht-theme--color-scheme-dark ::backdrop,
.utrecht-theme--color-scheme-dark ::selection {
@include utrecht-theme--dark;
}
7 changes: 5 additions & 2 deletions proprietary/design-tokens/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
@import "./responsive";

.utrecht-theme,
.utrecht-theme ::backdrop {
.utrecht-theme ::backdrop,
.utrecht-theme ::selection {
@include utrecht-theme;

utrecht-page-footer,
Expand All @@ -29,8 +30,10 @@
@media (prefers-color-scheme: dark) {
.utrecht-theme--media-query,
.utrecht-theme--media-query ::backdrop,
.utrecht-theme--media-query ::selection,
.utrecht-theme--media-query-color-scheme,
.utrecht-theme--media-query-color-scheme ::backdrop {
.utrecht-theme--media-query-color-scheme ::backdrop,
.utrecht-theme--media-query-color-scheme ::selection {
@include utrecht-theme--dark;
}
}
4 changes: 2 additions & 2 deletions proprietary/design-tokens/src/style-dictionary-config-dark.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
destination: 'root.css',
format: 'css/variables',
options: {
selector: ':root, ::backdrop',
selector: ':root, ::backdrop, ::selection',
outputReferences: true,
},
},
Expand All @@ -32,7 +32,7 @@ module.exports = {
destination: 'index.css',
format: 'css/variables',
options: {
selector: '.utrecht-theme--dark, .utrecht-theme--dark ::backdrop',
selector: '.utrecht-theme--dark, .utrecht-theme--dark ::backdrop, .utrecht-theme--dark ::selection',
outputReferences: true,
},
},
Expand Down
4 changes: 2 additions & 2 deletions proprietary/design-tokens/style-dictionary.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"destination": "root.css",
"format": "css/variables",
"options": {
"selector": ":root, ::backdrop",
"selector": ":root, ::backdrop, ::selection",
"outputReferences": true
}
}
Expand All @@ -64,7 +64,7 @@
"destination": "theme.css",
"format": "css/variables",
"options": {
"selector": ".utrecht-theme, .utrecht-theme ::backdrop",
"selector": ".utrecht-theme, .utrecht-theme ::backdrop, .utrecht-theme ::selection",
"outputReferences": true
}
}
Expand Down

1 comment on commit fb62efe

@vercel
Copy link

@vercel vercel bot commented on fb62efe May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.