mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Migrate all <img>-based icons to inline SVG via PHP helper
Replace every <img src="/assets/icons/..."> with <?= icon('name') ?>
across 26 template files. The PHP helper inlines the SVG markup into the
DOM so CSS color cascades naturally through fill="currentColor".
- Add src/icon.php helper: reads SVG file, sets width/height to 1em,
injects aria-hidden, supports optional CSS class
- Fix 12 icon SVGs that had hardcoded fill="#000000" or missing fill attr
- Replace search.svg with Phosphor fill-based magnifying glass
- Add explicit SVG sizes for admin header nav icons (16px/20px)
- Scope public search icon CSS to form[role=search]:not(.header-search-form)
to avoid breaking admin header layout; change stroke to fill
- Remove <img> filter: brightness(0) invert(1) hacks from admin.css
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
}
|
||||
.admin-body header nav ul [data-nav-logout] a svg {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* Public-site link icon in admin nav */
|
||||
@@ -40,6 +42,11 @@
|
||||
column-gap: 0.4em;
|
||||
}
|
||||
|
||||
.admin-body header nav .nav-logo svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
|
||||
.admin-body main {
|
||||
flex: 1;
|
||||
|
||||
@@ -3,6 +3,21 @@
|
||||
Root class: .header-search-wrap
|
||||
============================================================ */
|
||||
|
||||
/* Public search bar icon (in partials/search-bar.php) */
|
||||
/* Scoped to forms that are NOT inside .header-search-wrap */
|
||||
form[role="search"]:not(.header-search-form) > svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
fill: var(--text-tertiary);
|
||||
margin-right: var(--space-2xs);
|
||||
}
|
||||
|
||||
form[role="search"]:not(.header-search-form) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-search-wrap {
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
@@ -23,7 +38,7 @@
|
||||
left: var(--space-s);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
stroke: var(--accent-primary);
|
||||
fill: var(--accent-primary);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user