config library

This library lets you change the way CSS rule is inserted into the DOM and change how unique class names are generated.

The config needs to be done before any function in this package is called.

import 'config.dart' as config;

String generateAwesomeName() => 'awesome';

void main() {
  config.generateUniqueName = generateAwesomeName;
}

Classes

AbstractStyleSheet
An interface for managing CSS rules. [...]
BrowserStyleSheet
A stylesheet which will insert rules into a <style> tag. [...]
ServerStyleSheet
A stylesheet which will concatenate rules into a string that can be used for server-side rendering. [...]

Constants

isDev → const bool
Determine if the web is running in production mode or not. [...]
const String.fromEnvironment('dss') != 'prod'
isServer → const bool
Determine if DSS is running on the server. [...]
const String.fromEnvironment('dss') == 'server'

Properties

generateUniqueName NameGenerator
A unique class name generator which will be used across the library. [...]
read / write
sheet AbstractStyleSheet
An AbstractStyleSheet which will be used to manipulate CSS styles across the library. [...]
read / write

Functions

generateIncrementalName() → String
The default NameGenerator. [...]

Typedefs

NameGenerator() → String
An interface for a unique class name generator.