File tree 2 files changed +2
-3
lines changed
packages/vaadin-themable-mixin
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 6
6
import { CSSInjector } from './src/css-injector.js' ;
7
7
8
8
/**
9
- * Find enclosing root for given element to father style rules from.
9
+ * Find enclosing root for given element to gather style rules from.
10
10
*
11
11
* @param {HTMLElement } element
12
12
* @return {DocumentOrShadowRoot }
@@ -55,7 +55,6 @@ export const CSSInjectionMixin = (superClass) =>
55
55
connectedCallback ( ) {
56
56
super . connectedCallback ( ) ;
57
57
58
- // Find proper host element to observe
59
58
const root = findRoot ( this ) ;
60
59
root . __cssInjector ||= new CSSInjector ( root ) ;
61
60
this . __cssInjector = root . __cssInjector ;
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ function updateInstanceStyles(instance) {
121
121
// Remove them first to avoid duplicates.
122
122
[ ...instance . shadowRoot . querySelectorAll ( 'style' ) ] . forEach ( ( style ) => style . remove ( ) ) ;
123
123
124
- // There are some styles injected, we need to retain them and place
124
+ // If there are some styles injected, we should retain them and place
125
125
// before any custom styles. Note that `src` styles will end up after
126
126
// injected ones but those should use `@layer` for lower specificity.
127
127
const styles = [ getInjectedStyleSheet ( instance ) , ...componentClass . elementStyles ] . filter ( Boolean ) ;
You can’t perform that action at this time.
0 commit comments