mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Merge pull request #869 from sass/second-law-use
Propagate selector source specificity between modules
This commit is contained in:
commit
1a5102bedb
@ -1,3 +1,8 @@
|
||||
## 1.23.3
|
||||
|
||||
* Fix a bug where selectors were being trimmed over-eagerly when `@extend`
|
||||
crossed module boundaries.
|
||||
|
||||
## 1.23.2
|
||||
|
||||
### Command-Line Interface
|
||||
|
@ -400,6 +400,7 @@ class Extender {
|
||||
|
||||
for (var extender in extenders) {
|
||||
if (extender.isEmpty) continue;
|
||||
_sourceSpecificity.addAll(extender._sourceSpecificity);
|
||||
extender._extensions.forEach((target, newSources) {
|
||||
// Private selectors can't be extended across module boundaries.
|
||||
if (target is PlaceholderSelector && target.isPrivate) return;
|
||||
@ -669,11 +670,9 @@ class Extender {
|
||||
}
|
||||
|
||||
var lineBreak = false;
|
||||
var specificity = _sourceSpecificityFor(compound);
|
||||
for (var state in path) {
|
||||
state.assertCompatibleMediaContext(mediaQueryContext);
|
||||
lineBreak = lineBreak || state.extender.lineBreak;
|
||||
specificity = math.max(specificity, state.specificity);
|
||||
}
|
||||
|
||||
return complexes
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: sass
|
||||
version: 1.23.2
|
||||
version: 1.23.3
|
||||
description: A Sass implementation in Dart.
|
||||
author: Sass Team
|
||||
homepage: https://github.com/sass/dart-sass
|
||||
|
Loading…
Reference in New Issue
Block a user