Component improvements

This commit is contained in:
Filip Znachor 2023-10-23 15:46:10 +02:00
parent 9a4bff99c5
commit 82fd7b5a5e
3 changed files with 8 additions and 6 deletions

View file

@ -6,12 +6,13 @@
.btn { .btn {
background-color: var(--synergy-btn-bg); background-color: var(--synergy-btn-bg);
padding: 9px 16px; padding: 9px .8rem;
border: 0; border: 0;
color: var(--synergy-text-color); color: var(--synergy-text-color);
font: inherit; font: inherit;
font-weight: 700; font-weight: 700;
font-size: 1rem; font-size: 1rem;
line-height: 1.25;
border-radius: var(--synergy-border-radius); border-radius: var(--synergy-border-radius);
transition: .2s background-color; transition: .2s background-color;
cursor: pointer; cursor: pointer;
@ -40,7 +41,7 @@
} }
.btn:focus-visible { .btn:focus-visible {
box-shadow: 0 0 0 5px var(--synergy-btn-bg); box-shadow: 0 0 0 5px var(--synergy-focus-highlight);
} }
.btn.btn-primary:focus-visible { .btn.btn-primary:focus-visible {

View file

@ -29,7 +29,7 @@ label.cbox > input + *::before {
height: 1rem; height: 1rem;
border-radius: 50%; border-radius: 50%;
aspect-ratio: 1 / 1; aspect-ratio: 1 / 1;
border: 2px solid var(--synergy-border); border: var(--synergy-border-width) solid var(--synergy-border);
transition: background .1s, box-shadow .2s; transition: background .1s, box-shadow .2s;
background: var(--synergy-bg); background: var(--synergy-bg);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);

View file

@ -7,8 +7,8 @@
.inp label { .inp label {
position: absolute; position: absolute;
top: 9px; top: 7px;
left: 7px; left: 5px;
font-size: 1rem; font-size: 1rem;
font-weight: 700; font-weight: 700;
transform-origin: 0 0; transform-origin: 0 0;
@ -20,6 +20,7 @@
border-radius: 10px; border-radius: 10px;
line-height: 1.2rem; line-height: 1.2rem;
color: var(--synergy-label); color: var(--synergy-label);
margin: var(--synergy-border-width);
} }
.inp :is( .inp :is(
@ -30,7 +31,7 @@
.inp :is(input, textarea):focus + label { .inp :is(input, textarea):focus + label {
color: var(--synergy-label-active); color: var(--synergy-label-active);
transform: scale(.8); transform: scale(.8);
top: -.6rem; top: -.7rem;
} }
/* Common styles */ /* Common styles */