roots / docs

📝 Documentation for Roots projects
https://roots.io/docs/
168 stars 183 forks source link

Update to `src: url('~@fonts...` in fonts-setup.md #503

Closed taylorgorman closed 4 months ago

taylorgorman commented 6 months ago

src: url('@fonts/FontFile.woff2') failed for me with error "Module not found: Error: Can't resolve './@fonts/FontFile.woff2' in 'resources/styles'". Per this forum post, I found prefixing with ~, which worked for me.

I should say, I am working with .scss files, not .css as this document references ("Define your @font-face in styles/common/fonts.css:") and I have not tested ~@fonts with a .css file. But I wanted to propose this change nonetheless.

Thanks!

retlehs commented 4 months ago

Thanks for the PR, but I'd like to keep that file clear of any Sass specific notes

It's briefly mentioned on https://roots.io/sage/docs/sass/ and I'd be open to clarifying that a bit more on that page