restore usercss section numbering and applies-to gaps

regressed in f9e11f58
This commit is contained in:
tophf 2022-01-31 01:27:30 +03:00
parent 84f4262176
commit b2bc18c3d5
2 changed files with 5 additions and 8 deletions

View File

@ -419,6 +419,7 @@ input:invalid {
.single-editor .applies-to > label::before { .single-editor .applies-to > label::before {
content: attr(data-index) ":"; content: attr(data-index) ":";
margin-right: 0.25rem; margin-right: 0.25rem;
font-size: 12px;
} }
.code-label[data-text] { .code-label[data-text] {
font-weight: bold; font-weight: bold;
@ -579,9 +580,11 @@ body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-high
.applies-to label { .applies-to label {
font-size: 0; font-size: 0;
padding: 0; padding: 0;
line-height: var(--input-height);
}
.section-editor .applies-to label {
margin-left: -24px; margin-left: -24px;
position: absolute; position: absolute;
line-height: var(--input-height);
} }
.compact-layout .applies-to label { .compact-layout .applies-to label {
display: none; display: none;
@ -1010,15 +1013,9 @@ body.linter-disabled .hidden-unless-compact {
margin: 1em 0; margin: 1em 0;
padding: .75rem calc(.25rem + var(--cm-bar-width, 0)) .25rem .75rem; padding: .75rem calc(.25rem + var(--cm-bar-width, 0)) .25rem .75rem;
} }
.CodeMirror-linewidget .applies-to li {
margin: 0;
}
.CodeMirror-linewidget .applies-to li[data-type="regexp"] .test-regexp { .CodeMirror-linewidget .applies-to li[data-type="regexp"] .test-regexp {
display: inline; display: inline;
} }
.CodeMirror-linewidget li.applies-to-everything { .CodeMirror-linewidget li.applies-to-everything {
margin-left: 0.2rem; margin-left: 0.2rem;
} }

View File

@ -43,7 +43,7 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) {
enabled = true; enabled = true;
TPL = { TPL = {
container: container:
$create('div' + C_CONTAINER, [ $create('div' + C_CONTAINER, {title: t('appliesHelp')}, [
$create(C_LABEL, t('appliesLabel')), $create(C_LABEL, t('appliesLabel')),
$create('ul' + C_LIST), $create('ul' + C_LIST),
]), ]),