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

Use CSS property accent-color to tint form controls #328

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}