jx_rules 0.0.2
jx_rules: ^0.0.2 copied to clipboard
JX CSS utility catalog and rule registry: display, spacing, colors, typography, grid, flexbox, filters, gradients, animations.
jx_rules #
The JX CSS utility catalog and the registry that indexes it. Each rule describes the classes it accepts and the declarations it produces.
This package is part of JX CSS (ZASPR Kit), a utility-first CSS framework written in Dart. To style an application, install
jx_cliinstead.
Installation #
dart pub add jx_rules
Usage #
import 'package:jx_rules/jx_rules.dart';
void main() {
final registry = JxRuleRegistry()..registerPreset(const JxDefaultPreset());
print('Available rules: ${registry.count}');
}
Four rule types let you define your own utilities: JxStaticRule (classes without a value), JxValueRule (theme value, keyword or arbitrary value), JxKeywordRule (keywords with several declarations) and JxDynamicRule (computed declarations).
The JX CSS family #
| Package | Role |
|---|---|
jx_cli |
Command line: jx init, jx build. Entry point for most projects. |
jx_engine |
Compilation engine, usable as a library. |
jx_rules |
Utility catalog and rule registry. |
jx_theme |
Design tokens and default theme. |
jx_parser |
Class syntax parser. |
jx_generator |
CSS serialization and preflight. |
jx_core |
Shared models, contracts and exceptions. |
Documentation: https://nathanaelzie.github.io/zaspr-kit/
License #
MIT.