frontend(styles): extract shared form styles into the SCSS library

This commit is contained in:
Andras Schmelczer 2026-05-31 10:49:26 +01:00
commit d50aa53a73
4 changed files with 56 additions and 108 deletions

View file

@ -1,106 +0,0 @@
.form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.field {
display: flex;
flex-direction: column;
gap: 0.35rem;
label {
font-size: 0.85rem;
font-weight: 500;
color: var(--text-muted);
font-family: var(--font-ui);
}
input[type='text'],
input[type='email'],
textarea {
width: 100%;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
font-family: var(--font-ui);
font-size: 0.95rem;
resize: vertical;
&:focus {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
}
&--checkbox {
flex-direction: row;
align-items: center;
label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
color: var(--text);
}
}
}
.actions {
display: flex;
gap: 0.75rem;
justify-content: flex-end;
padding-top: 0.5rem;
}
.btn {
padding: 0.5rem 1.25rem;
border-radius: 0.5rem;
border: none;
cursor: pointer;
font-size: 0.95rem;
font-family: var(--font-ui);
transition: background 0.15s;
&:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
&:disabled {
opacity: 0.45;
cursor: not-allowed;
}
&--primary {
background: var(--accent);
color: #fff;
&:hover:not(:disabled) {
background: var(--accent-dark);
}
}
&--secondary {
background: var(--surface-hover);
color: var(--text);
&:hover:not(:disabled) {
background: var(--border);
}
}
&--danger {
background: transparent;
color: #e53e3e;
border: 1px solid #e53e3e;
margin-right: auto;
&:hover:not(:disabled) {
background: rgba(229, 62, 62, 0.1);
}
}
}