unimal-jp / spear

The spear OSS repository
https://late-cloud-6411.spearly.app
MIT License
10 stars 1 forks source link

When extending from another scss file, there is a problem that the extended content is described after the style of the expanded selector. #177

Open pandaulait opened 1 year ago

pandaulait commented 1 year ago

Describe the bug A clear and concise description of what the bug is. When extending from another scss file, there is a problem that the extended content is described after the style of the expanded selector.


別のscssファイルからextendした際に、extendした内容が展開したセレクタのスタイルよりも後に記述されてしまう To Reproduce

// file1.scss
%common {
color: red
}
// file2.scss
@import file1

.class1 {
 @extend %common;
}

.class2 {
 @extend %common;
 color: blue
}

↓ build

.class2 {
 color: blue
}

// 後述のため、extendの内容が優先される
.class1, class2 {
  color: red
}

Expected behavior

↓ build

.class1, class2 {
  color: red
}

.class2 {
 color: blue
}