Skip to content

Conversation

@WebVPF
Copy link
Contributor

@WebVPF WebVPF commented Jan 21, 2025

This property (which has been removed) overrides the font size for all buttons. This causes the font to display incorrectly for buttons of different sizes: https://wintercms.com/docs/v1.2/ui/controls/button#sizes

Screenshot before:
btn-before

Screenshot after:
btn-after


Initially, the font-size property is already defined here:

.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);

If we want the default font size to be 13px (as overridden in the property I removed), then perhaps we should change the @font-size-base parameter to @font-size-base - 1

Correct to:

.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base - 1; @line-height-base; @border-radius-base);

I don't remember if it is possible to pass a calculated expression in parameters for LESS

Mixin:


Class sizes are listed here

// Button Sizes
// --------------------------------------------------
.btn-lg {
// line-height: ensure even-numbered height of button next to large input
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}
.btn-sm {
// line-height: ensure proper height of button next to small input
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
.btn-xs {
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}


I don't have the technical ability to recompile styles from LESS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant