You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The font is located at https://www.mydomain.com/fonts/... as you'd expect, and on my home page (mydomain.com/) it loads the font just fine, however, as soon as I navigate to /account or /x/y/z, the browser attempts to load the font relatively, i.e. from /account/fonts/... and /x/y/z/fonts/... even though I've clearly got a / at the beginning of the URL.
Whether I use not quotes at all (url(/fonts/...)) or quotes doesn't make a difference. I'd love to inspect the generated styles, but in dev, all I see for sources are <style> tags in Chrome Inspector (no generated .css file to inspect).
To be clear, if I set my URL to /test/fonts/... I do in fact see test in the URL's, so I know it is attempting to run that @font-face code.
Before I elaborate here, are any bells ringing for anyone? I've looked around on the web but haven't found anything about why this might be happening.
Details:
I'm transitioning a project from SCSS over to tailwind via fourseven:scss in a Meteor 2.16 application, using Blaze
My main.scss looks like this, and no matter where I move inclusion of _fonts.scss it seems to make no difference:
// Include tailwind.css stuff first, since it has a reset that our other styles will rely upon.
// The SASS styles below can override tailwind, yes, but are incredibly unlikely to do so,
// due to the naming convention we use
@tailwind base;
@tailwind components;
@tailwind utilities;
// Global
@import "{}/imports/ui/stylesheets/_fonts.scss"; // @font-face code above defined here
@import "{}/imports/ui/stylesheets/_blahblahblah.scss";
...
Any help would be greatly appreciated! Thank you kindly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all.
So in short, I'm migrating my app's CSS from SASS to Tailwind, and I can't get this font to load using an absolute path anymore:
The font is located at
https://www.mydomain.com/fonts/...
as you'd expect, and on my home page (mydomain.com/
) it loads the font just fine, however, as soon as I navigate to/account
or/x/y/z
, the browser attempts to load the font relatively, i.e. from/account/fonts/...
and/x/y/z/fonts/...
even though I've clearly got a/
at the beginning of the URL.Whether I use not quotes at all (
url(/fonts/...)
) or quotes doesn't make a difference. I'd love to inspect the generated styles, but in dev, all I see for sources are <style> tags in Chrome Inspector (no generated .css file to inspect).To be clear, if I set my URL to
/test/fonts/...
I do in fact seetest
in the URL's, so I know it is attempting to run that@font-face
code.Before I elaborate here, are any bells ringing for anyone? I've looked around on the web but haven't found anything about why this might be happening.
Details:
fourseven:scss
in aMeteor 2.16
application, usingBlaze
tailwind.config.js
file:fourseven:scss
&minifier-css@1.6.4
My
main.scss
looks like this, and no matter where I move inclusion of_fonts.scss
it seems to make no difference:Any help would be greatly appreciated! Thank you kindly.
Beta Was this translation helpful? Give feedback.
All reactions