Dark mode, work in progress.

This commit is contained in:
Manuel Friedli 2024-01-28 02:05:01 +01:00
parent 59fdaed9f9
commit 77d57f089c
Signed by: manuel
GPG Key ID: 41D08ABA75634DA1
5 changed files with 56 additions and 75 deletions

View File

@ -2,38 +2,43 @@
margin: 0 0 1em 0; margin: 0 0 1em 0;
padding: 0; padding: 0;
text-align: center; text-align: center;
&.error { &.error {
> .arrow_box { > .arrow_box {
border-color: red; border-color: red;
&:before { &:before {
border-top-color: red; border-top-color: red;
} }
} }
select { select {
color: red; color: red;
transition: background-color ease-in-out 200ms, color ease-in-out 200ms;
} }
} }
} }
.select { .select {
background-color: #fff; background-color: #eee;
border: none; border: none;
color: #000; color: #111;
font-family: "ABeeZee", sans-serif; font-family: "ABeeZee", sans-serif;
margin: 0; margin: 0;
padding: 0.5em; padding: 0.5em;
&:focus, &:hover {
background-color: #fff;
color: #000;
}
transition: background-color ease-in-out 200ms, color ease-in-out 200ms;
} }
.arrow_box { .arrow_box {
position: relative; position: relative;
background: #fff; border: 1px solid transparent;
border: 1px solid #aaa;
&:focus {
border-color: #888;
}
&:hover {
border-color: #333;
}
&:after, &:before { &:after, &:before {
top: 100%; top: 100%;
left: 50%; left: 50%;
@ -43,32 +48,28 @@
width: 0; width: 0;
position: absolute; position: absolute;
pointer-events: none; pointer-events: none;
transition: background-color ease-in-out 200ms, border ease-in-out 200ms;
} }
&:after { &:after {
border-color: rgba(255, 255, 255, 0); border-color: rgba(255, 255, 255, 0);
border-top-color: #fff; border-top-color: #eee;
border-width: 1em; border-width: 1em;
margin-left: -1em; margin-left: -1em;
} }
&:before { &:before {
border-color: rgba(170, 170, 170, 0);
border-top-color: #aaa;
border-width: calc(1em + 1px); border-width: calc(1em + 1px);
margin-left: calc(-1em - 1px); margin-left: calc(-1em - 1px);
} }
&:focus:before {
border-color: rgba(136, 136, 136, 0); &:has(>.select:focus, >.select:hover):after {
border-top-color: #888; border-top-color: #fff;
}
&:hover:before {
border-color: rgba(51, 51, 51, 0);
border-top-color: #333;
} }
.selectwrapper > & { .selectwrapper > & {
display: inline-block; display: inline-block;
} }
}
.option { transition: background-color ease-in-out 200ms, border ease-in-out 200ms;
/* font-family: "ABeeZee", sans-serif;*/
} }

View File

@ -1,4 +1,2 @@
<div class="textwrapper arrow_box"> <textarea (keyup)="update(step)" placeholder="Please enter your input ..."
<textarea class="textinput" (keyup)="update(step)" placeholder="Please enter your input ..." [(ngModel)]="step.content">{{ step.content }}</textarea>
[(ngModel)]="step.content">{{step.content}}</textarea>
</div>

View File

@ -1,69 +1,44 @@
.textwrapper { :host {
display: block;
border: none;
margin: 0 0 1em 0; margin: 0 0 1em 0;
padding: 0 1em 0 0; padding: 0 1em 0 0;
}
.arrow_box {
position: relative; position: relative;
background: #fff;
border: 1px solid #aaa; &:after {
&:focus {
border-color: #888;
}
&:hover {
border-color: #333;
}
&:after, &:before {
top: 100%; top: 100%;
left: 50%; left: 50%;
border: solid transparent; border: 1em solid transparent;
border-top-color: #eee;
content: " "; content: " ";
height: 0; height: 0;
width: 0; width: 0;
position: absolute; position: absolute;
pointer-events: none; pointer-events: none;
}
&:after {
border-color: rgba(255, 255, 255, 0);
border-top-color: #fff;
border-width: 1em;
margin-left: -1em; margin-left: -1em;
transition: border-top-color ease-in-out 200ms;
} }
&:before {
border-color: rgba(170, 170, 170, 0); &:has(>textarea:focus, >textarea:hover):after {
border-top-color: #aaa; border-top-color: #fff;
border-width: calc(1em + 1px);
margin-left: calc(-1em - 1px);
}
&:focus:before {
border-color: rgba(136, 136, 136, 0);
border-top-color: #888;
}
&:hover:before {
border-color: rgba(51, 51, 51, 0);
border-top-color: #333;
} }
} }
.textinput { textarea {
background-color: #fff; background-color: #eee;
border: none; border: none;
color: #000; color: #111;
font-family: "Free Monospaced", monospace; font-family: "Liberation Mono", monospace;
height: 10em; height: 10em;
margin: 0; margin: 0;
padding: 0.5em; padding: 0.5em;
resize: vertical; resize: vertical;
width: 100%; width: 100%;
&:focus {
border-color: #888;
}
&:hover {
border-color: #333;
}
}
.errormessage { &:focus, &:hover {
color: red; background-color: #fff;
text-align: center; color: #000;
}
transition: background-color ease-in-out 200ms, color ease-in-out 200ms;
} }

Binary file not shown.

View File

@ -21,9 +21,16 @@
font-style: normal; font-style: normal;
} }
@font-face {
font-family: "Liberation Mono";
src: url("assets/fonts/liberationmono-regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
body { body {
background-color: white; background-color: #222;
color: black; color: #eee;
font-family: "ABeeZee", sans-serif; font-family: "ABeeZee", sans-serif;
margin: 0; margin: 0;
padding: 1em 0 0 0; padding: 1em 0 0 0;