-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added support of fallback properties in makeStaticStyles (#558)
* added fallback values support in makeStaticStyles * Change files * added the section for docs * Change files * PR review --------- Co-authored-by: Oleksandr Fediashov <olfedias@microsoft.com>
- Loading branch information
1 parent
1a56464
commit f545363
Showing
9 changed files
with
123 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
change/@griffel-core-ab50eb51-b848-4e58-9a18-83d8598558f3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "feat: add fallback values support in makeStaticStyles", | ||
"packageName": "@griffel/core", | ||
"email": "chhabrashubhdeep@gmail.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@griffel-style-types-fdb1d662-dcbb-4ec1-8430-c491a3105f1c.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "feat: add support for fallback values in GriffelStaticStyle", | ||
"packageName": "@griffel/style-types", | ||
"email": "chhabrashubhdeep@gmail.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import type { GriffelStaticStyles } from '@griffel/style-types'; | ||
|
||
function assertType(styles: GriffelStaticStyles): GriffelStaticStyles { | ||
return styles; | ||
} | ||
|
||
// Basic styles | ||
// | ||
|
||
assertType('html { line-height: 20px; }'); | ||
|
||
assertType({ | ||
body: { | ||
color: 'red', | ||
}, | ||
}); | ||
assertType({ | ||
'@font-face': { | ||
fontFamily: 'My Font', | ||
src: `url(my_font.woff)`, | ||
}, | ||
}); | ||
|
||
// Styles with fallbacks | ||
// | ||
|
||
assertType({ | ||
body: { | ||
display: ['flex', '-webkit-flex'], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters