webcomponents / webcomponents/polyfills
Shady Parts: don't call _applyStyleProperties twice
Open
Focus Area: Standards & Polyfills
Package: shadycss
Type: Feature
wontfix
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Currently, when an instance consumes a ::part rule that consumes a custom property, and native custom properties are not available, `_applyStyleProperties` ends up getting run twice. Once is the normal case, via `styleElement` when the instance is connected. Then again, after the DOM has stamped and we notice that there are part rules to handle.
It might make sense to skip the first `_applyStyleProperties` if we know that an instance might be receiving a part rule with a custom property.
Contributor guide
Assessment
This issue has not been assessed yet.