Skip to content

Css editor does not suppport nesting #2123

Description

@Ariakas

Describe the bug

The CSS editor currently does not support nested CSS syntax. Valid nested rules are reported as errors and are not parsed correctly.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-ovqbc6kw?description=HTML/CSS/JS%20Starter&file=script.js,styles.css,index.html&terminalHeight=10&title=Static%20Starter

Steps to reproduce

  1. Open the CSS editor.
  2. Add a nested rule, for example:
.container {
    color: red;

    .title {
        color: blue;
    }
}
  1. Watch highlighted nested selectors.

Expected behavior

The editor should recognize and correctly handle CSS nesting syntax.
CSS Nesting is part of the modern CSS specification and is supported by current versions of major browsers.

Parity with Local

Screenshots

Image Image

Platform

Browser name  = Chrome
Full version  = 147.0.0.0
Major version = 147
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 OPR/131.0.0.0
performance.memory = {
  "totalJSHeapSize": 58854598,
  "usedJSHeapSize": 51003066,
  "jsHeapSizeLimit": 4294967296
}
Hash = 29a3b5f7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions