winter icon indicating copy to clipboard operation
winter copied to clipboard

UI - Fixed font size of buttons

Open WebVPF opened this issue 11 months ago • 0 comments

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: https://github.com/wintercms/winter/blob/206e73847cf65f87e3ca12862859223cc1b8a785/modules/system/assets/ui/less/button.base.less#L15

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: https://github.com/wintercms/winter/blob/206e73847cf65f87e3ca12862859223cc1b8a785/modules/system/assets/ui/less/button.mixins.less#L97


Class sizes are listed here https://github.com/wintercms/winter/blob/206e73847cf65f87e3ca12862859223cc1b8a785/modules/system/assets/ui/less/button.base.less#L147-L160


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

WebVPF avatar Jan 21 '25 11:01 WebVPF