Skip to content

Commit 39da434

Browse files
committed
CSS: Set contain on kint dumps to help client side performance
The contain and content-visibility properties are very new and can actually break rendering entirely in different circumstances for different browsers. For now we'll stick to good old display:none and just hope contain implementations get good enough to give us some perf down the line.
1 parent 9d3a86b commit 39da434

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

build/kint.phar

390 Bytes
Binary file not shown.

resources/compiled/aante-dark.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/compiled/aante-light.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/compiled/original.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/compiled/solarized-dark.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/compiled/solarized.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/sass/_base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
white-space: nowrap;
2727
background: var(--backdrop-color);
2828
direction: ltr;
29+
contain: content;
2930

3031
&.kint-folder {
3132
position: fixed;
@@ -152,10 +153,12 @@
152153
dt.kint-parent + dd {
153154
display: none;
154155
border-left: 1px dashed var(--border-color);
156+
contain: strict;
155157
}
156158

157159
dt.kint-parent.kint-show + dd {
158160
display: block;
161+
contain: content;
159162
}
160163

161164
// Other styles
@@ -370,9 +373,11 @@
370373

371374
&.kint-tab-contents > li {
372375
display: none;
376+
contain: strict;
373377

374378
&.kint-show {
375379
display: block;
380+
contain: content;
376381
}
377382
}
378383
}

0 commit comments

Comments
 (0)