commit | 87d54ac2076121460903e486e619209094940634 | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Mon Oct 17 13:38:34 2016 -0700 |
committer | GitHub <noreply@github.com> | Mon Oct 17 13:38:34 2016 -0700 |
tree | 6ffe4373c982a45bcf4429535566744dc55c4a9b | |
parent | a40f8abfe0c475fbc97cd14069f71496ea76552a [diff] | |
parent | a4141cac54a916d59459fd024a838a3bfe4f8b4b [diff] |
Merge pull request #24 from dart-lang/fix-strong-mode-errors Fix new strong mode error
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