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

Add wp-block class to all core blocks (editor and saved HTML) #28966

Closed
markhowellsmead opened this issue Feb 12, 2021 · 2 comments
Closed

Add wp-block class to all core blocks (editor and saved HTML) #28966

markhowellsmead opened this issue Feb 12, 2021 · 2 comments
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.

Comments

@markhowellsmead
Copy link

What problem does this address?

CSS using element selectors or descendant selectors can lead to specificity problems, hence the recommendation that developers prefer class names over more specific combinations of selectors.

The current lack of the .wp-block class name on some core blocks - for example core/heading - means that these elements have to be targeted by other means, for example .c-blocks > *.

What is your proposed solution?

Ensure that every Core Block receives the class name wp-block in the editor and in the saved HTML.

@paaljoachim paaljoachim added [Type] Enhancement A suggestion for improvement. CSS Styling Related to editor and front end styles, CSS-specific issues. labels Feb 12, 2021
@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 12, 2021

Hi this looks like a good fix to get included. Thank you for the issue @markhowellsmead Mark!

Additional conversation here: #28964

Isabel. This sounds like a good fix to get in place.
@tellthemachines

@skorasaurus skorasaurus added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Mar 23, 2021
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting.
This has been discussed and/or requested in #6639. Feel free to add your reaction and follow its progress in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants