Fix: avoid extra space when there is no rule

This commit is contained in:
eight04 2021-12-05 00:41:14 +08:00
parent 78c24900a0
commit 2c38de08c2
2 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,10 @@
display: grid;
grid-template-columns: minmax(min-content, 1fr) min-content;
grid-gap: .3em;
margin: .3em 0;
margin: 0 0 .3em 0;
}
[data-length="0"] .rule-table {
margin: 0;
}
.radio-group .form-label {
display: block;

View File

@ -69,6 +69,7 @@ function StyleSettings(editor) {
if (!style[type]) {
style[type] = [];
}
container.dataset.length = style[type].length;
style[type].forEach((rule, i) => {
const input = document.createElement('input');
input.value = rule;