commit | 2b4ab14c36a2b1b02d6ec49459bb835326c0cdf9 | [log] [tgz] |
---|---|---|
author | Leon Senft <leonsenft@users.noreply.github.com> | Fri May 12 13:39:31 2017 -0700 |
committer | GitHub <noreply@github.com> | Fri May 12 13:39:31 2017 -0700 |
tree | dcb801b14bbb4c5919be574e74f7f42c5f4ef4ff | |
parent | e079c45d60d2359815c4f8df2f1e0bafd36680ad [diff] | |
parent | cd6daadb2b2c2d1efdedfa4d9b3fe2c5c4613b6b [diff] |
Merge pull request #48 from leonsenft/improve-term-errors Prevents exception for invalid dimension terms
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 }'); print(stylesheet.toString()); }
You can pass a String or list of bytes to parse
.
Basic tests can be found in this repository:
pub run test
The full CSS test suite can be found in https://github.com/dart-lang/csslib-test-suite
cd ../csslib-test-suite ./run.sh