Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 CSS parser doesn't support nested pseudo classes #3532

Closed
1 task done
Zombobot1 opened this issue Jul 27, 2024 · 1 comment
Closed
1 task done

🐛 CSS parser doesn't support nested pseudo classes #3532

Zombobot1 opened this issue Jul 27, 2024 · 1 comment

Comments

@Zombobot1
Copy link

Environment information

CLI:
  Version:                      1.8.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.5.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.20"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

Crashes on:

.about {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 500px;

  .welcome {
    p:first-child {
      width: 100%;
    }

    p:last-child {
      text-align: center;
    }
  }

  .hierarchy {
    display: flex;

    .hierarchy-item:nth-child(2) {
      padding-left: 12px;
    }

    .hierarchy-item:nth-child(3) {
      padding-left: 24px;
    }
  }
}

Error log:

$ biome lint --write --unsafe --error-on-warnings .
./src/UBook.css:86:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Unexpected value or character.
  
    84 │     max-width: 350px;
    85 │ 
  > 86 │     p:first-child {
       │                   ^
  > 87 │       width: 100%;
       │       ^^^^^^^^^^^
    88 │       text-align: center;
    89 │       font-weight: 700;
  
  ℹ Expected one of:
  
  - identifier
  - string
  - number
  - dimension
  - ratio
  - custom property
  - function
  

./src/UBook.css:93:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Unexpected value or character.
  
    91 │     }
    92 │ 
  > 93 │     p:last-child {
       │                  ^
  > 94 │       text-align: center;
       │       ^^^^^^^^^^^^^^^^^^
    95 │     }
    96 │   }
  
  ℹ Expected one of:
  
  - identifier
  - string
  - number
  - dimension
  - ratio
  - custom property
  - function
  

./src/UBook.css:96:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Expected a qualified rule, or an at rule but instead found '}'.
  
    94 │       text-align: center;
    95 │     }
  > 96 │   }
       │   ^
    97 │ 
    98 │   .hierarchy {
  
  ℹ Expected a qualified rule, or an at rule here.
  
    94 │       text-align: center;
    95 │     }
  > 96 │   }
       │   ^
    97 │ 
    98 │   .hierarchy {
  

./src/UBook.css:117:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Expected a qualified rule, or an at rule but instead found '}'.
  
    115 │     }
    116 │   }
  > 117 │ }
        │ ^
    118 │ 
  
  ℹ Expected a qualified rule, or an at rule here.
  
    115 │     }
    116 │   }
  > 117 │ }
        │ ^
    118 │ 
  

Checked 11 files in 13ms. No fixes applied.
Found 4 errors.
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Some errors were emitted while running checks.

Similar to #3287

Expected result

Doesn't crash

Code of Conduct

  • I agree to follow Biome's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants