generated from w3c/wai-resource-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit changed files and submodule updates
- Loading branch information
1 parent
4372c81
commit 8d8451e
Showing
2 changed files
with
76 additions
and
77 deletions.
There are no files selected for viewing
Submodule aria-practices
updated
1 files
+75 −76 | content/practices/high-contrast/css/switch-color-scheme.css |
151 changes: 75 additions & 76 deletions
151
content-assets/wai-aria-practices/practices/high-contrast/css/switch-color-scheme.css
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 |
---|---|---|
@@ -1,132 +1,131 @@ | ||
button.color-scheme[role="switch"] { | ||
display: block; | ||
margin: 2px; | ||
padding: 4px 4px 8px 8px; | ||
border: 0 solid #005a9c; | ||
border-radius: 5px; | ||
width: 17em; | ||
height: 3em; | ||
text-align: left; | ||
background-color: #e9e9e9; | ||
color: #242424; | ||
display: block; | ||
margin: 2px; | ||
padding: 4px 4px 8px 8px; | ||
border: 0 solid #005a9c; | ||
border-radius: 5px; | ||
width: 17em; | ||
height: 3em; | ||
text-align: left; | ||
background-color: #e9e9e9; | ||
color: #242424; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] { | ||
background-color: #333; | ||
color: #eee; | ||
border-color: #36c; | ||
background-color: #333; | ||
color: #eee; | ||
border-color: #36c; | ||
} | ||
|
||
button.color-scheme[role="switch"] .label { | ||
position: relative; | ||
top: -3px; | ||
display: inline-block; | ||
padding: 0; | ||
margin: 0; | ||
width: 10em; | ||
vertical-align: middle; | ||
color: #242424; | ||
position: relative; | ||
top: -3px; | ||
display: inline-block; | ||
padding: 0; | ||
margin: 0; | ||
width: 10em; | ||
vertical-align: middle; | ||
color: #242424; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] .label, | ||
button.color-scheme[role="switch"][aria-checked="true"] .on { | ||
color: #fff; | ||
color: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg { | ||
display: inline-block; | ||
width: 36px; | ||
height: 20px; | ||
position: relative; | ||
top: 4px; | ||
display: inline-block; | ||
width: 36px; | ||
height: 20px; | ||
position: relative; | ||
top: 4px; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg rect { | ||
fill: #a1a1a1; | ||
stroke-width: 2; | ||
stroke: #757575; | ||
fill: #a1a1a1; | ||
stroke-width: 2; | ||
stroke: #757575; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg circle.off { | ||
display: block; | ||
stroke: #757575; | ||
fill: #fff; | ||
fill-opacity: 1; | ||
display: block; | ||
stroke: #757575; | ||
fill: #fff; | ||
fill-opacity: 1; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg circle.on { | ||
display: none; | ||
display: none; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] svg rect { | ||
fill: #36c; | ||
stroke: #36c; | ||
fill: #36c; | ||
stroke: #36c; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] svg circle.off { | ||
display: none; | ||
display: none; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] svg circle.on { | ||
display: block; | ||
stroke: #fff; | ||
fill: #fff; | ||
fill-opacity: 1; | ||
display: block; | ||
stroke: #fff; | ||
fill: #fff; | ||
fill-opacity: 1; | ||
} | ||
|
||
button.color-scheme[role="switch"] span.off { | ||
display: inline-block; | ||
display: inline-block; | ||
} | ||
|
||
button.color-scheme[role="switch"] span.on { | ||
display: none; | ||
display: none; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] span.off { | ||
display: none; | ||
display: none; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"] span.on { | ||
display: inline-block; | ||
display: inline-block; | ||
} | ||
|
||
button.color-scheme[role="switch"]:focus, | ||
button.color-scheme[role="switch"]:hover { | ||
padding: 2px 2px 6px 6px; | ||
border-width: 2px; | ||
outline: none; | ||
cursor: pointer; | ||
padding: 2px 2px 6px 6px; | ||
border-width: 2px; | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
|
||
button.color-scheme[role="switch"][aria-checked="true"]:focus, | ||
button.color-scheme[role="switch"][aria-checked="true"]:hover { | ||
border-color: #add8e6; | ||
border-color: #add8e6; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
|
||
button.color-scheme[role="switch"] { | ||
background-color: #333; | ||
color: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"] .label { | ||
color: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg rect { | ||
fill: #36c; | ||
stroke: #36c; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg circle.off, | ||
button.color-scheme[role="switch"] svg circle.on { | ||
fill: #fff; | ||
stroke: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"]:focus, | ||
button.color-scheme[role="switch"]:hover { | ||
border-color: #add8e6; | ||
} | ||
button.color-scheme[role="switch"] { | ||
background-color: #333; | ||
color: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"] .label { | ||
color: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg rect { | ||
fill: #36c; | ||
stroke: #36c; | ||
} | ||
|
||
button.color-scheme[role="switch"] svg circle.off, | ||
button.color-scheme[role="switch"] svg circle.on { | ||
fill: #fff; | ||
stroke: #fff; | ||
} | ||
|
||
button.color-scheme[role="switch"]:focus, | ||
button.color-scheme[role="switch"]:hover { | ||
border-color: #add8e6; | ||
} | ||
} |