I am not entirely sure why WordPress’s basic button design is so bad, but fortunately, it is easy enough to change. If you are like me and get tired of adding a class to every button, you can just add this CSS snippet to align the default button with ACSS. Adjust as needed.
.wp-block-button__link {
background: var(--primary);
color: var(--white);
padding-block: var(--btn-padding-block);
padding-inline: var(--btn-padding-inline);
min-inline-size: var(--btn-min-width);
line-height: var(--btn-line-height);
font-size: var(--btn-font-size, var(--text-m));
font-weight: var(--btn-font-weight);
font-style: var(--btn-font-style);
text-transform: var(--btn-text-transform);
letter-spacing: var(--btn-letter-spacing);
text-decoration: var(--btn-text-decoration);
border-width: var(--btn-border-width);
border-style: var(--btn-border-style);
border-radius: var(--btn-radius);
border-color: var(--btn-border-color);
transition: var(--btn-transition, var(--transition));
justify-content: var(--btn-justify-content, center);
text-align: var(--btn-text-align, center);
margin-block:var(--content-gap);
&:hover{
background: var(--primary-hover);
color:var(--white);
}}CSSIf you are actively using the ACSS global styles panel, you can use
.wp-element-button{
@include btn('primary')
}CSS
Leave a Reply