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.

Allow &-nesting of element name

See original GitHub issue

It seems as though nesting with & just concatenates whatever follows the ampersand. So { root: { '&a': { backgroundColor: ... } } } becomes: image It’d be nice to be able to & element names as well.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
garronejcommented, Aug 19, 2021

Ok, thanks for the detailed explanation.
I’ll close for now as I have no way to fix it myself. 😕
Maybe it would be worth opening an issue on the emotion repo…

PS: As you mentioned ReactRouter maybe you’d like to checkout type-route, I love this lib!

1reaction
garronejcommented, Aug 18, 2021

Thank you for reporting,
I will investigate although this is more likely to be related to emotion.
When you type this: { root: { '&a': { backgroundColor: ... } } } you want that the backgroundColor only apply if the element the class is apply to is an <a> am I correct? Like:


<div className={classes.roo} /> //Dosen't applies
<a className={classes.root} /> //Applies

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allowed nesting of elements in HTML 4 (and XHTML 1.0)
If there is no such list, no nested elements are allowed. This means that only text (#PCDATA, see next item) is allowed inside...
Read more >
Nesting tags - IBM
Nesting tags can take on many different forms and can be complex. For example, some tags allow multiple tags or multiple occurrences of...
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 >
Nested elements - HTML - Simple Dev
Elements inside of other elements are called nested elements. Sometimes the outer element will just contain other elements, as in the example above....
Read more >
HTML Elements Tutorial with Examples - TutorialBrain
HTML Element inside other element is called Nesting of an element. ... In the above example <em> and <b> tags are inside <p>...
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