Skip to content
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: cannot get value of inherited custom CSS prop in a shadow DOM element via E2EElement APIs #5681

Closed
3 tasks done
jcfranco opened this issue Apr 18, 2024 · 2 comments · Fixed by #5682
Closed
3 tasks done
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@jcfranco
Copy link
Contributor

Prerequisites

Stencil Version

4.16.0

Current Behavior

It is not possible to get the value of an inherited custom CSS prop in a shadow DOM E2EElement via getComputedStyle + getPropertyValue. This is due to the implementation relying on custom CSS props being exposed on the computed style object.

Expected Behavior

For shadowDomElStyles.getPropertyValue(--some-custom-prop); to resolve to the custom CSS prop value.

System Info

No response

Steps to Reproduce

See README from repro case repo.

Code Reproduction URL

https://github.com/jcfranco/stencil-e2eelement-getComputedStyle-result-is-missing-custom-css-props

Additional Information

No response

@christian-bromann
Copy link
Member

@jcfranco thanks for reporting, I raised a PR in #5682 with a fix for this.

@christian-bromann christian-bromann added the Bug: Validated This PR or Issue is verified to be a bug within Stencil label May 13, 2024
@tanner-reits
Copy link
Member

A fix for this was included in today's v4.18.2 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants