Show validation errors

This commit is contained in:
Misode
2020-06-16 15:37:01 +02:00
parent 2d29de7903
commit 8cbb5fc776
6 changed files with 119 additions and 6 deletions

View File

@@ -111,6 +111,7 @@ body {
-o-tab-size: 4;
-webkit-tab-size: 4;
outline: none;
resize: none;
}
.source-controls {
@@ -168,6 +169,41 @@ body {
border-top-left-radius: 0px;
}
.errors {
position: absolute;
bottom: 0;
right: 17px;
margin: 5px;
border-radius: 3px;
}
.errors.hidden .error-list {
display: none;
}
.error {
display: flex;
align-items: center;
padding: 7px;
}
.error span {
padding-left: 11px;
}
.errors .toggle {
padding: 2px;
width: 36px;
height: 36px;
align-self: flex-end;
cursor: pointer;
user-select: none;
}
.errors .toggle.toggled {
padding: 6px;
}
@media screen and (max-width: 580px) {
body {
overflow-y: hidden;
@@ -293,6 +329,12 @@ body {
background-color: #5d5f5fa6;
}
.errors {
background-color: #f13000c5;
color: #000000cc;
fill: #000000cc;
}
/* DARK MODE */
body[data-style=dark] .container,
@@ -350,3 +392,9 @@ body[data-style=dark] .btn.selected {
body[data-style=dark] .btn:hover {
background-color: #383838a6;
}
body[data-style=dark] .errors {
background-color: #f13000c5;
color: #ffffffcc;
fill: #ffffffcc;
}

View File

@@ -67,7 +67,8 @@
border-bottom-left-radius: 3px;
}
.node-header > *:last-child {
.node-header > *:last-child,
.node-header[data-error] > *:nth-last-child(2) {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
@@ -120,6 +121,13 @@ button.remove::before {
content: url('./images/trash.svg');
}
.node-header[data-error] > svg {
border: none;
height: 34px;
width: 34px;
padding: 6px;
}
.node-body {
display: flex;
flex-direction: column;
@@ -175,6 +183,10 @@ button.remove {
background-color: #e76f51;
}
.node-header[data-error] > svg {
fill: #e76f51;
}
.node-body {
border-color: #b9b9b9 !important;
transition: border-color var(--style-transition);
@@ -239,6 +251,10 @@ body[data-style=dark] button.remove {
background-color: #b64023;
}
body[data-style=dark] .node-header[data-error] > svg {
fill: #b64023;
}
body[data-style=dark] .node-body {
border-color: #454749 !important;
}