Skip to content

feat(ui5-webcomponents-base): add removeCustomCSS API#13375

Open
dobrinyonkov wants to merge 2 commits intomainfrom
feat/remove-custom-css
Open

feat(ui5-webcomponents-base): add removeCustomCSS API#13375
dobrinyonkov wants to merge 2 commits intomainfrom
feat/remove-custom-css

Conversation

@dobrinyonkov
Copy link
Copy Markdown
Contributor

Summary

  • addCustomCSS now returns a string ID that uniquely identifies the added CSS entry
  • New removeCustomCSS(tag, id) function removes a specific custom CSS entry by its ID and triggers a re-render
  • Exported removeCustomCSS through CustomStyle.ts, Theming.ts, and index.ts
  • Updated test page with add/remove buttons
  • Added Cypress tests covering add, remove, invalid ID, non-existent tag, and selective removal of multiple entries

Test plan

  • All 6 Cypress tests pass (yarn test:cypress:single cypress/specs/CustomCSS.cy.tsx)
  • Manual test: open CustomCSS test page, click "Apply" then "Remove" to verify styles are added/removed
  • TypeScript compiles cleanly (yarn ts)

addCustomCSS now returns a string ID that can be passed to
removeCustomCSS to remove a specific custom CSS entry and
trigger a re-render. This enables dynamic CSS management
where custom styles can be cleanly removed at runtime.
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Apr 8, 2026

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