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

SCSS indentation #94

Open
DmytroLitvinov opened this issue Mar 20, 2023 · 2 comments
Open

SCSS indentation #94

DmytroLitvinov opened this issue Mar 20, 2023 · 2 comments

Comments

@DmytroLitvinov
Copy link
Contributor

Related to #81

Hi @JaapJoris ,

Upgraded to 3.0.6 version and receive next indentation problem:

BEFORE:

.btn-secondary {
  @include button-variant(
    $secondary,
    $secondary,
    $color: $white,
    $hover-background: $primary,
    $hover-border: $primary,
    $hover-color: $white,
    $active-background: $primary,
    $active-border: $primary,
    $active-color: $white,
    $disabled-background: $primary,
    $disabled-border: $primary,
    $disabled-color: $white
  )
}

AFTER:

.btn-secondary {
  @include button-variant(
    $secondary,
    $secondary,
    $color: $white,
            $hover-background: $primary,
                       $hover-border: $primary,
                   $hover-color: $white,
                  $active-background: $primary,
                        $active-border: $primary,
                    $active-color: $white,
                   $disabled-background: $primary,
                          $disabled-border: $primary,
                      $disabled-color: $white
  )
}

You already mentioned possible solution to that case.

@JaapJoris
Copy link
Member

The problem is that DjCSS treats text between ( and ) no different than ordinary attribute/value pairs in CSS. Note that the following:

@font-face {
    src: url('Arial.woff2') format('woff2'),
         url('Arial.woff') format('woff');
}

is consistent with the following, from DjCSS's perspective:

@include button-outline-variant(
    $color: $white,
            $hover-background;
)

This is a hard problem, but I think it can be fixed by special-casing stuff between ( and ).

@JaapJoris JaapJoris changed the title [3.0.6] SCSS indentation SCSS indentation Jan 22, 2024
@SaulHormazabal
Copy link

👀

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

3 participants