Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: Source/WebCore/css/html.css

Issue 14096013: Implement select element list box with shadow DOM. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@shadowselect
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/css/html.css
diff --git a/Source/WebCore/css/html.css b/Source/WebCore/css/html.css
index ddbe56c52d38653bb2fc9620f6872ac63daaab12..86a1c0be7506f69de69e2e06c1dfb32f512f9f35 100644
--- a/Source/WebCore/css/html.css
+++ b/Source/WebCore/css/html.css
@@ -937,31 +937,48 @@ select {
cursor: default;
}
-select[size],
-select[multiple],
-select[size][multiple] {
- -webkit-appearance: listbox;
+select:-webkit-any([size]:not([size="0"]):not([size="1"]), [multiple]) {
+ -webkit-appearance: none;
-webkit-align-items: flex-start;
border: 1px inset gray;
border-radius: initial;
white-space: initial;
-}
-
-select[size="0"],
-select[size="1"] {
- -webkit-appearance: menulist;
- -webkit-align-items: center;
- border: 1px solid;
- border-radius: 5px;
- white-space: pre;
+ overflow-x: hidden;
+ overflow-y: scroll;
+ vertical-align: text-bottom;
+ -webkit-user-select: none;
+ white-space: nowrap;
}
optgroup {
font-weight: bolder;
+ display: block;
}
option {
font-weight: normal;
+ display: block;
+ padding: 0 2px 1px 2px;
+}
+
+optgroup option {
+ padding-left: calc(2px + 1.3em);
+}
+
+select option:checked {
+ background-color: activelistboxselection;
+}
+
+select:not(:disabled) option:checked:not(:disabled) {
+ color: activelistboxselectiontext;
+}
+
+select:not(:focus) option:checked {
+ background-color: inactivelistboxselection;
+}
+
+select:not(:focus):not(:disabled) option:checked:not(:disabled) {
+ color: inactivelistboxselectiontext;
}
output {

Powered by Google App Engine
This is Rietveld 408576698