Jieiku / abridge

Fast & Lightweight Zola Theme
https://abridge.pages.dev/
MIT License
147 stars 41 forks source link

Allow prepending font-family with user input #114

Closed eugenesvk closed 1 year ago

eugenesvk commented 1 year ago

Just one more function in case the users want to prioritize their custom font

Jieiku commented 1 year ago

Ah, good idea! Thank You.

Jieiku commented 1 year ago

@eugenesvk I rebased the refactor branch, trying to cleanup the git history. If it wont cause issues for you, could you delete your refactor branch https://github.com/eugenesvk/abridge/tree/refactor and pull the one from this repo.

Your commits and issue report inspired me to investigate advanced usage of use/include and now all variables can be overridden: https://github.com/Jieiku/abridge/blob/refactor/COPY-TO-ROOT-SASS/abridge.scss

Here is the fonts section:

https://github.com/Jieiku/abridge/blob/4cc9edc9ece7b855692d65fad29d3823036f5637/COPY-TO-ROOT-SASS/abridge.scss#L122-L128

eugenesvk commented 1 year ago

Tried that, but it errors during imports with a standalone/npm's sass compiler with Undefined mixin. @include dark($dark...);

think due to this rule https://sass-lang.com/documentation/modules/meta/#load-css

Unlike the @use rule: This doesn’t make any members from the loaded module available in the current module.

So when you

$path: "colors/" !default;
$color: "orange" !default;
@include meta.load-css(#{$path}#{$color});

you can't then use the dark mixin defined in that colors/orange module due to the rule quoted above, so I guess that requires going back to static imports @use "colors/orange" as colors; and then using colors.dark

P.S. though zola's seems to work fine, not sure why it ignores this meta.load-css rule