Skip to content

Prohibit usage of the extend SCSS at-rule in styles.

Vitaly Slobodin requested to merge vs/prohibit-extend-at-rule-in-styles into master

What does this MR do and why?

Usage of the extend at-rule is prohibited due to memory leaks and the rule doesn't work as it should to. Use mixins instead:

// Bad
.gl-pt-3 {
  padding-top: 12px;
}

.my-element {
  @extend .gl-pt-3;
}

// compiles to
.gl-pt-3, .my-element {
  padding-top: 12px;
}

// Good
@mixing gl-pt-3 {
  padding-top: 12px;
}

.my-element {
  @include gl-pt-3;
}

// compiles to
.my-element {
  padding-top: 12px;
}

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports