more precise styling for del buttons and invalid fields
This commit is contained in:
parent
fcbb9d3580
commit
0e455387d5
|
@ -9,9 +9,10 @@
|
||||||
<style>
|
<style>
|
||||||
:root, html[data-theme='light'] {
|
:root, html[data-theme='light'] {
|
||||||
--width: 80rem;
|
--width: 80rem;
|
||||||
|
--danger: #cc0a00;
|
||||||
}
|
}
|
||||||
:invalid:not(form) {
|
:invalid:not(form) {
|
||||||
border-color: red;
|
border-color: var(--danger);
|
||||||
}
|
}
|
||||||
fieldset > div {
|
fieldset > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -31,6 +32,10 @@ fieldset select, input:not([type=checkbox]):not([type=radio]) {
|
||||||
width: initial;
|
width: initial;
|
||||||
min-width: 50%;
|
min-width: 50%;
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
button.del {
|
||||||
|
border-color: var(--danger);
|
||||||
|
color: var(--danger);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -87,6 +87,7 @@ class L3MultiSection {
|
||||||
let del = document.createElement('button');
|
let del = document.createElement('button');
|
||||||
del.setAttribute('type', 'button');
|
del.setAttribute('type', 'button');
|
||||||
del.addEventListener('click', () => this.removeSection(newsection, nodes));
|
del.addEventListener('click', () => this.removeSection(newsection, nodes));
|
||||||
|
del.classList.add('del');
|
||||||
del.innerHTML = 'Remove';
|
del.innerHTML = 'Remove';
|
||||||
nodes.append(del);
|
nodes.append(del);
|
||||||
|
|
||||||
|
@ -214,6 +215,7 @@ class L3MultiInput {
|
||||||
let div = newinput.node();
|
let div = newinput.node();
|
||||||
let delbutton = document.createElement('button');
|
let delbutton = document.createElement('button');
|
||||||
delbutton.setAttribute('type', 'button');
|
delbutton.setAttribute('type', 'button');
|
||||||
|
delbutton.classList.add('del');
|
||||||
delbutton.innerHTML = '-';
|
delbutton.innerHTML = '-';
|
||||||
delbutton.addEventListener('click', () => {
|
delbutton.addEventListener('click', () => {
|
||||||
this.removeInput(newinput, div);
|
this.removeInput(newinput, div);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user