File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed
packages/svelte/src/compiler/phases/2-analyze/css Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -69,30 +69,8 @@ export default class Selector {
69
69
}
70
70
71
71
/**
72
- * Determines whether the given selector is used within the component's nodes
73
- * and marks the corresponding blocks for encapsulation if so.
74
- *
75
- * In CSS nesting, the selector might be used in one nested rule, but not in another
76
- * e.g:
77
- * ```css
78
- * a, b {
79
- * c {
80
- * color: red;
81
- * }
82
- * ```
83
- *
84
- * ```svelte
85
- * <a>
86
- * <c>...</c>
87
- * </a>
88
- * <b>
89
- * No 'c' here
90
- * </b>
91
- * ```
92
- *
93
- * In the above example, the selector `a c` is used, but `b c` is not.
94
- * We should mark it for encapsulation as a result.
95
- *
72
+ * Determines whether the given selector potentially applies to `node` —
73
+ * if so, marks both the selector and the node as encapsulated
96
74
* @param {import('#compiler').RegularElement | import('#compiler').SvelteElement } node - The node to apply the selector to.
97
75
* @returns {void }
98
76
*/
You can’t perform that action at this time.
0 commit comments