We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
=ltr-property($property, $spacing, $deprecated: null) @if $deprecated != null $pos: "left" @if $deprecated $pos: "right" @warn "The third argument of ltr-property was deprecated, use the full name of the property instead" +ltr-property($property+"-"+$pos, $spacing) @else @if $rtl @if str-index($property, 'left') #{str-replace($property, 'left', 'right')}: $spacing @else if str-index($property, 'right') #{str-replace($property, 'right', 'left')}: $spacing @else if str-index($property, 'border-radius') @if type-of($spacing) == 'list' @if length($spacing) == 2 #{$property}: nth($spacing, 2) nth($spacing, 1) @else if length($spacing) == 3 #{$property}: nth($spacing, 2) nth($spacing, 1) nth($spacing, 2) nth($spacing, 3) @else if length($spacing) == 4 #{$property}: nth($spacing, 2) nth($spacing, 1) nth($spacing, 4) nth($spacing, 3) @else @warn "Invalid usage of ltr-property" @else @warn "Invalid usage of ltr-property" @else if type-of($spacing) == 'list' and length($spacing) == 4 #{$property}: nth($spacing, 1) nth($spacing, 4) nth($spacing, 3) nth($spacing, 2) @else +ltr-property($property, $spacing, true) //Warn of deprecated use @else @if not str-index($property, 'left') and not str-index($property, 'right') and type-of($spacing) != 'list' +ltr-property($property, $spacing, true) //Warn of deprecated use @else #{$property}: $spacing
When lint fixing this file the output is
Notice how one else block lost it's indentation, this then causes a parse error
Edit:
Additional information, it seems this is caused by the warn block, I have found a workaround
=ltr-property($property, $spacing, $deprecated: null) @if $deprecated != null $pos: "left" @if $deprecated $pos: "right" @warn "The third argument of ltr-property was deprecated, use the full name of the property instead" +ltr-property($property+"-"+$pos, $spacing) @else @if $rtl @if str-index($property, 'left') #{str-replace($property, 'left', 'right')}: $spacing @else if str-index($property, 'right') #{str-replace($property, 'right', 'left')}: $spacing @else if str-index($property, 'border-radius') @if type-of($spacing) == 'list' @if length($spacing) == 2 #{$property}: nth($spacing, 2) nth($spacing, 1) @else if length($spacing) == 3 #{$property}: nth($spacing, 2) nth($spacing, 1) nth($spacing, 2) nth($spacing, 3) @else if length($spacing) == 4 #{$property}: nth($spacing, 2) nth($spacing, 1) nth($spacing, 4) nth($spacing, 3) @else @warn "Invalid usage of ltr-property" //We need a comment here or linter poops itself @else @warn "Invalid usage of ltr-property" @else if type-of($spacing) == 'list' and length($spacing) == 4 #{$property}: nth($spacing, 1) nth($spacing, 4) nth($spacing, 3) nth($spacing, 2) @else +ltr-property($property, $spacing, true) //Warn of deprecated use @else @if not str-index($property, 'left') and not str-index($property, 'right') and type-of($spacing) != 'list' +ltr-property($property, $spacing, true) //Warn of deprecated use @else #{$property}: $spacing
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reproduction
When lint fixing this file the output is
Notice how one else block lost it's indentation, this then causes a parse error
Edit:
Additional information, it seems this is caused by the warn block, I have found a workaround
Workaround
The text was updated successfully, but these errors were encountered: