# Future
# Preset style
use a function to preset style group, the style group will transmit into useStyle. when using elements in this group, useStyle will invoking this preset style to create css list.
import { useStyle,setPreStyle } from "lazycss-base"
let presetStyle = setPreStyle({
//When useStyle calls presetStyle, it passes in a value parameter, which can be used to return the CSS style sheet
preDemo: (value: any) => { return { width: value } }
//The returned stylesheet needs to be a K:V collection and be named with a hump, which useStyle automatically converts to a bar
})
let style = useStyle({
demo: {
preDemo: "example",
}
}, presetStyle)
# Automatic suffix
There will be an automated suffix function that works with setUnit to easily add units.
# Compiler
Move the compile of the CSS up to compile time and separate the CSS.
# Letter match
Use a CSS style sheet that uses a special style definition to define a matching character
import { useStyle } from "lazycss-base"
let style = useStyle({
'col-?': (variable: string) => {
//match col-1,col-2...,col-test,col-abab-bbca
return {
width: variable
}
}
})