Skip to main content

jx_engine 0.2.1 copy "jx_engine: ^0.2.1" to clipboard
jx_engine: ^0.2.1 copied to clipboard

discontinuedreplaced by: jx_cli
retracted[pending analysis]

JX CSS compilation engine: turns utility classes into mobile-first sorted CSS, on the server or in the browser.

jx_engine #

The JX CSS compilation engine: it turns a string of utility classes into CSS, sorted mobile-first. It runs on the Dart VM and in the browser.

This package is part of JX CSS (ZASPR Kit), a utility-first CSS framework written in Dart. To style an application, install jx_cli instead.

Installation #

dart pub add jx_engine

Usage #

import 'package:jx_engine/jx_engine.dart';

void main() {
  final result = JxEngine().compile('p:4 md:p:8 hover:bg:blue-700 c:red!');
  print(result.css);       // generated stylesheet
  print(result.ruleCount); // number of rules
  print(result.warnings);  // rejected classes, with suggestions
}

Supported variants are exposed by JxVariantResolver: defaultBreakpoints, defaultPseudoClasses, defaultPseudoElements and defaultMediaVariants (dark, motion-safe, motion-reduce, print…), plus the relational group-* and peer-* variants.

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.

0
likes
0
points
216
downloads

Publisher

unverified uploader

Weekly Downloads

JX CSS compilation engine: turns utility classes into mobile-first sorted CSS, on the server or in the browser.

Repository (GitHub)
View/report issues

Topics

#css #utility-first #jaspr

License

(pending) (license)

Dependencies

jx_core, jx_generator, jx_parser, jx_rules, jx_theme

More

Packages that depend on jx_engine