Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably missing forward declaration for mixins #3813

Open
sequilox opened this issue May 4, 2024 · 0 comments
Open

Probably missing forward declaration for mixins #3813

sequilox opened this issue May 4, 2024 · 0 comments

Comments

@sequilox
Copy link

sequilox commented May 4, 2024

This is about Bulma.

I am not quite sure if this is a bug or a feature (i.e. done on purpose).

Overview of the problem

I'm using Bulma 1.0.0
This is a Sass issue: I'm using version [1.0.0]
I am sure this issue is not a duplicate

Description

If I only include the main Bulma file (@use bulma/sass/_index.scss), I cannot use mixins like the following:

@include mixins.until(451px)
    font-size: 75%

Steps to Reproduce

Create your own sample.sass file and use a Bulma mixin:

@use bulma/sass/_index.scss

.sample
    @include mixins.until(451px)
        font-size: 75%

Expected behavior

It works, i.e., the corresponding CSS is compiled.

Actual behavior

 Error: Undefined mixin.
    ╷
   │ ┌     @include mixins.until(451px)
   │ └         font-size: 75%
    ╵

Workaround

Create your own sample.sass file and use a Bulma mixin:

@use bulma/sass/_index.scss
@use bulma/sass/utilities/mixins.scss

.sample
    @include mixins.until(451px)
        font-size: 75%

Solution

Actual Forwarding Chain

bulma/sass/_index.scss --> bulma/sass/utilities/_index.scss -///-> bulma/sass/utilities/mixins.scss

Expected Forwarding Chain

bulma/sass/_index.scss --> bulma/sass/utilities/_index.scss --> bulma/sass/utilities/mixins.scss

Maybe there is some good reason for it, but I would forward mixins.scss inside bulma/sass/utilities/_index.scss:

@forward "mixins"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant