SU-SWS/decanter

View on GitHub
core/src/scss/utilities/mixins/display/_display-icon.scss

Summary

Maintainability
Test Coverage

todo found
Open

/// @todo Needs to be documented. Should this be reworked for asset management purposes?

todo found
Open

///  @param {} $icon       - todo

todo found
Open

///  @param {} $margin     - todo

todo found
Open

///  @param {} $hover      - todo

todo found
Open

///  @param {} $size       - todo

todo found
Open

///  @param {} $direction  - todo

Duplicate properties are not allowed within a block
Invalid

    background-image: url('#{$su-image-path}/#{$icon}.svg');

No Duplicate Properties

Rule no-duplicate-properties will enforce that duplicate properties are not allowed within the same block.

Options

  • exclude: [array of property names to be excluded from this rule] (defaults to empty array [])

Examples

When enabled, the following are disallowed:

.foo {
  margin: 0 0 15px;
  margin: 0;
}

Exclude

When a property is added to the exclude array as shown below then you may place duplicate properties immediately after one another, this is to prevent accidental duplication of properties.

no-duplicate-properties:
  - 1
  -
    exclude:
      - display

When display is added to the exclude array the following would be allowed:

.display-block {
  display: flex;
  display: inline-block;
  float: right;
}

When display is added to the exclude array the following would still be disallowed as the duplicate properties are separated by another property:

.display-block {
  display: flex;
  float: right;
  display: inline-block;
}

Duplicate properties are not allowed within a block
Invalid

      background-image: url('#{$su-image-path}/#{$icon}-hover.svg');

No Duplicate Properties

Rule no-duplicate-properties will enforce that duplicate properties are not allowed within the same block.

Options

  • exclude: [array of property names to be excluded from this rule] (defaults to empty array [])

Examples

When enabled, the following are disallowed:

.foo {
  margin: 0 0 15px;
  margin: 0;
}

Exclude

When a property is added to the exclude array as shown below then you may place duplicate properties immediately after one another, this is to prevent accidental duplication of properties.

no-duplicate-properties:
  - 1
  -
    exclude:
      - display

When display is added to the exclude array the following would be allowed:

.display-block {
  display: flex;
  display: inline-block;
  float: right;
}

When display is added to the exclude array the following would still be disallowed as the duplicate properties are separated by another property:

.display-block {
  display: flex;
  float: right;
  display: inline-block;
}

There are no issues that match your filters.

Category
Status