From 9ae8b226ca284488f47a78049e683e012b074368 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 30 Apr 2021 10:29:18 -0400 Subject: [PATCH] formatting --- src/compiler/compile/css/Selector.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts index 61fa1f6e2a..14b6f95a4e 100644 --- a/src/compiler/compile/css/Selector.ts +++ b/src/compiler/compile/css/Selector.ts @@ -162,9 +162,9 @@ function apply_selector(blocks: Block[], node: Element, to_encapsulate: Array<{ if (!node) { return ( - (block.global && blocks.every(block => block.global)) || - (block.host && blocks.length === 0) - ); + (block.global && blocks.every(block => block.global)) || + (block.host && blocks.length === 0) + ); } switch (block_might_apply_to_node(block, node)) { @@ -591,8 +591,13 @@ class Block { this.selectors.push(selector); this.end = selector.end; } + get global() { - return this.selectors.length === 1 && this.selectors[0].type === 'PseudoClassSelector' && this.selectors[0].name === 'global'; + return ( + this.selectors.length === 1 && + this.selectors[0].type === 'PseudoClassSelector' && + this.selectors[0].name === 'global' + ); } }