Skip to content

Commit

Permalink
Theme.json: fix some shadow properties doesn't work properly on the s…
Browse files Browse the repository at this point in the history
…ite editor (#44569)
  • Loading branch information
t-hamano authored Sep 29, 2022
1 parent 4e0936c commit 0c807b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
'typography',
'filter',
'outline',
'shadow',
].includes( key )
);

Expand Down
22 changes: 14 additions & 8 deletions packages/style-engine/src/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ describe( 'getCSSRules', () => {
style: 'dashed',
color: 'red',
},
shadow: '10px 10px red',
},
{
selector: '.some-selector',
Expand Down Expand Up @@ -308,45 +309,50 @@ describe( 'getCSSRules', () => {
value: '5px',
},
{
key: 'fontFamily',
selector: '.some-selector',
key: 'fontFamily',
value: "'Helvetica Neue',sans-serif",
},
{
key: 'fontSize',
selector: '.some-selector',
key: 'fontSize',
value: '2.2rem',
},
{
key: 'fontStyle',
selector: '.some-selector',
key: 'fontStyle',
value: 'italic',
},
{
key: 'fontWeight',
selector: '.some-selector',
key: 'fontWeight',
value: '800',
},
{
key: 'letterSpacing',
selector: '.some-selector',
key: 'letterSpacing',
value: '12px',
},
{
key: 'lineHeight',
selector: '.some-selector',
key: 'lineHeight',
value: '3.3',
},
{
key: 'textDecoration',
selector: '.some-selector',
key: 'textDecoration',
value: 'line-through',
},
{
key: 'textTransform',
selector: '.some-selector',
key: 'textTransform',
value: 'uppercase',
},
{
selector: '.some-selector',
key: 'boxShadow',
value: '10px 10px red',
},
] );
} );

Expand Down

0 comments on commit 0c807b3

Please sign in to comment.