@homebound/truss 2.18.0 → 2.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +24 -2
- package/build/index.js.map +1 -1
- package/build/plugin/index.js +14 -0
- package/build/plugin/index.js.map +1 -1
- package/package.json +1 -1
package/build/plugin/index.js
CHANGED
|
@@ -1683,6 +1683,12 @@ function cloneConditionContext(context) {
|
|
|
1683
1683
|
whenPseudo: context.whenPseudo ? { ...context.whenPseudo } : null
|
|
1684
1684
|
};
|
|
1685
1685
|
}
|
|
1686
|
+
function resetConditionContext(context) {
|
|
1687
|
+
context.mediaQuery = null;
|
|
1688
|
+
context.pseudoClass = null;
|
|
1689
|
+
context.pseudoElement = null;
|
|
1690
|
+
context.whenPseudo = null;
|
|
1691
|
+
}
|
|
1686
1692
|
function segmentWithConditionContext(segment, context) {
|
|
1687
1693
|
return {
|
|
1688
1694
|
...segment,
|
|
@@ -1698,6 +1704,10 @@ function applyModifierNodeToConditionContext(context, node, mapping) {
|
|
|
1698
1704
|
return;
|
|
1699
1705
|
}
|
|
1700
1706
|
if (node.type === "getter") {
|
|
1707
|
+
if (node.name === "end") {
|
|
1708
|
+
resetConditionContext(context);
|
|
1709
|
+
return;
|
|
1710
|
+
}
|
|
1701
1711
|
if (isPseudoMethod(node.name)) {
|
|
1702
1712
|
context.pseudoClass = pseudoSelector(node.name);
|
|
1703
1713
|
return;
|
|
@@ -1985,6 +1995,10 @@ function resolveChain(chain, mapping, initialContext = emptyConditionContext(),
|
|
|
1985
1995
|
}
|
|
1986
1996
|
if (node.type === "getter") {
|
|
1987
1997
|
const abbr = node.name;
|
|
1998
|
+
if (abbr === "end") {
|
|
1999
|
+
resetConditionContext(context);
|
|
2000
|
+
continue;
|
|
2001
|
+
}
|
|
1988
2002
|
if (isPseudoMethod(abbr)) {
|
|
1989
2003
|
context.pseudoClass = pseudoSelector(abbr);
|
|
1990
2004
|
continue;
|