djhtml
djhtml copied to clipboard
SCSS indentation
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.
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 ).
👀