2

I'm searching for a function (perhaps there is one in the .Net-Framework) which I can use to validate CSS-syntax for different version (CSS 3.0, 2.0). It can also be a CSS parser with build-in validation. Any suggestions for a library or tool that i can use?

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179

2 Answers2

1

for validation, try regex,
try this pattern /([A-Za-z0-9 ]+:[A-Za-z0-9 ]+;$)+/i

Ankur
  • 5,086
  • 19
  • 37
  • 62
rbmeo
  • 26
  • 4
1

take a look at ExCSS, it can parse CSS 2.1 and CSS 3,

https://github.com/TylerBrinks/ExCSS

Amine Hajyoussef
  • 4,381
  • 3
  • 22
  • 26