mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
Hextra's production build bundles assets/css/custom.css into
css/compiled/main.css. The original '../fonts/' relative path resolved
correctly from css/custom.css (dev) but landed at css/fonts/ in
production — one directory too deep.
Fix: use '../../fonts/' so the URL resolves correctly from every
output location browsers may encounter:
dev: /css/custom.css → ../../fonts/ → /fonts/
production: /css/compiled/main.css → ../../fonts/ → /fonts/
GH Pages: /Bose-SoundTouch/css/compiled/main.css
→ ../../fonts/ → /Bose-SoundTouch/fonts/
Browsers clamp traversal at the origin root, so going two levels up
from /css/custom.css still reaches /fonts/ — safe in dev, correct in
production.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.4 KiB
CSS
47 lines
1.4 KiB
CSS
/* Font paths use ../../fonts/ (two levels up) so the URL resolves correctly
|
|
regardless of where the CSS is served from:
|
|
- dev: /css/custom.css → ../../fonts/ → /fonts/
|
|
- production: /css/compiled/main.css → ../../fonts/ → /fonts/
|
|
- GH Pages: /Bose-SoundTouch/css/compiled/main.css
|
|
→ ../../fonts/ → /Bose-SoundTouch/fonts/ */
|
|
|
|
@font-face {
|
|
font-family: 'Noto Sans';
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
font-display: swap;
|
|
src: url('../../fonts/noto-sans-v42-latin-regular.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Noto Sans';
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
font-display: swap;
|
|
src: url('../../fonts/noto-sans-v42-latin-italic.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Noto Sans';
|
|
font-style: normal;
|
|
font-weight: 700;
|
|
font-display: swap;
|
|
src: url('../../fonts/noto-sans-v42-latin-700.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Noto Sans';
|
|
font-style: italic;
|
|
font-weight: 700;
|
|
font-display: swap;
|
|
src: url('../../fonts/noto-sans-v42-latin-700italic.woff2') format('woff2');
|
|
}
|
|
|
|
:root {
|
|
--hx-default-font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
}
|
|
|
|
.content {
|
|
font-family: var(--hx-default-font-family);
|
|
}
|