-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: missing root element's scope id as classname in nested child #5702
Labels
Bug: Validated
This PR or Issue is verified to be a bug within Stencil
Comments
yigityuce
added a commit
to yigityuce/stencil
that referenced
this issue
Apr 25, 2024
sass compiler adds root scope id to the nested child elements too, therefore nested element selectors are not working from the root component since the root scope id is not adding as classname to the nested children elements ionic-team#5702
2 tasks
Thanks for raising this well described bug and providing a reproducible example. I took a look and reviewed the PR. |
@christian-bromann PR is updated |
github-merge-queue bot
pushed a commit
that referenced
this issue
May 3, 2024
* fix(runtime): add root scope id to the nested child as classname sass compiler adds root scope id to the nested child elements too, therefore nested element selectors are not working from the root component since the root scope id is not adding as classname to the nested children elements #5702 * test: add additional test for css and add code documentation * test: fix failing unit test due to the additional class * chore: remove shadowDom condition regarding review
rwaskiewicz
added
Bug: Validated
This PR or Issue is verified to be a bug within Stencil
and removed
triage
labels
May 3, 2024
closing the issue since #5704 is merged 🚀 thanks all! |
The fix for this PR was included in today's v4.18.0 release |
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Stencil Version
4.17.1
Current Behavior
think about having a component structure like below:
given that component structure I have a style for popover (eg.:
padding: 8;
) and I want to customize popover style from thetimepicker
component's style file like:Current behavior: nested element selector is NOT working since during the scss compilation phase it adds
.sc-my-timepicker
class to themy-popover
selector and the compiled CSS file becomes sth like this:the problem is root component's scope id (
sc-my-timepicker
) is NOT being added to the nested component's classNames. So the selector which is defined in root component is NOT working.Expected Behavior
works as expected
current:
expected:
System Info
Steps to Reproduce
https://github.com/yigityuce/stencil-v4-sc-nested-css-scope-id
Code Reproduction URL
https://github.com/yigityuce/stencil-v4-sc-nested-css-scope-id
Additional Information
No response
The text was updated successfully, but these errors were encountered: