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

Indicate when a block has custom padding styles applied #24337

Open
richtabor opened this issue Aug 3, 2020 · 2 comments
Open

Indicate when a block has custom padding styles applied #24337

richtabor opened this issue Aug 3, 2020 · 2 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

Is your feature request related to a problem? Please describe.
With the new padding styles added to the Cover (and other blocks soon) #21492, there should be a way to programmatically indicate that a block has a custom padding style set. This way, a theme's default padding styles previously associated with these blocks can be ignored if that class is present (only applying padding with :not(.has-custom-padding) or the like).

Describe the solution you'd like
A .has-custom-padding class is added to the block, the same way other attributes are indicated (such as .has-background, .has-background-dim and other classes.

Describe alternatives you've considered
If a custom padding style is added to a block, I would have to add a class manually via the Advanced settings panel, in order to ignore a theme's pre-configured block padding. Not ideal.

Screenshot
Screen Shot 2020-08-03 at 1 03 56 PM

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 3, 2020
@getsource
Copy link
Member

Do you think the approach in #30074 makes sense, or is there a better place higher up to add the class?

@getsource
Copy link
Member

@richtabor Do you still think it makes sense to do this, given that it's able to be controlled by block themes directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants