Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/block-editor/src/components/block-icon/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
&.has-colors {
svg {
fill: currentColor;

// Optimizate for high contrast modes.
// See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
@media (forced-colors: active) {
fill: CanvasText;
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@
svg {
fill: currentColor;
outline: none;

// Optimizate for high contrast modes.
// See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
@media (forced-colors: active) {
fill: CanvasText;
}
}

// Fixes a Safari+VoiceOver bug, where the screen reader text is announced not respecting the source order.
Expand Down
7 changes: 6 additions & 1 deletion packages/components/src/placeholder/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@
> svg,
.dashicon,
.block-editor-block-icon {
fill: currentColor;
margin-right: 1ch;
fill: currentColor;
// Optimizate for high contrast modes.
// See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
@media (forced-colors: active) {
fill: CanvasText;
}
}

// Don't take up space if the label is empty.
Expand Down