-
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
Button block markup in the front-end #2907
Comments
The button is currently one of the most hideous markup wise for me. Would |
I don't think I think we should start with a small change and add styles to |
It's a small step for progressive improvements to the button, make sense to me 🙂 |
Moving the styles from The screenshot shows the target area highlighted in Firefox's inspector. You can see the discrepancy between the link and the styled div. I'm curious (and I'll search back to see what earlier discussions might have been on this), why is the button block not generating an HTML button element? I noticed, as an example, the green "comment" button in the Github issues editor is an actual HTML button. |
It's because button block is "always" going to be a link ( |
closed by #3445 |
Markup:
<div class="wp-block-button alignnone"><a href="http://wordpress-svn/src/">This is button</a></div>
Markup with background-color:
<div class="wp-block-button aligncenter" style="background-color:#cf2e2e"><a href="#">Modified button</a></div>
<a>
element itself.Conclusion and proposal
I'd like to propose a little different markup and put styles to
<a>
element.<div class="wp-block-button aligncenter"><a href="#" style="background-color:#cf2e2e">Modified button</a></div>
<a>
element:<a class="button">This is link like a button</a>
The text was updated successfully, but these errors were encountered: