jaspr-styling

Installation
SKILL.md

Rules for Styling

Jaspr provides a native, type-safe CSS-in-Dart styling API via the Styles class.

1. Component-Level Styles (@css annotation)

The recommended approach for defining styles in Jaspr is inside your components to ensure better code locality.

  • Rule 1: You MUST use the @css annotation on a static getter returning List<StyleRule> to scope styles to a component.
  • Rule 2: You MUST use specific CSS selectors (like .main classes or #id ids) within css() to prevent your styles from bleeding into other components, as @css styles are globalized during rendering.
class App extends StatelessComponent {
  const App({super.key});
Installs
5
GitHub Stars
783
First Seen
May 26, 2026
jaspr-styling — rodydavis/signals.dart