-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix visual design issues with combobox examples 1-3
Part of #1255.
- Loading branch information
Showing
9 changed files
with
111 additions
and
108 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"media-feature-name-whitelist": ["forced-colors", "-ms-high-contrast"] | ||
} | ||
} |
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
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
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
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,36 +1,107 @@ | ||
.annotate { | ||
font-style: italic; | ||
color: #366ed4; | ||
} | ||
|
||
.combobox-list { | ||
position: relative; | ||
} | ||
|
||
.combobox-inline label, | ||
.combobox-list label { | ||
.combobox .group { | ||
display: inline-flex; | ||
} | ||
|
||
.combobox .group input, | ||
.combobox .group button { | ||
background-color: white; | ||
color: black; | ||
box-sizing: border-box; | ||
height: 1.5rem; | ||
padding: 0 0.25em; | ||
margin: 0; | ||
padding: 0; | ||
display: block; | ||
vertical-align: bottom; | ||
border: 1px solid gray; | ||
} | ||
|
||
.combobox-list .group input, | ||
.combobox-list .group button { | ||
display: inline; | ||
background-color: #eee; | ||
.combobox .group input { | ||
width: 10rem; | ||
border-right: none; | ||
border-top-left-radius: 3px; | ||
border-bottom-left-radius: 3px; | ||
outline: none; | ||
} | ||
|
||
.combobox .group button { | ||
width: 1.5rem; | ||
border-left: none; | ||
border-top-right-radius: 3px; | ||
border-bottom-right-radius: 3px; | ||
outline: none; | ||
font-size: 85%; | ||
} | ||
|
||
.combobox-list .group input.focus { | ||
.combobox .group.focus input, | ||
.combobox .group.focus button { | ||
background-color: #d6e8f5; | ||
outline-color: #348ccb; | ||
border-color: #348ccb; | ||
} | ||
|
||
.combobox .group.focus { | ||
outline: 2px solid black; | ||
outline-offset: 1px; | ||
} | ||
|
||
.combobox-list .group button { | ||
ul[role="listbox"] { | ||
margin: 0; | ||
padding: 0 0.125em 0 0.125em; | ||
position: relative; | ||
top: 1px; | ||
left: -2px; | ||
font-size: 85%; | ||
padding: 0; | ||
position: absolute; | ||
left: 0; | ||
top: 1.5rem; | ||
list-style: none; | ||
background-color: #eee; | ||
display: none; | ||
box-sizing: border-box; | ||
border: 1px gray solid; | ||
border-radius: 3px; | ||
max-height: 12em; | ||
width: 11.5rem; | ||
overflow: scroll; | ||
overflow-x: hidden; | ||
} | ||
|
||
ul[role="listbox"] li[role="option"] { | ||
margin: 0; | ||
padding: 0; | ||
padding-left: 0.125em; | ||
border-top: 1px solid transparent; | ||
border-bottom: 1px solid transparent; | ||
} | ||
|
||
[role="listbox"].focus { | ||
border-color: #348ccb; | ||
} | ||
|
||
[role="listbox"] [role="option"] { | ||
display: block; | ||
margin: 0.25em; | ||
padding: 0; | ||
background-color: #eee; | ||
font-size: 100%; | ||
} | ||
|
||
/* focus and hover styling */ | ||
|
||
[role="listbox"] [role="option"][aria-selected="true"] { | ||
background-color: #ccc; | ||
} | ||
|
||
[role="listbox"].focus [role="option"][aria-selected="true"] { | ||
background-color: #aed2ea; | ||
border-color: #348ccb; | ||
} | ||
|
||
@media (forced-colors: active), (-ms-high-contrast: active) { | ||
[role="listbox"].focus [role="option"][aria-selected="true"] { | ||
background-color: highlight; | ||
color: highlighttext; | ||
} | ||
} | ||
|
||
[role="listbox"] li[role="option"]:hover { | ||
background-color: #c2ddef; | ||
} |
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,8 +1,3 @@ | ||
.annotate { | ||
font-style: italic; | ||
color: #366ed4; | ||
} | ||
|
||
.hidden { | ||
display: none; | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
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
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