commit | 518761b166974537f334dbf264e7f56cb157a96a | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch@google.com> | Fri Feb 25 12:58:22 2022 -0800 |
committer | GitHub <noreply@github.com> | Fri Feb 25 12:58:22 2022 -0800 |
tree | a67806332ff740a773b0ace152a59bd23b94db53 | |
parent | f746368a0a53cf8f68fd71b218239034e88841d5 [diff] |
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.
A Dart CSS parser.
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
.