-
-
Notifications
You must be signed in to change notification settings - Fork 834
feat: hydrate - Remove scoped css classes if serializeShadowRoot is true. #5880
Copy link
Copy link
Closed
AnirudhJalagam/ionic-frameworkss
#2Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Currently Stencil scopes the CSS inside the Declarative Shadow DOM, which is not necessary anymore, as they are already isolated.
The bigger problem is that this bloats the size of the HTML massively.
Describe the Use Case
A simple css class like
.left-0 {left:var(--spacing-0)}is bloated to
/*!@.left-0*/.left-0.sc-my-maybe-long-component-name{left:var(--spacing-0)}This round about triples the size of css classes.
Here another example:
/*!@.button.primary:focus-within.focus-wcag-none:not(:hover,:active,.suppressFocusStyle)*/
.button.primary.sc-my-maybe-long-component-name:focus-within.focus-wcag-none:not(:hover, .sc-my-maybe-long-component-name:active, .suppressFocusStyle).sc-my-maybe-long-component-name {
outline: 2px solid var(--button-stroke-primary-focus)
}Describe Preferred Solution
No additional classname CSS selector necessary. No CSS comments necessary.
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil