Files
xamxam/public/assets/css/common.css
Pontoporeia a5ee9b162f Replace site-search BEM classes with semantic header form[role="search"] selectors
CSS: .site-search → header form[role="search"],
     .site-search__icon → header form[role="search"] svg,
     .site-search__input → header form[role="search"] input,
     .site-search__input::placeholder → header form[role="search"] input::placeholder

HTML: Removed class="site-search", class="site-search__icon", and
class="site-search__input" from header.php and search-bar.php.
The form already uses role="search" and contains a single svg + input,
so the semantic selectors are unambiguous.
2026-04-01 15:55:12 +02:00

202 lines
3.9 KiB
CSS

@font-face {
font-family: "police1";
src: url("../fonts/Combinedd.otf");
font-display: swap;
}
/* ============================================================
SHARED VARIABLES & RESET
============================================================ */
:root {
--purple: #9557b5;
--purple-dark: #7b3fa0;
--purple-light: rgba(149, 87, 181, 0.12);
--black: #111;
--white: #fff;
--grey-light: #f5f5f5;
--border-color: #ddd;
--text-muted: #666;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
body {
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, sans-serif;
background: var(--white);
color: var(--black);
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration: none;
}
/* ============================================================
HEADER / NAV BAR (public pages)
============================================================ */
header {
flex-shrink: 0;
background: #3c856c;
background: linear-gradient(
180deg,
rgba(60, 133, 108, 1) 0%,
rgba(96, 236, 180, 1) 20%,
rgba(227, 144, 255, 1) 40%,
rgba(149, 87, 181, 1) 60%,
rgba(149, 87, 181, 1) 88%,
rgba(149, 87, 181, 0) 96%
);
}
header nav {
padding: 1rem 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
header nav > a {
font-family: "police1", sans-serif;
font-size: 0.95rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--white);
text-decoration: none;
/* font-weight: 400; */
}
header nav ul {
display: flex;
gap: 3rem;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
header nav ul a {
font-size: 0.85rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--white);
text-decoration: none;
/* font-weight: 400; */
transition: opacity 0.15s;
}
header nav ul a:hover {
opacity: 1;
}
header nav ul a[aria-current="page"] {
opacity: 1;
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
padding-bottom: 1px;
}
/* ============================================================
SEARCH BAR (shared)
============================================================ */
header form[role="search"] {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 1.5rem;
border: 1px solid #9557b5;
border-radius: 8px;
background: var(--white);
flex-shrink: 0;
color: #9557b5;
}
header form[role="search"] svg {
color: var(--text-muted);
flex-shrink: 0;
width: 16px;
height: 16px;
stroke: #9557b5;
}
header form[role="search"] input {
flex: 1;
border: none;
font-size: 0.95rem;
color: var(--black);
background: transparent;
padding: 0.15rem 0;
font-family: inherit;
}
header form[role="search"] input::placeholder {
color: #9557b5;
}
/* ============================================================
ACCESSIBILITY UTILITIES
============================================================ */
/* Visually-hidden but screen-reader-accessible */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Skip-to-content link (visible only on keyboard focus) */
.skip-link {
position: absolute;
top: -999px;
left: 1rem;
z-index: 9999;
padding: 0.5rem 1rem;
background: var(--purple);
color: var(--white);
font-size: 0.9rem;
font-weight: 600;
text-decoration: none;
border-radius: 0 0 4px 4px;
}
.skip-link:focus {
top: 0;
}
/* Consistent keyboard-focus outline for all interactive elements */
:focus-visible {
outline: 2px solid var(--purple);
outline-offset: 2px;
}
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}