From b2bc18c3d58a45370804a8ae811e566b84bf187a Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 31 Jan 2022 01:27:30 +0300 Subject: [PATCH] restore usercss section numbering and applies-to gaps regressed in f9e11f58 --- edit/edit.css | 11 ++++------- edit/moz-section-widget.js | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/edit/edit.css b/edit/edit.css index 8cf9740d..dd371877 100644 --- a/edit/edit.css +++ b/edit/edit.css @@ -419,6 +419,7 @@ input:invalid { .single-editor .applies-to > label::before { content: attr(data-index) ":"; margin-right: 0.25rem; + font-size: 12px; } .code-label[data-text] { font-weight: bold; @@ -579,9 +580,11 @@ body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-high .applies-to label { font-size: 0; padding: 0; + line-height: var(--input-height); +} +.section-editor .applies-to label { margin-left: -24px; position: absolute; - line-height: var(--input-height); } .compact-layout .applies-to label { display: none; @@ -1010,15 +1013,9 @@ body.linter-disabled .hidden-unless-compact { margin: 1em 0; 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 { display: inline; } - .CodeMirror-linewidget li.applies-to-everything { margin-left: 0.2rem; } diff --git a/edit/moz-section-widget.js b/edit/moz-section-widget.js index 2bd91c3a..d22313a7 100644 --- a/edit/moz-section-widget.js +++ b/edit/moz-section-widget.js @@ -43,7 +43,7 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) { enabled = true; TPL = { container: - $create('div' + C_CONTAINER, [ + $create('div' + C_CONTAINER, {title: t('appliesHelp')}, [ $create(C_LABEL, t('appliesLabel')), $create('ul' + C_LIST), ]),