question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hasStyle: incorrect child components check in case of nested CSS

See original GitHub issue

UPD. The real description of the problem is here.

Hi guys, I’ve just noticed that zIndex doesn’t work with hasStyle.

Alt text

I tried also .hasStyle('z-index', '9999'). Still false.

What am I doing wrong? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eddyerburghcommented, Apr 14, 2017

Hi, this is fixed in 1.11.1.

1reaction
eddyerburghcommented, Apr 12, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found