import { deref } from "@thi.ng/api/deref" ; import { isFunction } from "@thi.ng/checks/is-function" ; export const css = ( rules ) => { let css = "" ; let v ; for ( let r in rules ) { v = deref ( rules [ r ] ) ; isFunction ( v ) && ( v = v ( rules ) ) ; v != null && ( css += `${ r }:${ v };` ) ; } return css ; } ;