-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Cover image block markup in the front-end #2902
Comments
I think having some styling is important. I also think we have to be cautious that a lot of themes handle fonts kind of badly. Maybe we can look at a % middle ground. |
Heading would also need a class for styling if wp-block-cover-image h2,
wp-block-cover-image h3,
wp-block-cover-image h4,
wp-block-cover-image h5,
wp-block-cover-image h6 {
}
So does the Gutenberg :) |
I wonder if we should not use a heading at all here. |
Good question 🙂 If I'm not wrong, the Ideally, users should be allowed to use the markup they want in this block. About ths
I don't see how a background image and a heading can be considered a thematic grouping of content. |
@mtias maybe worth checking if there are other cases were hardcoded markup gets output. I no case WordPress and Gutenberg should output markup that can't be filtered. Want me to open a new issue? |
Markup suggestion, no hardcoded <div class="wp-block-cover-image has-background-dim" style="background-image:url(http://wordpress-svn/src/wp-content/uploads/2017/09/abc.jpg)">
<h2 class="wp-block-cover-image-title">Donate Now – We need you</h2>
</div> Or without heading at all: <div class="wp-block-cover-image has-background-dim" style="background-image:url(http://wordpress-svn/src/wp-content/uploads/2017/09/abc.jpg)">
<p class="wp-block-cover-image-text">Donate Now – We need you</p>
</div> |
I think button-like-link is coming to this block also. |
This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs. |
This is now merged. |
Markup:
<section class="wp-block-cover-image has-background-dim" style="background-image:url(http://wordpress-svn/src/wp-content/uploads/2017/09/abc.jpg)"> <h2>Donate Now – We need you</h2> </section>
<section>
should not be used, should be<div>
instead.<h2>
should not be hardcoded, it may be wrong heading level for correct heading hierarchy.Quick note about CSS.
Let theme handle font-size of the heading. At least it should not use
pt
.background
should bebackground-color
.The text was updated successfully, but these errors were encountered: