Dark mode and CSS refactors for inputs

This commit is contained in:
Justin Edmund 2022-12-05 19:47:23 -08:00
parent 2ee8060c63
commit 0f99cd878c
6 changed files with 44 additions and 24 deletions

View file

@ -1,15 +1,19 @@
.Limited {
background: $grey-100;
border-radius: 6px;
border: 2px solid transparent;
$offset: 2px;
background: var(--input-bg);
border-radius: $input-corner;
border: $offset solid transparent;
box-sizing: border-box;
display: flex;
gap: $unit;
padding-right: $unit * 2;
padding-top: 2px;
padding-bottom: 2px;
padding-right: calc($unit-2x - $offset);
&:focus-within {
border: 2px solid $blue;
box-shadow: 0 2px rgba(255, 255, 255, 1);
border: $offset solid $blue;
// box-shadow: 0 2px rgba(255, 255, 255, 1);
}
.Counter {
@ -21,6 +25,7 @@
.Input {
background: transparent;
border-radius: 0;
padding-left: calc($unit-2x - $offset);
&:focus {
outline: none;

View file

@ -5,17 +5,14 @@
padding: 0;
margin: 0;
.Input {
input {
-webkit-font-smoothing: antialiased;
background-color: var(--input-bg);
border: none;
background-color: $grey-100;
border-radius: 6px;
box-sizing: border-box;
color: $grey-10;
display: block;
font-size: $font-regular;
padding: 12px 16px;
padding: ($unit * 1.5) $unit-2x;
width: 100%;
}
@ -29,6 +26,6 @@
::placeholder {
/* Chrome, Firefox, Opera, Safari 10.1+ */
color: #a9a9a9 !important;
color: var(--text-tertiary) !important;
opacity: 1; /* Firefox */
}

View file

@ -25,6 +25,10 @@
.SelectIcon {
display: flex;
align-items: center;
svg {
fill: var(--icon-secondary);
}
}
}

View file

@ -1,6 +1,18 @@
.Fieldset textarea {
color: $grey-10;
font-family: system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial,
sans-serif;
$offset: 2px;
background-color: var(--input-bg);
border: $offset solid transparent;
border-radius: $input-corner;
box-sizing: border-box;
color: var(--text-primary);
display: block;
line-height: 21px;
-webkit-font-smoothing: antialiased;
padding: $unit-2x calc($unit-2x - $offset);
&:focus-within {
border: $offset solid $blue;
outline: none;
}
}

View file

@ -1,3 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.93618 4.62991C2.73179 4.44423 2.41557 4.4594 2.22989 4.6638C2.04421 4.8682 2.05938 5.18441 2.26378 5.37009L6.65743 9.36145C6.72962 9.42702 6.81576 9.46755 6.90516 9.48353C7.05808 9.51688 7.2243 9.47812 7.34882 9.3647L11.7346 5.36964C11.9388 5.18368 11.9535 4.86745 11.7676 4.6633C11.5816 4.45916 11.2654 4.44441 11.0612 4.63037L7.00447 8.32569L2.93618 4.62991Z" fill="black"/>
<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.93618 4.62991C2.73179 4.44423 2.41557 4.4594 2.22989 4.6638C2.04421 4.8682 2.05938 5.18441 2.26378 5.37009L6.65743 9.36145C6.72962 9.42702 6.81576 9.46755 6.90516 9.48353C7.05808 9.51688 7.2243 9.47812 7.34882 9.3647L11.7346 5.36964C11.9388 5.18368 11.9535 4.86745 11.7676 4.6633C11.5816 4.45916 11.2654 4.44441 11.0612 4.63037L7.00447 8.32569L2.93618 4.62991Z" />
</svg>

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 508 B

View file

@ -1,5 +1,5 @@
@import "~meyer-reset-scss";
@import "themes.scss";
@import '~meyer-reset-scss';
@import 'themes.scss';
html {
background-color: var(--background);
@ -10,7 +10,7 @@ html {
body {
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
font-family: system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial,
font-family: system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial,
sans-serif;
font-size: 1.4rem;
height: 100%;
@ -58,9 +58,11 @@ a {
}
button,
input {
font-family: system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial,
input,
textarea {
font-family: system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial,
sans-serif;
font-size: $font-regular;
}
h1,
@ -79,7 +81,7 @@ h1 {
select {
appearance: none;
background-color: var(--input-bound-bg);
background-image: url("/icons/Arrow.svg");
background-image: url('/icons/Arrow.svg');
background-repeat: no-repeat;
background-position-y: center;
background-position-x: 97%;