File tree Expand file tree Collapse file tree
packages/@css-blocks/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ export function isExternalBlock(object: NodeAndType): boolean {
9999 * @param object The NodeAndType's descriptor object.
100100 */
101101export 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 ;
102104 return object . blockType === BlockType . root || object . blockType === BlockType . attribute ;
103105}
104106
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ export class BlockInheritance extends BEMProcessor {
2020
2121 let filename = "widget.block.css" ;
2222 let inputCSS = `@block app from "./app.block.css";
23+ app[state|is-loading] :scope {
24+ border: none;
25+ }
2326 app[state|is-loading] .b {
2427 border: none;
2528 }` ;
@@ -28,6 +31,7 @@ export class BlockInheritance extends BEMProcessor {
2831 imports . assertImported ( "app.block.css" ) ;
2932 assert . deepEqual (
3033 result . css . toString ( ) ,
34+ ".app--is-loading .widget { border: none; }\n" +
3135 ".app--is-loading .widget__b { border: none; }\n" ,
3236 ) ;
3337 } ) ;
You can’t perform that action at this time.
0 commit comments