blob: 8b8efc549d98378e430cd368aa68797d48090d4d [file] [log] [blame] [view] [edit]
> [!IMPORTANT]
> This repo has moved to https://github.com/dart-lang/tools/tree/main/pkgs/csslib
[![Dart CI](https://github.com/dart-lang/csslib/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/csslib/actions/workflows/test-package.yml)
[![pub package](https://img.shields.io/pub/v/csslib.svg)](https://pub.dev/packages/csslib)
[![package publisher](https://img.shields.io/pub/publisher/csslib.svg)](https://pub.dev/packages/csslib/publisher)
A Dart [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) parser.
## Usage
Parsing CSS is easy!
```dart
import 'package:csslib/parser.dart';
void 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`.