Skip to content

Refactor style element cloning for shadow DOM integration. Works in Canvas too - #8

Merged
viratatwebflow merged 2 commits into
Webflow-Examples:mainfrom
viratatwebflow:cms-slider
Oct 28, 2025
Merged

Refactor style element cloning for shadow DOM integration. Works in Canvas too#8
viratatwebflow merged 2 commits into
Webflow-Examples:mainfrom
viratatwebflow:cms-slider

Conversation

@viratatwebflow

Copy link
Copy Markdown
Member
  • Introduced helper functions to clone style and link elements, improving code readability and maintainability.
  • Added functionality to extract CSS rules from style elements using the CSSOM when textContent is unavailable.
  • Enhanced the cloning process to ensure accurate representation of styles in the shadow DOM.

- Introduced helper functions to clone style and link elements, improving code readability and maintainability.
- Added functionality to extract CSS rules from style elements using the CSSOM when textContent is unavailable.
- Enhanced the cloning process to ensure accurate representation of styles in the shadow DOM.
- Updated variable names from `slideElements` to `items` for clarity and consistency across the CMSSlider and SlideItem components.
- Adjusted the useCMSCollectionItems hook to reflect the new naming convention, enhancing code readability.
@viratatwebflow
viratatwebflow merged commit 944760b into Webflow-Examples:main Oct 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants