Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Move fonts to css/fonts and fix css path resolving #121

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Feb 6, 2024

When you import e.g. fonts in your scss like url(some/font.woff) the woff needs to be placed correctly, and especially the path needs to be set.

CSS does not allow dynamic URLs so we can not use our OC.filepath function but need to return a relative path to the CSS file that loaded the woff.

@susnux susnux added the 3. to review Ready to review label Feb 6, 2024
@susnux susnux requested review from skjnldsv and ShGKme February 6, 2024 10:23
@susnux susnux added the bug Something isn't working label Feb 6, 2024
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/css-assets-loading branch from 74e5896 to 177ef1b Compare February 6, 2024 10:26
@skjnldsv
Copy link
Contributor

skjnldsv commented Feb 6, 2024

Where do we import fonts?

@susnux
Copy link
Contributor Author

susnux commented Feb 6, 2024

Where do we import fonts?

An example is the viewer app where we import roboto for CI tests

@susnux
Copy link
Contributor Author

susnux commented Feb 6, 2024

But same with images e.g. if you have url('local/source/a.png' this needs to be handled correctly by vite.

@skjnldsv skjnldsv merged commit adc215c into main Feb 6, 2024
12 checks passed
@skjnldsv skjnldsv deleted the fix/css-assets-loading branch February 6, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants