Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Tint elements using accent-color and other CSS rules
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Oct 18, 2021
1 parent 1e0a948 commit 7caf36c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default {
'~/assets/fonts.css',
'~/styles/vocabulary.scss',
'~/styles/global.scss',
'~/styles/accent.scss',
],
head,
env,
Expand Down
22 changes: 22 additions & 0 deletions src/styles/accent.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:root {
/* Accent color tints checkbox, radio, range and progress. */
accent-color: theme('colors.trans-blue');
}

:focus-visible {
outline-color: theme('colors.trans-blue');
}

::selection {
/* Using white text because selection background is dark. */
@apply bg-trans-blue text-white;
}

::-webkit-calendar-picker-indicator,
::-webkit-clear-button,
::-webkit-inner-spin-button,
::-webkit-outer-spin-button,
::marker {
/* List markers can be tinted as text. */
@apply text-trans-blue;
}

0 comments on commit 7caf36c

Please sign in to comment.