attractions
attractions copied to clipboard
Font is missing
For the correct font-family
to work, I put Ubuntu
font from Google fonts in <head></head>
. However, I don't see it being documented anywhere. Is font supposed to be shipped with library?
It's not supposed to be shipped with the library. I agree that not having an explicit mention in the docs is a bit of a miss. We'll add that shortly. Thanks for the heads up!
Thank you for great UI library :)
You're welcome :)
I'll keep the issue open for now to act as a reminder
Guess I'm stuck here now. I added this to static/css/theme.scss
`@forward '~attractions/_variables' with ( $main: red, //only here for testing, it works $font: "'Ubuntu-Medium', sans-serif", );
@font-face { font-family: sans-serif; src: url('../fonts/Ubuntu/Ubuntu-Medium.ttf') format('ttf'); }`
I can't make the font to load up. Whats the deal?
I imagine you need to specify the name for your font face. See the MDN docs on @font-face
I added
@forward '~attractions/_variables' with ($main: rgb(128, 66, 76),
$font: "'Ubuntu', sans-serif",
);
@font-face {
font-family: 'Ubuntu', sans-serif;
// src: url('../fonts/Ubuntu/Ubuntu-Medium.ttf') format('ttf');
src: url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');
}
to my theme file, unfortunately no go. It does indeed work in the individual elementsas tested in a +page.svelte
in node_modules/attractions/_variables.scss
line three declares $font
to be Ubuntu
@use 'sass:color';
$font: 'Ubuntu', sans-serif !default;
$main: #4300b0 !default;
I can just declare the font for each element, but that excludea H1
etc. How do I go about this?
This is a different problem, off-topic to this issue that you're commenting on. Could you please open a new issue?