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.

Issue with the nested styles (third level)

See original GitHub issue

Hi!

Just updated postcss-nested to v. 5.0.5 (from 5.0.3) and got this issue.

This is my .sss file:

...
.text
  ...
  &:hover
    border-color: red
      &:before
        color: red
  ...

And I got this as a result:

.text:hover {
    border-color: red;
    &: :before {;
    color: red;
    }: ;
}

What seems to be the problem here? And how can I fix it properly? Thnx in advance.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:23 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Apr 29, 2021

Seems like a strange bug in the new PostCSS 8 event system.

I will have a relocation this week, so if you want to fix it quicker, try to investigate what is happening here https://github.com/postcss/postcss-nested/blob/main/index.js#L143-L155

0reactions
naxxateuxcommented, Jun 21, 2021

Guys, thnx for investigation and fix. Sorry for not responding — I was on vacation 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested styles in TikZ - TeX - LaTeX Stack Exchange
but tikz complains: Illegal parameter number in definition of \pgfkeys@temp. How do I let it know that the 2 arguments are for the...
Read more >
Why is third-level nested SortableJS drag-and-drop not ...
Sections can be dragged and reordered among one another, Questions can be dragged within their parent Section, or into another Section, and ...
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 - Sass Best Practices – Nesting more than 3 levels deep
When I use lists I almost always require 3 levels of nesting. ... Usually I reserve that 3rd level for pseudo elements and...
Read more >
CSS Nesting Module Level 3
2. Nesting Selector: the & selector ... When using a nested style rule, one must be able to refer to the elements matched...
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