Closed himerus closed 8 months ago
Latest commit: d5637cdd149d32ef8de46f288a95f64567c58af9
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Name | Link |
---|---|
Latest commit | d5637cdd149d32ef8de46f288a95f64567c58af9 |
Latest deploy log | https://app.netlify.com/sites/outlinejs/deploys/65ce629f706a9b0008990919 |
[!IMPORTANT]
Auto Review Skipped
Review was skipped due to path filters
Files ignored due to path filters (1)
* `packages/controllers/adopted-stylesheets/package.json` is excluded by: `!**/*.json`
The update introduces a refined approach to managing styles within web components through the AdoptedStylesheets
controller. This enhancement focuses on the seamless attachment of encapsulated stylesheets via the createRenderRoot
method. By leveraging modern browser capabilities, it ensures a more efficient and standardized inclusion of styles, significantly improving the style management process in web components.
File Path | Change Summary |
---|---|
.../adopted-stylesheets/README.md |
Updated documentation to reflect the new method for attaching encapsulated stylesheets using createRenderRoot . |
.../adopted-stylesheets/src/adopted-stylesheets.ts |
- Introduced constructor with globalStyles , root , and host parameters.- Added adoptedSheet private property.- Implemented logic to manage CSSStyleSheet objects, ensuring they are efficiently included and removed from adoptedStyleSheets .- Renamed class from AdoptedStyleSheets to AdoptedStylesheets .- Added root and host as new private properties.- Updated hostConnected and hostDisconnected methods to align with the new property structure and logic. |
Summary by CodeRabbit
AdoptedStylesheets
controller for improved handling of CSSStyleSheet objects and connection lifecycle.createRenderRoot
method in theAdoptedStylesheets
controller.