Skip to content

Commit 6ae704d

Browse files
committed
Use container query for fixed table layout
1 parent 1ed7c2e commit 6ae704d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

packages/block-library/src/table/style.scss

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.wp-block-table {
2+
container-type: inline-size;
23
$subtle-light-gray: #f3f4f5;
34
$subtle-pale-green: #e9fbe5;
45
$subtle-pale-blue: #e7f5fe;
@@ -27,13 +28,15 @@
2728
}
2829

2930
// Fixed layout toggle
30-
.has-fixed-layout {
31-
table-layout: fixed;
32-
width: 100%;
33-
34-
td,
35-
th {
36-
word-break: break-word;
31+
@container (min-width: 600px) {
32+
.has-fixed-layout {
33+
table-layout: fixed;
34+
width: 100%;
35+
36+
td,
37+
th {
38+
word-break: break-word;
39+
}
3740
}
3841
}
3942

0 commit comments

Comments
 (0)