cssText property

String get cssText

Compiled global CSS text.

Implementation

String get cssText {
  final chunks = <String>[
    if (theme != null) _compileRootMap(':root', theme!.cssVariables),
    if (root != null) _compileRootRule(':root', root!),
    if (all != null) _compileRootRule('*', all!),
    if (html != null) _compileRootRule('html', html!),
    if (body != null) _compileRootRule('body', body!),
    if (links != null) _compileRootRule('a', links!),
    for (final entry in selectors.entries)
      _compileRootRule(entry.key, entry.value),
    for (final keyframe in keyframes) keyframe.cssText,
  ];

  return chunks.where((chunk) => chunk.trim().isNotEmpty).join('\n');
}