Skip to content

Commit

Permalink
Fix buttons styling for old markup (#21642)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 16, 2020
1 parent 3435637 commit 8f29634
Showing 1 changed file with 13 additions and 4 deletions.
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

0 comments on commit 8f29634

Please sign in to comment.