Skip to content

Commit 40986f3

Browse files
authored
fix: use CSS Canvas system colour for code-window background (#26)
1 parent 85feb3b commit 40986f3

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Bug Fixes
6+
7+
- fix: use CSS `Canvas` system colour so code-window chrome and body render against the page background, not a parent container's background.
8+
59
## 1.1.1 (2026-04-13)
610

711
### Bug Fixes

_extensions/code-window/style.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
.code-with-filename {
1111
margin: 1.5em 0;
1212
border-radius: 8px;
13-
border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
13+
border: 1px solid color-mix(in srgb, currentColor 15%, Canvas);
14+
background-color: Canvas;
1415
overflow: hidden;
1516
page-break-inside: avoid;
1617
break-inside: avoid;
@@ -21,9 +22,9 @@
2122
display: flex;
2223
align-items: center;
2324
gap: 0.75em;
24-
background-color: color-mix(in srgb, currentColor 5%, transparent);
25+
background-color: color-mix(in srgb, currentColor 5%, Canvas);
2526
border: none;
26-
border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
27+
border-bottom: 1px solid color-mix(in srgb, currentColor 15%, Canvas);
2728
border-radius: 0;
2829
padding: 0.2em 1em;
2930
line-height: 1.2;
@@ -47,7 +48,7 @@
4748
border: none;
4849
font-size: 0.85em;
4950
font-weight: 500;
50-
color: color-mix(in srgb, currentColor 50%, transparent);
51+
color: color-mix(in srgb, currentColor 50%, Canvas);
5152
}
5253

5354
/* Code block content area */

0 commit comments

Comments
 (0)