Comparing version 5.3.9 to 5.3.10
@@ -118,2 +118,3 @@ "use strict"; | ||
var mixinMeta = Object.create(resolvedClass.meta); | ||
mixinMeta.parent = resolvedClass.meta; | ||
mixinMeta.mappedSymbols = Object.create(resolvedClass.meta.mappedSymbols); | ||
@@ -120,0 +121,0 @@ mixinMeta.mappedSymbols[resolvedClass.meta.root] = resolvedClass.meta.mappedSymbols[resolvedClass.symbol.name]; |
@@ -75,3 +75,2 @@ import * as postcss from 'postcss'; | ||
rawAst: postcss.Root; | ||
outputAst?: postcss.Root; | ||
root: 'root'; | ||
@@ -88,2 +87,4 @@ source: string; | ||
diagnostics: Diagnostics; | ||
outputAst?: postcss.Root; | ||
parent?: StylableMeta; | ||
transformDiagnostics: Diagnostics | null; | ||
@@ -90,0 +91,0 @@ } |
@@ -339,2 +339,13 @@ "use strict"; | ||
} | ||
else if (type === 'invalid' && node.value === '&' && current.parent) { | ||
var origin = current.mappedSymbols[current.root]; | ||
var next = _this.handleClass(current, { | ||
type: 'class', | ||
nodes: [], | ||
name: origin.name | ||
}, origin.name); | ||
originSymbol = current.classes[origin.name]; | ||
symbol = next.symbol; | ||
current = next.meta; | ||
} | ||
/* do nothing */ | ||
@@ -341,0 +352,0 @@ return undefined; |
@@ -509,2 +509,22 @@ "use strict"; | ||
}); | ||
it('apply named mixin with extends and conflicting pseudo-element class at mixin deceleration level', function () { | ||
var result = generate_test_util_1.generateStylableRoot({ | ||
entry: "/entry.st.css", | ||
files: { | ||
'/entry.st.css': { | ||
namespace: 'entry', | ||
content: "\n :import {\n -st-from: \"./imported.st.css\";\n -st-named: mixme;\n }\n .x {\n -st-mixin: mixme;\n }\n " | ||
}, | ||
'/imported.st.css': { | ||
namespace: 'imported', | ||
content: "\n :import {\n -st-from: \"./comp.st.css\";\n -st-default: Comp;\n }\n .part {}\n .mixme {\n -st-extends: Comp;\n color: red;\n }\n .mixme::part .part {\n color: green;\n }\n " | ||
}, | ||
'/comp.st.css': { | ||
namespace: 'comp', | ||
content: "\n .part{}\n " | ||
} | ||
} | ||
}); | ||
matchRuleAndDeclaration(result, 1, '.entry--x .comp--part .imported--part', 'color: green'); | ||
}); | ||
it('apply mixin when rootScoping enabled', function () { | ||
@@ -511,0 +531,0 @@ var result = generate_test_util_1.generateStylableRoot({ |
{ | ||
"name": "stylable", | ||
"version": "5.3.9", | ||
"version": "5.3.10", | ||
"description": "CSS for Components", | ||
@@ -43,3 +43,3 @@ "main": "./dist/src/index.js", | ||
"license": "BSD-3-Clause", | ||
"gitHead": "f029c92d9810693d1d78ec4807aa65e242a5283b" | ||
"gitHead": "1e6d877fbd06e11c989b0c04b56421bf49451b50" | ||
} |
@@ -218,2 +218,3 @@ import * as postcss from 'postcss'; | ||
const mixinMeta: StylableMeta = Object.create(resolvedClass.meta); | ||
mixinMeta.parent = resolvedClass.meta; | ||
mixinMeta.mappedSymbols = Object.create(resolvedClass.meta.mappedSymbols); | ||
@@ -220,0 +221,0 @@ mixinMeta.mappedSymbols[resolvedClass.meta.root] = resolvedClass.meta.mappedSymbols[resolvedClass.symbol.name]; |
@@ -528,3 +528,2 @@ import * as path from 'path'; | ||
rawAst: postcss.Root; | ||
outputAst?: postcss.Root; | ||
root: 'root'; | ||
@@ -541,2 +540,4 @@ source: string; | ||
diagnostics: Diagnostics; | ||
outputAst?: postcss.Root; | ||
parent?: StylableMeta; | ||
transformDiagnostics: Diagnostics | null; | ||
@@ -543,0 +544,0 @@ } |
@@ -471,2 +471,12 @@ import * as postcss from 'postcss'; | ||
nestedSymbol = symbol; | ||
} else if (type === 'invalid' && node.value === '&' && current.parent) { | ||
const origin = current.mappedSymbols[current.root]; | ||
const next = this.handleClass(current, { | ||
type: 'class', | ||
nodes: [], | ||
name: origin.name | ||
}, origin.name); | ||
originSymbol = current.classes[origin.name]; | ||
symbol = next.symbol; | ||
current = next.meta; | ||
} | ||
@@ -473,0 +483,0 @@ /* do nothing */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1122351
15611