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

Fix buttons styling for old markup #21642

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions packages/block-library/src/button/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
$blocks-button__height: 56px;

.wp-block-button {
// Prefer the link selector instead of the regular button classname
// to support the previous markup in addition to the new one.
.wp-block-button__link {
color: $white;
background-color: $dark-gray-700;
border: none;
Expand Down Expand Up @@ -32,15 +34,22 @@ $blocks-button__height: 56px;
}
}

.wp-block-button.is-style-squared {
// the first selector is required for old buttons markup
.wp-block-button.is-style-squared,
.wp-block-button__link.wp-block-button.is-style-squared {
border-radius: 0;
}

.wp-block-button.no-border-radius {

// the first selector is required for old buttons markup

.wp-block-button.no-border-radius,
.wp-block-button__link.wp-block-button.no-border-radius {
border-radius: 0 !important;
}

.wp-block-button.is-style-outline {
.wp-block-button.is-style-outline,
.wp-block-button__link.is-style-outline {
color: $dark-gray-700;
background-color: transparent;
border: 2px solid;
Expand Down