Skip to content

Commit e9f65e6

Browse files
author
Mohd Imran
committed
added new WCAG AA and AAA compliant text selection colors
1 parent ce7a85d commit e9f65e6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

client/styles/abstracts/_variables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ $themes: (
8383
input-text-color: $dark,
8484
input-background-color: $lightest,
8585
input-secondary-background-color: $lightest,
86+
input-selection-text-color: $dark,
87+
input-selection-background-color: $medium-light,
8688
input-border-color: $middle-light,
8789
search-background-color: $lightest,
8890
search-clear-background-color: $light,
@@ -163,6 +165,8 @@ $themes: (
163165
input-text-color: $lightest,
164166
input-background-color: $dark,
165167
input-secondary-background-color: $medium-dark,
168+
input-selection-text-color: $darkest,
169+
input-selection-background-color: $lightest,
166170
input-border-color: $middle-dark,
167171
search-background-color: $lightest,
168172
search-clear-background-color: $medium-dark,
@@ -241,6 +245,8 @@ $themes: (
241245
input-text-color: $lightest,
242246
input-background-color: $dark,
243247
input-secondary-background-color: $medium-dark,
248+
input-selection-text-color: $darkest,
249+
input-selection-background-color: $lightest,
244250
input-border-color: $middle-dark,
245251
search-background-color: $white,
246252
search-clear-background-color: $medium-dark,

client/styles/base/_base.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ textarea {
4444
}
4545
}
4646

47+
input::selection,
48+
textarea::selection {
49+
@include themify() {
50+
color: getThemifyVariable('input-selection-text-color');
51+
background-color: getThemifyVariable('input-selection-background-color');
52+
}
53+
}
54+
4755
button[type="submit"],
4856
input[type="submit"] {
4957
@include themify() {

0 commit comments

Comments
 (0)