Giter Site home page Giter Site logo

Comments (4)

illright avatar illright commented on June 2, 2024

I need to see how you link fonts to the application to investigate the issue. Could you please provide a short reproduction of the issue, perhaps in StackBlitz or a repository?

from attractions.

zPhoeniqz avatar zPhoeniqz commented on June 2, 2024

I thought I could just make an @import statement to my font in the theme.scss file and then @forward the _variables with $font set to my imported font. But three days later and maybe a tiny bit smarter I think that the reason you can't do that is something related to SCSS. I think SCSS doesn't forward the imported stuff to another file even if it's needed there. It would still be nice to have an optiion of setting a custom font though, but it's understandable that there isn't one (yet).


theme.scss:

@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

@forward '~attractions/_variables' with (
$main: #1e3799,
$font: "'Varela Round', sans-serif"
);




The only kind of solution I found is doing following in the app.html:


<style>
	@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

	* {
		font-family: 'Varela Round', sans-serif !important;
	}
</style>

But the problem with this one is that it doesn't set the font explicitly for the attractions components like $font would.

from attractions.

illright avatar illright commented on June 2, 2024

The trick here is to link the font in the HTML using a <link> tag (example) and then use its name in the $font variable (example).

from attractions.

aabounegm avatar aabounegm commented on June 2, 2024

Since there haven't been any replies on this issue for 2 weeks, I'll assume the issue is resolved

from attractions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.