| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
✔️ Deploy Preview for patternfly-elements ready! 🔨 Explore the source changes: 1f05e54 🔍 Inspect the deploy log: https://app.netlify.com/sites/patternfly-elements/deploys/6103f06df00f840007635d72 😎 Browse the preview: https://deploy-preview-1730--patternfly-elements.netlify.app |
Sorry, something went wrong.
* feat: Pull out polyfill and pfelement updates * feat: Update changelog * feat: Bring in update to parsing tool * feat: Polyfills * feat: Add comment for polyfill file * feat: Update polyfill and todos * feat: Pull out styles/html into separate PR #1730 * feat: Update todos and polyfills listing * feat: Update test cases * feat: Split out tests into 2 * feat: Pull out context tests into separate file Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| return "my-element.scss"; | ||
| } | ||
|
|
||
| // Alternative: Embed the styles directly in the JS. |
There was a problem hiding this comment.
@castastrophe Can we get rid of this alternative? I'd really like to continue with using just scss files instead of suggesting this alternative.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not sure it necessarily hurts to make both available. One example is a component with only styles for :host([hidden]) { display: none; }. Does that need Sass and a separate file at that point? Maybe not yet.
Sorry, something went wrong.
There was a problem hiding this comment.
These are the styles in the pfe-number.scss file:
:host {
display: inline;
white-space: nowrap;
}
Sorry, something went wrong.
There was a problem hiding this comment.
One more example from pfe-datetime.scss:
:host {
display: inline;
}
Sorry, something went wrong.
There was a problem hiding this comment.
I just thought of something else cool you could use styles for:
get styles() {
return `<link rel="stylesheet" href="https://mycdn/external-styles.css">`;
}Nothing forcing you to use the style tag per say in this approach.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This lets us put very simple templates in the JS file instead of having them in a separate html asset but we can maintain the separate Sass file for styles.
Testing instructions
Check for regressions in:
Ready-for-merge Checklist
Merging
Please squash when merging and ensure your commit message uses conventional commit formatting.
Be sure to share your updates with the patternfly-elements-contribute@redhat.com mailing list!