Skip to content

Commit

Permalink
feat: support registering styles after component finalizes (#7069)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki authored Jan 15, 2024
1 parent fc52937 commit 398ce38
Show file tree
Hide file tree
Showing 4 changed files with 602 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import './post-finalize-styles.common.ts';
import { css, LitElement } from 'lit';

customElements.define(
'test-element',
class extends LitElement {
static get styles() {
return css`
:host {
display: block;
}
`;
}

render() {
return '';
}
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import './post-finalize-styles.common.ts';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';

customElements.define(
'test-element',
class extends PolymerElement {
static get template() {
return html`
<style>
:host {
display: block;
}
</style>
`;
}
},
);
Loading

0 comments on commit 398ce38

Please sign in to comment.