Add commas between PercentageTerms in keyframes (#151)

Fixes #105

A previous attempt unconditionally added commas between `PercentageTerm`
values, but those terms can also show up in places where commas are not
expected.

Add state on the visitor to track whether we are in the context of a
`keyframes` rule. I _think_ these are the only rules which need comma
separated terms, and that it can't be nested in a way where naively
reverting back to `false` after leaving should cause any problems.
4 files changed
tree: a67806332ff740a773b0ace152a59bd23b94db53
  1. .github/
  2. example/
  3. lib/
  4. test/
  5. third_party/
  6. .gitignore
  7. analysis_options.yaml
  8. CHANGELOG.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

A Dart CSS parser.

Usage

Parsing CSS is easy!

import 'package:csslib/parser.dart';

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

You can pass a String or List<int> to parse.