Skip to content

Use PostCSS to check if a given string is a valid CSS (and get list of all errors)? #1555

Answered by ai
Stvad asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to use PostCSS to verify if a given string is a valid CSS and get all syntax errors if it isn't?

PostCSS does not check syntax inside declaration values and at-rule params.

It is better to use csstree by @lahmatiy which validates more errors.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Stvad
Comment options

@ai
Comment options

@Stvad
Comment options

@johnsoncherian
Comment options

@Stvad
Comment options

Answer selected by Stvad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants