hasStyle: incorrect child components check in case of nested CSS
See original GitHub issueUPD. The real description of the problem is here.
Hi guys, I’ve just noticed that zIndex
doesn’t work with hasStyle
.
I tried also .hasStyle('z-index', '9999')
. Still false
.
What am I doing wrong? Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Nested child components lose their css when the parent is ...
The setup: I'm exporting a component as a custom element with css: true. That component makes use of a nested component.
Read more >has() - CSS: Cascading Style Sheets - MDN Web Docs
The :has() pseudo-class cannot be nested within another :has() . This is because many pseudo-elements exist conditionally based on the ...
Read more >CSS Nesting Module - W3C
This module describes support for nesting a style rule within another style rule, allowing the inner rule's selector to reference the elements ......
Read more >CSS: Nested declaration on child element is overridden by its ...
I am having problem with nested CSS declarations for nested elements. Emm.. It's really hard to describe the problem, if you don't get...
Read more >The CSS :has Selector (and 4+ Examples)
The CSS :has selector helps you select elements when they contain other elements that match the selector you pass into :has().
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, this is fixed in 1.11.1.
Hi, so I’ve got a workaround. #26 means we can pass an option to attach the component to the DOM when mount is called.
When a component has been mounted to the DOM, hasStyle will check the node without having to attach it to the DOM.
The change to hasStyle hasn’t been committed yet, but I’ll update you when it’s released. Should be by Saturday at the latest.