-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(#4049): Express theme should render a border on Popovers and Dialogs with forced-colors: active #4050
fix(#4049): Express theme should render a border on Popovers and Dialogs with forced-colors: active #4050
Changes from 1 commit
4f27e9d
fab73b1
83885fb
4e2fffd
547b6f1
e035bc5
e670de7
57bc561
796778f
baf2ea0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,3 +143,10 @@ only screen and (max-device-height: 350px) { | |
transform: none; | ||
} | ||
} | ||
|
||
@media (forced-colors: active) { | ||
.spectrum-Modal:not(.spectrum-Modal--fullscreenTakeover) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we can make this generic and give it a border-color variable that is transparent |
||
border-style: solid; | ||
border-width: var(--spectrum-alias-border-size-thin); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,8 +145,15 @@ governing permissions and limitations under the License. | |
} | ||
} | ||
|
||
|
||
@media (forced-colors: active) { | ||
.spectrum-Popover { | ||
overflow: hidden; | ||
/* With a popover that contains a menu, | ||
the menu scrolls. Add overflow: hidden, | ||
so the menu's scrollbar doesn't overflow the | ||
the popover's border-radius in the corners. */ | ||
&:has(> [class*='spectrum-Menu-popover']) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
also i'd prefer not to do partial classname matches, it defeats the purpose of CSS modules and will break should we ever obfuscate the name by hashing the whole thing. this is not idle speculation, this is something we are about to do do we need to pass a classname from this file down? or can this be made more general and exist outside of forced-colors and should just be on every popover? i suspect that it can based on my earlier comments There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
overflow: hidden; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,12 @@ governing permissions and limitations under the License. | |
.spectrum-Rule--small { | ||
background-color: var(--spectrum-rule-small-background-color); | ||
} | ||
|
||
@media (forced-colors: active) { | ||
.spectrum-Rule { | ||
forced-color-adjust: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see this doing anything? at least, not in chrome's emulation of forced colors There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should render the rule. Without |
||
--spectrum-rule-large-background-color: CanvasText; | ||
--spectrum-rule-medium-background-color: CanvasText; | ||
--spectrum-rule-small-background-color: CanvasText; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,3 +94,10 @@ | |
border-radius: var(--spectrum-tray-border-radius); | ||
} | ||
} | ||
|
||
@media (forced-colors: active) { | ||
.spectrum-Tray { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think you're missing an |
||
border-width: var(--spectrum-alias-border-size-thin); | ||
border-style: solid solid none; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a real reason to have this behind forced colors media query? or can this just be general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it could be general, but it gets tricky, because we have dialogs that render within popovers, like
.spectrum-Popover .spectrum-Dialog
.