Core of CCSS and APIs for extending it with new features.
Awaits a style object and returns a CSS string.
Not registered keys will be used will be ignores, unless
you're using the
values not existing in a map will be "printed" as-is.
Creates a custom CCSS function with your own configuration.
It awaits an options object (usually created by
Options are the most important part. One option object is tied to one CCSS function.
Allows you to add support for custom properties or override existing ones, set value maps, set custom units, etc.
Creates the default properties object and adds support for extending it with your own props.
Prop function arguments
props object is awaiting a function for your custom property.
input: The input value of the property.
prop: The property's name.
options: The options object used with this call.
original: The complete object passed initially to CCSS.
Creates the default value map object and adds support for extending it with your own values. It's simply matching a prop and it's value with another value.
Creates the default pseudo map and allows you to add your own pseudo selectors.
Output transformers are describing how CCSS should assemble your final output.
Let's create an
outputTransformer which will output your results as an array:
By default, unsupported props (not found in props objects) are ignored.
However, there edge cases when you need to pass custom stuff. You can
do that with using a prop name
unsupported which can be:
true: All unsupported props are processed.
- Array of prop names supported
CCSS supports 3 types of namings. These are for those who don't really like to use the shorthands and would like to use long naming instead.
- Short: default, 1-2-3 letter substitutes of the original version (bgc)
- Light: shorter, but still meaningful names (bgColor).
- Full: full style object names, just like in any other libraries (backgroundColor).