mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
The file had accumulated severe corruption in its lower half (garbled selector text, variable names spliced into property values, orphaned declarations, broken nesting) alongside hardcoded hex colours throughout. Rewrote the entire file cleanly: - Every colour is now a var() referencing a token defined in variables.css: --accent-primary/secondary/foreground, --accent-blue/green/yellow/red, --bg-secondary/tertiary, --border-primary, --text-primary/secondary/tertiary, --error, --warning, --success, --accent-muted. - Zero raw hex values remain in admin.css. - Removed the corrupted/dead CSS from the bottom half and reconstructed all selectors from what the templates actually use (audited via grep). - Fixed structural issues: broken border shorthand, nested rules that were not valid CSS, orphaned declaration blocks. - New/restored rules: .admin-maintenance-bar (was corrupted), .status-access variants (was corrupted), .admin-section-title--danger, .admin-danger-zone, .admin-account-status (all reconstructed cleanly). - .admin-btn--warning and .admin-btn--danger now use var(--accent-yellow) and var(--accent-red) instead of hardcoded dark hex values. - .admin-btn-remove hover now uses var(--error) instead of #e55. - .admin-btn-unpublish now uses var(--bg-secondary)/var(--text-tertiary) instead of hardcoded grey hex values. - select option background colours removed (browser chrome, not styleable cross-platform). Templates: replace 4 inline var(--admin-text-muted) with var(--text-secondary) in index.php, thanks.php, import.php.
CSS Architecture
File Structure
- variables.css - CSS custom properties (variables) for colors and theme values
- colors.css - Reference documentation of all color values used in the project
- common.css - Shared styles: reset, header/nav, search bar, accessibility utilities
- main.css - Home page styles
- admin.css - Admin section styles
- system.css - System page styles
- search.css - Search/Directory page styles
- apropos.css - About page styles
- tfe.css - Individual thesis page styles
- easymde.min.css - EasyMDE editor styles (minified, third-party)
- modern-normalize.min.css - Modern normalize reset (minified, third-party)
Imports
All CSS files automatically import variables.css to access CSS custom properties.
Variables
Shared Variables (public pages)
--purple,--purple-dark,--purple-light- Purple palette--black,--white- Base colors--grey-light- Light grey background--border-color- Border color--text-muted- Muted text color
Admin Variables
--admin-bg,--admin-bg-alt- Background colors--admin-border- Border color--admin-text,--admin-text-muted- Text colors--admin-purple- Accent color--admin-input-bg- Input background