CSS containment was buggy in Chrome before 58.0.3004

fixes #355
This commit is contained in:
tophf 2018-02-28 05:04:35 +03:00
parent 85f5f72832
commit 6b0628a7ee
2 changed files with 24 additions and 14 deletions

View File

@ -325,17 +325,10 @@ select {
.newUI .entry { .newUI .entry {
display: table-row; display: table-row;
contain: strict;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.newUI .entry.can-update,
.newUI .entry.update-problem,
.newUI .entry.update-done {
contain: none;
}
.newUI .entry.odd { .newUI .entry.odd {
background-color: rgba(128, 128, 128, 0.05); background-color: rgba(128, 128, 128, 0.05);
} }
@ -345,11 +338,9 @@ select {
margin: 0; margin: 0;
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
contain: content;
} }
.newUI .entry .actions { .newUI .entry .actions {
contain: none;
position: relative; position: relative;
} }
@ -626,7 +617,6 @@ select {
box-sizing: border-box; box-sizing: border-box;
padding-right: 1rem; padding-right: 1rem;
line-height: 18px; line-height: 18px;
contain: layout style;
} }
.newUI .applies-to .expander { .newUI .applies-to .expander {
@ -665,7 +655,6 @@ select {
backface-visibility: hidden; backface-visibility: hidden;
opacity: .25; opacity: .25;
display: none; display: none;
contain: layout style size;
} }
.newUI .has-favicons .target { .newUI .has-favicons .target {

View File

@ -604,19 +604,40 @@ function switchUI({styleOnly} = {}) {
.newUI .targets { .newUI .targets {
max-height: ${newUI.targets * 18}px; max-height: ${newUI.targets * 18}px;
} }
` + (newUI.faviconsGray ? ` ` + (newUI.faviconsGray ? `
.newUI .target img { .newUI .target img {
-webkit-filter: grayscale(1); -webkit-filter: grayscale(1);
filter: grayscale(1); filter: grayscale(1);
opacity: .25; opacity: .25;
} }
` : ` ` : `
.newUI .target img { .newUI .target img {
-webkit-filter: none; -webkit-filter: none;
filter: none; filter: none;
opacity: 1; opacity: 1;
} }
`); `) + (CHROME >= 3004 ? `
.newUI .entry {
contain: strict;
}
.newUI .entry > * {
contain: content;
}
.newUI .entry .actions {
contain: none;
}
.newUI .target {
contain: layout style;
}
.newUI .target img {
contain: layout style size;
}
.newUI .entry.can-update,
.newUI .entry.update-problem,
.newUI .entry.update-done {
contain: none;
}
` : '');
if (styleOnly) { if (styleOnly) {
return; return;