Skip to content

Unexpected space-before-colon warning on @at-root :root #1153

Open
@Grawl

Description

@Grawl
➜ sass-lint -V
1.10.2
.sass-lint.yml  
files:
  include: 'app/assets/styles/**/*.{sass,scss}'
rules:
  attribute-quotes:
    - 1
    -
      include: true
  bem-depth:
    - 0
  border-zero:
    - 1
    -
      convention: none
  brace-style:
    - 1
    -
      style: stroustrup
      allow-single-line: false
  class-name-format:
    - 0
  clean-import-paths:
    - 1
    -
      leading-underscore: false
      filename-extension: false
  declarations-before-nesting:
    - 1
  empty-args:
    - 1
    -
      include: false
  empty-line-between-blocks:
    - 1
    -
      include: false
  extends-before-declarations:
    - 1
  extends-before-mixins:
    - 1
  final-newline:
    - 1
    -
      include: true
  force-attribute-nesting:
    - 0
  force-element-nesting:
    - 0
  force-pseudo-nesting:
    - 0
  function-name-format:
    - 0
  hex-length:
    - 0
  hex-notation:
    - 0
  id-name-format:
    - 0
  indentation:
    - 0
  leading-zero:
    - 1
    -
      include: true
  max-file-line-count:
    - 1
    -
      length: 300
  max-line-length:
    - 0
  mixin-name-format:
    - 0
  mixins-before-declarations:
    - 1
  nesting-depth:
    - 0
  no-attribute-selectors:
    - 0
  no-color-hex:
    - 1
  no-color-keywords:
    - 0
  no-color-literals:
    - 0
  no-combinators:
    - 0
  no-css-comments:
    - 1
  no-debug:
    - 0
  no-disallowed-properties:
    - 0
  no-duplicate-properties:
    - 1
  no-empty-rulesets:
    - 0
  no-extends:
    - 0
  no-ids:
    - 1
  no-important:
    - 1
  no-invalid-hex:
    - 0
  no-mergeable-selectors:
    - 1
  no-misspelled-properties:
    - 2
    -
      extra-properties:
        - -webkit-overflow-scrolling
        - border-top-radius
        - border-bottom-radius
        - border-left-radius
        - border-right-radius
        - size
        - max-size
        - margin-x
        - margin-y
        - padding-x
        - padding-y
        - border-x
        - border-y
        - border-x-color
        - border-y-color
        - absolute
        - fixed
        - relative
  no-qualifying-elements:
    - 1
    -
      allow-element-with-attribute: true
  no-trailing-whitespace:
    - 1
  no-trailing-zero:
    - 1
  no-transition-all:
    - 2
  no-universal-selectors:
    - 0
  no-url-domains:
    - 2
  no-url-protocols:
    - 2
  no-vendor-prefixes:
    - 1
    -
      additional-identifiers:
        - khtml
        - o
      ignore-non-standard: true
  no-warn:
    - 0
  one-declaration-per-line:
    - 1
  placeholder-in-extend:
    - 0
  placeholder-name-format:
    - 0
  property-sort-order:
    - 0
  property-units:
    - 0
  pseudo-element:
    - 2
  quotes:
    - 1
    -
      style: single
  shorthand-values:
    - 2
  single-line-per-selector:
    - 0
  space-after-bang:
    - 1
    -
      include: false
  space-after-colon:
    - 1
    -
      include: true
  space-after-comma:
    - 1
    -
      include: true
  space-around-operator:
    - 1
    -
      include: true
  space-before-bang:
    - 1
    -
      include: true
  space-before-brace:
    - 1
    -
      include: true
  space-before-colon:
    - 1
    -
      include: false
  space-between-parens:
    - 1
    -
      include: false
  trailing-semicolon:
    - 1
    -
      include: true
  url-quotes:
    - 1
  variable-for-property:
    - 0
  variable-name-format:
    - 0
  zero-unit:
    - 2
    -
      include: false

 

 

2017-10-25 16 23 43

@at-root :root & {
	border-left: none;
}

I expect to see :root is ignored by space-before-colon/space-after-colon rules.

I am using Sass Lint plugin for Jetbrains IDE.

Tried to use CLI and got the same:

app/assets/styles/modules/vendor-foundation.scss
   33:14  warning  No space allowed before `:`   space-before-colon
   47:12  warning  No space allowed before `:`   space-before-colon

@at-root html does not throws this error.

:root without @at-root prefix does not throws this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions