Skip to content

Commit 398ce38

Browse files
authored
feat: support registering styles after component finalizes (#7069)
1 parent fc52937 commit 398ce38

File tree

4 files changed

+602
-35
lines changed

4 files changed

+602
-35
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import './post-finalize-styles.common.ts';
2+
import { css, LitElement } from 'lit';
3+
4+
customElements.define(
5+
'test-element',
6+
class extends LitElement {
7+
static get styles() {
8+
return css`
9+
:host {
10+
display: block;
11+
}
12+
`;
13+
}
14+
15+
render() {
16+
return '';
17+
}
18+
},
19+
);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import './post-finalize-styles.common.ts';
2+
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
3+
4+
customElements.define(
5+
'test-element',
6+
class extends PolymerElement {
7+
static get template() {
8+
return html`
9+
<style>
10+
:host {
11+
display: block;
12+
}
13+
</style>
14+
`;
15+
}
16+
},
17+
);

0 commit comments

Comments
 (0)