pseudom 1.0.1 copy "pseudom: ^1.0.1" to clipboard
pseudom: ^1.0.1 copied to clipboard

A Dart package for CSS parsing and manipulation, with added support for custom pseudo selectors.

pseudom #

A Dart package for CSS parsing and manipulation, with added support for custom pseudo selectors.

Features #

  • Parses CSS strings into a structured representation that can be manipulated programmatically.
  • Supports custom pseudo selectors allowing users to define their own logic for handling them.
  • Can query on HTML nodes from the html package

Getting started #

To start using this package, add pseudom and html to your pubspec.yaml:

dependencies:
  pseudom: ^1.0.0
  html: any

Then run dart pub get or flutter pub get to install the package.

Usage #

import 'package:pseudom/pseudom.dart';

void main() {
  // Add custom pseudo selector handler
  PseudoSelector.handlers['selector-name'] = (Element element, String? args) => true;
}

For detailed usage and examples, see the documentation.

Currently Supported Selectors #

Selector Description
:empty Element should be empty.
:has( Element has something matching the selector.
:first Element is first in parent.
:last Element is last in parent.
:contains(text) Element contains text.
:icontains(text) Element contains text (case insensitive).

Additional information #

For more information, visit the package on pub.dev. To contribute to the package, file issues, or find more information, visit the GitHub repository.

1
likes
120
pub points
0%
popularity

Publisher

unverified uploader

A Dart package for CSS parsing and manipulation, with added support for custom pseudo selectors.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

antlr4, html

More

Packages that depend on pseudom