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 and ockham committed Oct 4, 2022
1 parent 1838f32 commit d998d78
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 @@ -234,6 +234,7 @@ describe( 'getCSSRules', () => {
letterSpacing: '12px',
textTransform: 'uppercase',
},
shadow: '10px 10px red',
},
{
selector: '.some-selector',
Expand Down Expand Up @@ -276,45 +277,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 d998d78

Please sign in to comment.