File tree 2 files changed +6
-0
lines changed
packages/@css-blocks/core
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ export function isExternalBlock(object: NodeAndType): boolean {
99
99
* @param object The NodeAndType's descriptor object.
100
100
*/
101
101
export function isRootLevelObject ( object : NodeAndType ) : object is RootAttributeNode | RootClassNode {
102
+ // Exclude foreign blocks from being considered root level objects.
103
+ if ( object . blockType === BlockType . attribute && object . blockName ) return false ;
102
104
return object . blockType === BlockType . root || object . blockType === BlockType . attribute ;
103
105
}
104
106
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ export class BlockInheritance extends BEMProcessor {
20
20
21
21
let filename = "widget.block.css" ;
22
22
let inputCSS = `@block app from "./app.block.css";
23
+ app[state|is-loading] :scope {
24
+ border: none;
25
+ }
23
26
app[state|is-loading] .b {
24
27
border: none;
25
28
}` ;
@@ -28,6 +31,7 @@ export class BlockInheritance extends BEMProcessor {
28
31
imports . assertImported ( "app.block.css" ) ;
29
32
assert . deepEqual (
30
33
result . css . toString ( ) ,
34
+ ".app--is-loading .widget { border: none; }\n" +
31
35
".app--is-loading .widget__b { border: none; }\n" ,
32
36
) ;
33
37
} ) ;
You can’t perform that action at this time.
0 commit comments