Skip to content

Commit c31402c

Browse files
Kateryna ProkopenkoDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Update Recorder toolbar select combobox
Bug: 368246828 Change-Id: I019b63690964fa41f110a575614597f18c8c9540 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5973699 Commit-Queue: Kateryna Prokopenko <[email protected]> Auto-Submit: Kateryna Prokopenko <[email protected]> Reviewed-by: Kim-Anh Tran <[email protected]>
1 parent e39230d commit c31402c

File tree

3 files changed

+45
-26
lines changed

3 files changed

+45
-26
lines changed

front_end/panels/recorder/recorderController.css

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,30 +55,50 @@ devtools-create-recording-view {
5555
}
5656

5757
select {
58-
border-radius: 2px;
59-
border: 1px solid transparent;
60-
height: 24px;
58+
appearance: none;
59+
user-select: none;
60+
border: none;
61+
border-radius: var(--sys-shape-corner-extra-small);
62+
height: var(--sys-size-9);
6163
max-width: 180px;
6264
min-width: 140px;
63-
padding: 0 5px;
65+
padding: 0 var(--sys-size-6) 0 var(--sys-size-5);
6466
position: relative;
6567
color: var(--sys-color-on-surface);
6668
background-color: var(--sys-color-cdt-base-container);
6769
text-overflow: ellipsis;
68-
}
69-
70-
select:disabled {
71-
color: var(--sys-color-state-disabled);
72-
}
73-
74-
select:not([disabled]):hover,
75-
select:not([disabled]):focus-visible,
76-
select:not([disabled]):active {
77-
background-color: var(--sys-color-state-hover-on-subtle);
78-
}
79-
80-
select:not([disabled]):focus-visible {
81-
box-shadow: 0 0 0 2px var(--sys-color-state-focus-ring);
70+
background-image: var(--combobox-dropdown-arrow);
71+
background-position: right center;
72+
background-repeat: no-repeat;
73+
74+
&:hover {
75+
background-color: var(--sys-color-state-hover-on-subtle);
76+
}
77+
78+
&:active {
79+
background-color: var(--sys-color-state-ripple-neutral-on-subtle);
80+
}
81+
82+
&:hover:active {
83+
/* stylelint-disable plugin/use_theme_colors */
84+
background:
85+
var(--combobox-dropdown-arrow),
86+
linear-gradient(var(--sys-color-state-hover-on-subtle), var(--sys-color-state-hover-on-subtle)),
87+
linear-gradient(var(--sys-color-state-ripple-neutral-on-subtle), var(--sys-color-state-ripple-neutral-on-subtle));
88+
/* stylelint-enable plugin/use_theme_colors */
89+
background-position: right center;
90+
background-repeat: no-repeat;
91+
}
92+
93+
&:disabled {
94+
pointer-events: none;
95+
color: var(--sys-color-state-disabled);
96+
background-color: var(--sys-color-state-disabled-container);
97+
}
98+
99+
&:focus-visible {
100+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
101+
}
82102
}
83103

84104
select option {

front_end/ui/legacy/designTokens.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,10 @@
106106
--sys-typescale-body4-line-height: 16px;
107107
--sys-typescale-body5-line-height: 16px;
108108
--sys-typescale-monospace-line-height: 1.2;
109+
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-light);
110+
}
111+
112+
.theme-with-dark-background,
113+
:host-context(.theme-with-dark-background) {
114+
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-dark);
109115
}

front_end/ui/legacy/inspectorCommon.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,11 @@ input::placeholder {
390390
font: inherit;
391391
margin: 0;
392392
outline: none;
393-
padding: 0 var(--sys-size-4) 0 var(--sys-size-5);
393+
padding: 0 var(--sys-size-9) 0 var(--sys-size-5);
394394
background-image: var(--combobox-dropdown-arrow);
395395
background-color: var(--sys-color-surface);
396396
background-position: right center;
397397
background-repeat: no-repeat;
398-
399-
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-light);
400398
}
401399

402400
.chrome-select:disabled {
@@ -406,11 +404,6 @@ input::placeholder {
406404
background-color: var(--sys-color-state-disabled-container);
407405
}
408406

409-
.theme-with-dark-background .chrome-select,
410-
:host-context(.theme-with-dark-background) .chrome-select {
411-
--combobox-dropdown-arrow: var(--image-file-arrow-drop-down-dark);
412-
}
413-
414407
.chrome-select:enabled {
415408
&:hover {
416409
background-color: var(--sys-color-state-hover-on-subtle);

0 commit comments

Comments
 (0)