Skip to content

Commit b9e5a3d

Browse files
committed
Small tweaks to comments
1 parent a5d9716 commit b9e5a3d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: packages/vaadin-themable-mixin/css-injection-mixin.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { CSSInjector } from './src/css-injector.js';
77

88
/**
9-
* Find enclosing root for given element to father style rules from.
9+
* Find enclosing root for given element to gather style rules from.
1010
*
1111
* @param {HTMLElement} element
1212
* @return {DocumentOrShadowRoot}
@@ -55,7 +55,6 @@ export const CSSInjectionMixin = (superClass) =>
5555
connectedCallback() {
5656
super.connectedCallback();
5757

58-
// Find proper host element to observe
5958
const root = findRoot(this);
6059
root.__cssInjector ||= new CSSInjector(root);
6160
this.__cssInjector = root.__cssInjector;

Diff for: packages/vaadin-themable-mixin/vaadin-themable-mixin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function updateInstanceStyles(instance) {
121121
// Remove them first to avoid duplicates.
122122
[...instance.shadowRoot.querySelectorAll('style')].forEach((style) => style.remove());
123123

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
125125
// before any custom styles. Note that `src` styles will end up after
126126
// injected ones but those should use `@layer` for lower specificity.
127127
const styles = [getInjectedStyleSheet(instance), ...componentClass.elementStyles].filter(Boolean);

0 commit comments

Comments
 (0)