commit | cf59331ff06113959ad8fe7a080c592728b3307e | [log] [tgz] |
---|---|---|
author | Leon Senft <leonsenft@users.noreply.github.com> | Thu May 18 11:01:15 2017 -0700 |
committer | GitHub <noreply@github.com> | Thu May 18 11:01:15 2017 -0700 |
tree | 012c9d6d11874e5d4d67b4e84d5dcb40cb66743c | |
parent | 4eb2b176a199092f4c13b6e12641fa18f41c2c3a [diff] |
Restricts examples test to VM due to file I/O (#54)
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