Marco - CSS Macro Library
[[toc]] This is a lightweight (and low level) CSS utilities library aimed at simplifying and standardizing common CSS patterns. It provides a utility function for generating CSS properties and values dynamically.
Installation
This library is implemented in both TypeScript and PHP. You can install the TypeScript version via npm:
and the PHP version via composer:
Usage
This will generate the following CSS string:
More docs coming soon…
Patterns
The below are the predefined patterns that can be used with the replace
function. It is not an exhaustive list and intutive patterns are implemented as needed.
For example, only “saturate-(0, 50, 100, 150, 200)” are documented here, but any value can be used with the “saturate” pattern. (saturate-x where x is a number will be replaced with “filter: saturate({x / 100});”)
View Patterns
{!!patterns!!}
Colors
View Colors
{!!colors!!}