# Default styelint configuration.

# See documentation at https://stylelint.io/

ignoreFiles:
  - src/css/core.scss
  - src/css/flex-utils.scss
  - src/css/normalize.scss
  - src/css/text-alignment.scss
  - src/components/slides/slides-vendor.scss
  - src/themes/ionic.mixins.scss
  - src/themes/ionic.functions.color.scss
  - src/themes/ionic.functions.string.scss

indentation: 2

plugins:
  - stylelint-order

rules:
  at-rule-empty-line-before:
    - always
    - except:
      - blockless-after-blockless
      - first-nested
      ignore:
      - after-comment

  block-closing-brace-newline-before:
    - always

  block-no-empty:
    - true

  block-opening-brace-newline-after:
    - always

  custom-property-empty-line-before:
    - always
    - except:
      - after-comment
      - after-custom-property
      - first-nested

  declaration-no-important:
    - true


  order/order:
    - custom-properties
    - dollar-variables
    - at-rules
    - declarations
    - rules

  # https://github.com/sasstools/sass-lint/blob/develop/lib/config/property-sort-orders/smacss.yml
  order/properties-order:

    # Box

    - emptyLineBefore: always
      properties:
      - display
      - position
      - top
      - right
      - bottom
      - left

    - emptyLineBefore: always
      properties:
      - flex
      - flex-basis
      - flex-direction
      - flex-flow
      - flex-grow
      - flex-shrink
      - flex-wrap
      - align-content
      - align-items
      - align-self
      - justify-content
      - order

    - emptyLineBefore: always
      properties:
      - width
      - min-width
      - max-width

      - height
      - min-height
      - max-height

    - emptyLineBefore: always
      properties:
      - margin
      - margin-top
      - margin-right
      - margin-bottom
      - margin-left

    - emptyLineBefore: always
      properties:
      - padding
      - padding-top
      - padding-right
      - padding-bottom
      - padding-left

    - emptyLineBefore: always
      properties:
      - float
      - clear

    - emptyLineBefore: always
      properties:
      - columns
      - column-gap
      - column-fill
      - column-rule
      - column-span
      - column-count
      - column-width

    - emptyLineBefore: always
      properties:
      - transform
      - transform-box
      - transform-origin
      - transform-style

    - emptyLineBefore: always
      properties:
      - transition
      - transition-delay
      - transition-duration
      - transition-property
      - transition-timing-function

    # Border

    - emptyLineBefore: always
      properties:
      - border
      - border-top
      - border-right
      - border-bottom
      - border-left
      - border-width
      - border-top-width
      - border-right-width
      - border-bottom-width
      - border-left-width

      - border-style
      - border-top-style
      - border-right-style
      - border-bottom-style
      - border-left-style

      - border-radius
      - border-top-left-radius
      - border-top-right-radius
      - border-bottom-left-radius
      - border-bottom-right-radius

      - border-color
      - border-top-color
      - border-right-color
      - border-bottom-color
      - border-left-color

    - emptyLineBefore: always
      properties:
      - outline
      - outline-color
      - outline-offset
      - outline-style
      - outline-width

    # Background

    - emptyLineBefore: always
      properties:
      - background
      - background-attachment
      - background-clip
      - background-color
      - background-image
      - background-repeat
      - background-position
      - background-size

    # Text

      - color

    - emptyLineBefore: always
      properties:
      - font
      - font-family
      - font-size
      - font-smoothing
      - font-style
      - font-variant
      - font-weight

    - emptyLineBefore: always
      properties:
      - letter-spacing
      - line-height
      - list-style

    - emptyLineBefore: always
      properties:
      - text-align
      - text-decoration
      - text-indent
      - text-overflow
      - text-rendering
      - text-shadow
      - text-transform
      - text-wrap

    - emptyLineBefore: always
      properties:
      - white-space
      - word-spacing

    # Other

    - emptyLineBefore: always
      properties:
      - border-collapse
      - border-spacing
      - box-shadow
      - caption-side
      - contain
      - content
      - cursor
      - empty-cells
      - object-fit
      - opacity
      - overflow
      - quotes
      - speak
      - table-layout
      - touch-action
      - user-select
      - vertical-align
      - visibility
      - z-index

  property-blacklist:
    - background-position
    - direction
    - right
    - left
    - float
    - padding
    - padding-left
    - padding-right
    - margin
    - margin-left
    - margin-right
    - border-radius
    - border-top-left-radius
    - border-top-right-radius
    - border-bottom-right-radius
    - border-bottom-left-radius
    - transform-origin

  string-quotes:
    - double