diff --git a/edit/edit.css b/edit/edit.css index 5afd7bd4..d1a0c7e1 100644 --- a/edit/edit.css +++ b/edit/edit.css @@ -28,22 +28,18 @@ body { } /************ checkbox & select************/ -#options > div[class="option"] { +.options-column > div[class="option"] { margin-bottom: 4px; } -#options > div.option:nth-last-of-type(7) { - margin-bottom: 12px; -} - -#options > div.option:nth-last-of-type(7) + .usercss-only { - margin-top: -8px; - margin-bottom: 12px; +.options-column > .usercss-only { + margin-bottom: .75rem; } label { padding-left: 16px; position: relative; + white-space: nowrap; } /************ header ************/ @@ -154,7 +150,7 @@ label { margin: -2px 0 0 .1rem; } .svg-inline-wrapper.applies-to-help { - margin: -2px 0 0 .25rem; + margin: 0 0 0 .25rem; } .aligned .svg-inline-wrapper { margin: -2px 0 0 .3rem; @@ -191,8 +187,8 @@ input:invalid { align-items: center; margin-left: -13px; cursor: pointer; - margin-top: 8px; - margin-bottom: 8px; + margin-top: .5rem; + margin-bottom: .5rem; } #header summary h2 { @@ -210,8 +206,18 @@ input:invalid { margin-top: -3px; } -#actions { - margin-bottom: .5rem; +#actions > * { + display: inline-flex; + flex-wrap: wrap; +} + +#mozilla-format-buttons { + display: flex; + flex-wrap: wrap; +} + +#actions button { + margin: 0 .2rem .5rem 0; } #options:not([open]) + #lint h2 { @@ -248,16 +254,23 @@ input:invalid { /************ content ***********/ #sections > div { margin: 0.7rem; - padding: 1rem; + padding: 1rem 1rem .3rem; +} +#sections > div:first-of-type { + padding: 0 1rem .3rem; } #sections > div:not(:first-of-type) { - border-top: 2px solid black; + border-top: 2px solid hsl(0, 0%, 80%); } #sections > div:only-of-type .remove-section { display: none; } -#sections > div > button:not(:first-of-type) { - margin-left: 0.2rem; +.edit-actions { + display: flex; + flex-wrap: wrap; +} +.edit-actions button { + margin: 0 .2rem .5rem 0; } .dirty > label::before { content: "*"; @@ -358,27 +371,39 @@ body[data-match-highlight="selection"] .CodeMirror-selection-highlight-scrollbar /* applies-to */ .applies-to { display: flex; + align-items: flex-start; + min-height: 30px; + flex-wrap: wrap; } .applies-to label { - flex: auto; - margin-top: 0.2rem; + display: flex; + padding: 0; + height: 22px; + align-items: center; + margin: 0 .2em 0 0; + white-space: nowrap; } .applies-to ul { flex: auto; - flex-grow: 99; + flex-grow: 1; margin: 0; padding: 0; } .applies-to li { display: flex; + flex-wrap: wrap; list-style-type: none; align-items: center; - margin-bottom: 0.35rem; } -.applies-to li > *:not(button):not(.select-resizer) { - flex: auto; +.applies-to li.applies-to-everything { + align-items: unset; + line-height: 22px; +} +.applies-to li > input { min-height: 1.4rem; - margin-left: 0.35rem; +} +.applies-to li:not(.applies-to-everything) > * { + margin: 0 .2rem .5rem 0; } html:not(.usercss) .applies-to li .add-applies-to { visibility: hidden; @@ -391,12 +416,34 @@ html:not(.usercss) .applies-to li:last-child .add-applies-to { margin-left: 1rem; } .applies-to li .applies-value { - flex-grow: 99; + flex-grow: 1; padding-left: 0.2rem; } .applies-to img { vertical-align: bottom; } +.add-applies-to, +.remove-applies-to { + font-size: 0; + height: 22px; + width: 22px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +} +.add-applies-to .svg-icon, +.remove-applies-to .svg-icon { + pointer-events: none; + fill: hsl(0, 0%, 60%); + height: 12px; + width: 12px; +} +.add-applies-to:hover .svg-icon, +.remove-applies-to:hover .svg-icon { + pointer-events: none; + fill: hsl(0, 0%, 0%); +} .test-regexp { display: none; } @@ -716,20 +763,25 @@ html:not(.usercss) .usercss-only, } /************ reponsive layouts ************/ -@media(max-width: 850px) { +@media(max-width: 800px) { + body { + display: flex; + flex-direction: column; + } #header { - width: auto; - height: auto; + flex: 0 1 auto; + height: unset; + width: unset; position: inherit; border-right: none; border-bottom: 1px dashed #AAA; min-height: var(--header-narrow-min-height); - max-height: 50vh; - flex-wrap: wrap; - flex-direction: row; + padding: 0; } - #header section:not(:last-child) { - margin-bottom: .5rem; + #actions { + padding: 0 1rem; + margin: 0; + box-sizing: border-box; } #header input[type="checkbox"] { vertical-align: middle; @@ -739,41 +791,39 @@ html:not(.usercss) .usercss-only, display: none; } #basic-info { + padding: .5rem 1rem; + margin: 0; + box-sizing: border-box; display: flex; - align-items: baseline; - flex: 1; - margin-right: 2em; - } - #basic-info > * { - flex: auto; + flex-wrap: wrap; } #basic-info > *:first-child { - flex-grow: 99; - display: flex; + flex-grow: 1; } #basic-info > *:not(:last-child) { margin-right: 0.8rem; } #basic-info #name { - width: auto; - flex-grow: 99; + flex-grow: 1; } #actions { - margin-top: 0; + display: flex; + flex-wrap: wrap; white-space: nowrap; } - #actions > * { - display: inline-block; + #options-wrapper { + display: flex; + flex-wrap: wrap; + padding: .5rem 1rem; + box-sizing: border-box; } - #options { - -webkit-column-count: 3; - -moz-column-count: 3; - column-count: 3; - width: 100%; + .options-column { + flex-grow: 1; + padding-right: .5rem; + box-sizing: border-box; } #options:not([open]), #lint:not([open]) { - column-count: 1; overflow: initial; } #options:not([open]) + #lint:not([open]) { @@ -787,13 +837,13 @@ html:not(.usercss) .usercss-only, margin-bottom: 0; } #options summary { - margin-top: -.25em; + margin-left: 0; + padding-left: 4px; } #options h2 { margin: 0 0 .5em; } .option label { - line-height: 1.25rem; margin: 0; } #options [type="number"] { @@ -807,6 +857,9 @@ html:not(.usercss) .usercss-only, #options:not([open]) ~ #lint { margin-top: -1em; } + #header summary { + margin-bottom: 0; + } #lint > div { margin-top: 0; } @@ -821,9 +874,10 @@ html:not(.usercss) .usercss-only, } #sections { padding-left: 0; + flex: 1; } #sections > div { - padding: 0; + padding: .5rem 0 0; } #sections > *:not(h2) { padding-left: 0.4rem; @@ -838,24 +892,4 @@ html:not(.usercss) .usercss-only, #help-popup.big { left: 3rem; } -} - -@media (max-width: 720px) { - #options { - -webkit-column-count: 2; - -moz-column-count: 2; - column-count: 2; - } -} - -@media (max-width: 450px) { - #options { - -webkit-column-count: 1; - -moz-column-count: 1; - column-count: 1; - } - #actions { - flex-wrap: wrap; - white-space: normal; - } -} +} \ No newline at end of file