mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
114 lines
3.8 KiB
CSS
114 lines
3.8 KiB
CSS
/* ============================================================
|
|
FORMS — Base input, select, textarea, fieldset, legend
|
|
styling shared across admin + public pages.
|
|
Root: element selectors (universal form styling)
|
|
============================================================ */
|
|
|
|
/* ── Labels ─────────────────────────────────────────────────────────── */
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: var(--space-3xs);
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* ── Text inputs, selects, textareas ────────────────────────────────── */
|
|
|
|
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]),
|
|
textarea {
|
|
font-family: inherit;
|
|
font-size: var(--step--1);
|
|
padding: var(--space-2xs) var(--space-xs);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius);
|
|
background: transparent;
|
|
color: var(--text-primary);
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):focus,
|
|
textarea:focus {
|
|
outline: none;
|
|
border: 2px solid var(--accent-primary);
|
|
}
|
|
|
|
input::placeholder,
|
|
textarea::placeholder {
|
|
color: var(--text-tertiary);
|
|
font-size: var(--step--1);
|
|
}
|
|
|
|
textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ── Select ─────────────────────────────────────────────────────────── */
|
|
|
|
select {
|
|
font-family: inherit;
|
|
font-size: var(--step--1);
|
|
padding: var(--space-2xs) var(--space-xs);
|
|
padding-right: 1.75rem;
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius);
|
|
background: transparent;
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 0.55rem center;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
select:focus {
|
|
outline: none;
|
|
border: 2px solid var(--accent-primary);
|
|
}
|
|
|
|
/* ── Checkboxes & radios ────────────────────────────────────────────── */
|
|
|
|
input[type="checkbox"],
|
|
input[type="radio"] {
|
|
accent-color: var(--accent-primary);
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
input[type="radio"] { border-radius: 50%; }
|
|
|
|
/* ── Fieldsets & legends ──────────────────────────────────────────────── */
|
|
|
|
fieldset {
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius);
|
|
padding: 0 var(--space-m) var(--space-m) var(--space-m);
|
|
margin: 0;
|
|
}
|
|
|
|
fieldset > *:not(:last-child) { margin-bottom: var(--space-xs); }
|
|
|
|
legend {
|
|
font-size: var(--step--1);
|
|
font-weight: 400;
|
|
letter-spacing: 0.04em;
|
|
text-transform: uppercase;
|
|
color: var(--text-secondary);
|
|
padding: 0 var(--space-2xs);
|
|
}
|
|
|
|
/* ── Small / help text ──────────────────────────────────────────────────── */
|
|
|
|
small {
|
|
font-size: var(--step--2);
|
|
color: var(--text-secondary);
|
|
display: block;
|
|
margin-top: var(--space-3xs);
|
|
}
|