avoid startup flicker in applies-to widget

This commit is contained in:
tophf 2021-09-21 14:24:17 +03:00
parent 05bc4301ad
commit 94f727dc09
2 changed files with 4 additions and 0 deletions

View File

@ -589,6 +589,9 @@ body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-high
align-items: flex-start;
min-height: 30px;
flex-wrap: wrap;
background-color: #f7f7f7; /* .CodeMirror-gutters */
border: solid #bbb;
border-width: 1px 0;
}
.applies-to.error {
background-color: #f002;

View File

@ -130,6 +130,7 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) {
}
finder.on(update);
requestAnimationFrame(updateWidgetStyle);
cm.display.wrapper.style.setProperty('--cm-bar-width', cm.display.barWidth + 'px');
}
function destroy() {