Skip to content

Commit

Permalink
$ol_style: + gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Dec 31, 2023
1 parent 2dc7eb3 commit 9af3dbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions style/func/func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ namespace $ {
| 'rgba'
| 'var'
| 'clamp'
| 'url'
| 'scale'
| 'cubic-bezier'
| 'linear'
| 'steps'
| $mol_style_func_image
| $mol_style_func_filter

export type $mol_style_func_filter = 'blur'
export type $mol_style_func_image =
| 'url'
| 'linear-gradient'
| 'radial-gradient'
| 'conic-gradient'

export type $mol_style_func_filter =
| 'blur'
| 'brightness'
| 'contrast'
| 'drop-shadow'
Expand Down Expand Up @@ -45,6 +52,10 @@ namespace $ {
prefix() { return this.name + '(' }
postfix() { return ')' }

static linear_gradient< Value >( value : Value ) {
return new $mol_style_func( 'linear-gradient' , value )
}

static calc< Value >( value : Value ) {
return new $mol_style_func( 'calc' , value )
}
Expand Down
2 changes: 1 addition & 1 deletion style/properties/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ namespace $ {
* @see https://developer.mozilla.org/ru/docs/Web/CSS/background-image
*/
image?:
| readonly( readonly [ $mol_style_func<'url'> | string&{} ] )[]
| readonly( readonly [ $mol_style_func< $mol_style_func_image > | string&{} ] )[]
| 'none' | Common

/**
Expand Down

0 comments on commit 9af3dbf

Please sign in to comment.