locomotivemtl / locomotive-boilerplate

🚂 Front-end boilerplate for projects by Locomotive.
https://locomotivemtl-boilerplate.vercel.app/
MIT License
458 stars 71 forks source link

Build a single font-face family #124

Closed 8mist closed 2 years ago

8mist commented 2 years ago

Proposed changes

To be able to build a single family of font-faces, It's must to check whether the $font-faces list is separated by spaces or by commas.


For example:

$font-faces: (
    "Webfont Sans" "webfont-sans_regular" 400 normal
)

Types of changes


Editorial note

  1. Fixes support for building a single font family using $font-faces by fixing iteration of that global variable in the font-faces mixin.

    Because Sass accepts commas, spaces, and slashes as list separators, when $font-faces contained only one family (<font-name> <font-file-basename> <font-weight> <font-style>), it would iterate each segment of the family instead of the tuple as a whole.

mcaskill commented 2 years ago

@GregoireCiles Thanks! I've merged this pull request but while fixing a rebase conflict, it appears to have lost reference to this pull request.

Maybe if you rebase your fix/scss-build-font-faces branch to e8af2200, it will mark this branch as merged.