Skip to content

Commit

Permalink
removed background controls
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Mar 20, 2023
1 parent 27610f4 commit 637af78
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const STYLE_PATH_TO_CSS_VAR_INFIX = {
'elements.button.color.text': 'color',
'elements.button.color.background': 'color',
'elements.caption.color.text': 'color',
'elements.caption.color.background': 'color',
'elements.button.typography.fontFamily': 'font-family',
'elements.button.typography.fontSize': 'font-size',
'elements.heading.color': 'color',
Expand Down
4 changes: 0 additions & 4 deletions packages/blocks/src/api/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ export const __EXPERIMENTAL_STYLE_PROPERTY = {
value: [ 'elements', 'caption', 'color', 'text' ],
support: [ 'color', 'caption' ],
},
captionBackgroundColor: {
value: [ 'elements', 'caption', 'color', 'background' ],
support: [ 'color', 'caption' ],
},
buttonColor: {
value: [ 'elements', 'button', 'color', 'text' ],
support: [ 'color', 'button' ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function ScreenColorElement( { name, element, variation = '' } ) {
supports.includes( 'buttonColor' ) &&
isBackgroundEnabled &&
( colorsPerOrigin.length > 0 || areCustomSolidsEnabled );
} else if ( element === 'caption' ) {
isBackgroundEnabled = false;
}

const [ elementTextColor, setElementTextColor ] = useGlobalStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ function CaptionColorItem( { name, parentMenu, variation = '' } ) {
prefix + 'elements.caption.color.text',
name
);
const [ bgColor ] = useGlobalStyle(
prefix + 'elements.caption.color.background',
name
);

if ( ! hasSupport ) {
return null;
Expand All @@ -198,9 +194,6 @@ function CaptionColorItem( { name, parentMenu, variation = '' } ) {
>
<HStack justify="flex-start">
<ZStack isLayered={ false } offset={ -8 }>
<ColorIndicatorWrapper expanded={ false }>
<ColorIndicator colorValue={ bgColor } />
</ColorIndicatorWrapper>
<ColorIndicatorWrapper expanded={ false }>
<ColorIndicator colorValue={ color } />
</ColorIndicatorWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const STYLE_PATH_TO_CSS_VAR_INFIX = {
'elements.button.typography.fontFamily': 'font-family',
'elements.button.typography.fontSize': 'font-size',
'elements.caption.color.text': 'color',
'elements.caption.color.background': 'color',
'elements.heading.color': 'color',
'elements.heading.color.background': 'color',
'elements.heading.typography.fontFamily': 'font-family',
Expand Down

0 comments on commit 637af78

Please sign in to comment.