(ident: string, initialValue?: string, syntax?: string)
| 157 | } |
| 158 | |
| 159 | function property(ident: string, initialValue?: string, syntax?: string) { |
| 160 | return atRule('@property', ident, [ |
| 161 | decl('syntax', syntax ? `"${syntax}"` : `"*"`), |
| 162 | decl('inherits', 'false'), |
| 163 | |
| 164 | // If there's no initial value, it's important that we omit it rather than |
| 165 | // use an empty value. Safari currently doesn't support an empty |
| 166 | // `initial-value` properly, so we have to design how we use things around |
| 167 | // the guaranteed invalid value instead, which is how `initial-value` |
| 168 | // behaves when omitted. |
| 169 | ...(initialValue ? [decl('initial-value', initialValue)] : []), |
| 170 | ]) |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Apply opacity to a color using `color-mix`. |
no test coverage detected