-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(list,menu): implement forced colors
PiperOrigin-RevId: 520501176
- Loading branch information
1 parent
2c1c80d
commit 712aab3
Showing
13 changed files
with
93 additions
and
31 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
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,23 @@ | ||
// | ||
// Copyright 2023 Google LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
// go/keep-sorted start | ||
@use './list-item'; | ||
// go/keep-sorted end | ||
|
||
@media (forced-colors: active) { | ||
:host { | ||
@include list-item.theme( | ||
( | ||
list-item-disabled-label-text-color: GrayText, | ||
list-item-disabled-label-text-opacity: 1, | ||
list-item-disabled-leading-icon-color: GrayText, | ||
list-item-disabled-leading-icon-opacity: 1, | ||
list-item-disabled-trailing-icon-color: GrayText, | ||
list-item-disabled-trailing-icon-opacity: 1, | ||
) | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// Copyright 2023 Google LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
@media (forced-colors: active) { | ||
.menu { | ||
border-style: solid; | ||
border-color: CanvasText; | ||
border-width: 1px; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// Copyright 2023 Google LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
@media (forced-colors: active) { | ||
.list-item { | ||
position: relative; | ||
} | ||
|
||
// Show double border only when selected, and the current list item does not | ||
// have a focus ring on it. | ||
:host([selected]) .list-item:not(:has(.focus-ring[visible]))::before { | ||
content: ''; | ||
position: absolute; | ||
inset: 0; | ||
box-sizing: border-box; | ||
border-radius: inherit; | ||
pointer-events: none; | ||
border: 3px double CanvasText; | ||
} | ||
} |
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
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,13 +1,13 @@ | ||
{ | ||
"capabilities": { | ||
"goog:chromeOptions": { | ||
"args": ["--window-position=0,0", "--window-size=3325,2215"] | ||
"args": ["--window-position=0,0", "--window-size=3400,2215"] | ||
}, | ||
"moz:firefoxOptions": { | ||
"args": ["-width=3325","-height=2215"] | ||
"args": ["-width=3400","-height=2215"] | ||
} | ||
}, | ||
"extension": { | ||
"xvfbResolution": "3325x2215x24" | ||
"xvfbResolution": "3400x2215x24" | ||
} | ||
} |