Clone this repo:
  1. 43dbfe8 Updates version (#57) by Leon Senft · 4 weeks ago master 0.14.0
  2. 8d73c0e Updates version (#55) by Leon Senft · 5 weeks ago 0.13.7
  3. cf59331 Restricts examples test to VM due to file I/O (#54) by Leon Senft · 6 weeks ago
  4. 4eb2b17 Added a samples test to test csslib on common css frameworks (#51) by Jarrett Tierney · 6 weeks ago
  5. 22a3519 Supports at-rules nested within at-rules (#52) by Leon Senft · 6 weeks ago

CSS parser library for Dart

This is a CSS parser written entirely in Dart. It can be used in the client/server/command line.

This package is installed with Pub, see: install instructions for this package.


Parsing CSS is easy!

import 'package:csslib/parser.dart' show parse;
import 'package:csslib/css.dart';

main() {
  var stylesheet = parse(
      '.foo { color: red; left: 20px; top: 20px; width: 100px; height:200px }');

You can pass a String or list of bytes to parse.

Running Tests

Basic tests can be found in this repository:

pub run test

The full CSS test suite can be found in

cd ../csslib-test-suite