Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box Shadow color doesn't change on Section Columns #1723

Closed
RohanSharma2598 opened this issue Jun 20, 2023 · 6 comments · Fixed by #1825
Closed

Box Shadow color doesn't change on Section Columns #1723

RohanSharma2598 opened this issue Jun 20, 2023 · 6 comments · Fixed by #1825
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. released Indicate that an issue has been resolved and released in a particular version of the product. tiny (1h) - This label is used for issues that can be completed in under an hour.

Comments

@RohanSharma2598
Copy link

Description

The customer reported this bug. When adding a Section with let's say two columns and trying to place the Box Shadow to the column, the color of the box shadow can't be changed and no matter what color is selected in the settings, it will always show Black color on the shadow.

Step-by-step reproduction instructions

  1. Go to Edit Page and Add a section with two columns
  2. Select one of the column and go to the Section Column Settings > Style > Border, Enable Box Shadow and try applying the Box Shadow with any random color and save the changes.
  3. Check the shadow on the frontend and the color will show black.

Screenshots, screen recording, code snippet or Help Scout ticket

Help Scout: https://secure.helpscout.net/conversation/2264389122/372067?folderId=212385

Environment info

No response

Is the issue you are reporting a regression

No

@RohanSharma2598 RohanSharma2598 added the bug This label could be used to identify issues that are caused by a defect in the product. label Jun 20, 2023
@pirate-bot pirate-bot added the customer report Indicates the request came from a customer. label Jun 20, 2023
@Soare-Robert-Daniel
Copy link
Contributor

This happens when using color from the presets. The presets offer a string of a CSS variable name instead of the color value.

image

@HardeepAsrani, do you think it is better to remove the presets options?

@HardeepAsrani
Copy link
Member

@Soare-Robert-Daniel If I remember, we use a same workflow in some other part of Otter to fetch the variable value and use it instead?

@Soare-Robert-Daniel
Copy link
Contributor

In Flip, if you have an opacity lower than 100, when you select a color with CSS var, we get the color from that var.

const changeBoxShadowColorOpacity = value => {
const changes = { boxShadowColorOpacity: value };
if ( 100 > value && attributes.boxShadowColor?.includes( 'var(' ) ) {
changes.boxShadowColor = getComputedStyle( document.documentElement, null ).getPropertyValue( attributes.boxShadowColor.replace( 'var(', '' ).replace( ')', '' ) );
}
setAttributes( changes );
};

@HardeepAsrani
Copy link
Member

@Soare-Robert-Daniel Yes, we can't have the same thing here?

@Soare-Robert-Daniel
Copy link
Contributor

We can.

@Soare-Robert-Daniel Soare-Robert-Daniel added the tiny (1h) - This label is used for issues that can be completed in under an hour. label Aug 23, 2023
@pirate-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. released Indicate that an issue has been resolved and released in a particular version of the product. tiny (1h) - This label is used for issues that can be completed in under an hour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants