Skip to content

Commit ed4f62d

Browse files
committed
chore: rename to is_in_global_block
1 parent d96b23d commit ed4f62d

File tree

1 file changed

+4
-4
lines changed
  • packages/svelte/src/compiler/phases/3-transform/css

1 file changed

+4
-4
lines changed

packages/svelte/src/compiler/phases/3-transform/css/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const visitors = {
8787

8888
if (node.prelude.startsWith('-global-')) {
8989
state.code.remove(start, start + 8);
90-
} else if (!is_global_block(path)) {
90+
} else if (!is_in_global_block(path)) {
9191
state.code.prependRight(start, `${state.hash}-`);
9292
}
9393

@@ -154,7 +154,7 @@ const visitors = {
154154
return;
155155
}
156156

157-
if (!is_used(node) && !is_global_block(path)) {
157+
if (!is_used(node) && !is_in_global_block(path)) {
158158
if (state.minify) {
159159
state.code.remove(node.start, node.end);
160160
} else {
@@ -193,7 +193,7 @@ const visitors = {
193193
SelectorList(node, { state, next, path }) {
194194
// Only add comments if we're not inside a complex selector that itself is unused or a global block
195195
if (
196-
!is_global_block(path) &&
196+
!is_in_global_block(path) &&
197197
!path.find((n) => n.type === 'ComplexSelector' && !n.metadata.used)
198198
) {
199199
const children = node.children;
@@ -363,7 +363,7 @@ const visitors = {
363363
*
364364
* @param {Array<Css.Node>} path
365365
*/
366-
function is_global_block(path) {
366+
function is_in_global_block(path) {
367367
return path.some((node) => node.type === 'Rule' && node.metadata.is_global_block);
368368
}
369369

0 commit comments

Comments
 (0)