Page 1 of 1
mixin button-states - SIZE GENERATOR
Posted: 26 Aug 2021, 16:24
by majlor
Hi,
in PrimeReact designer, at: assets/designer/mixins.scss is the one mixin: @mixin button-states
This mixin creates 90 KB of CSS code
only for button components.
Are you crazy ?
Please check it !
Re: mixin button-states - SIZE GENERATOR
Posted: 13 Sep 2021, 14:43
by mert.sincan
Hi,
I'll check and get back to you. Thanks a lot for your report!
Best Regards,
Re: mixin button-states - SIZE GENERATOR
Posted: 01 Oct 2021, 08:34
by mert.sincan
Hi,
Thanks a lot for the report! I made some changes related to @mixin button-states. Firstly, if we remove this mixin completely, we have to add the content of this mixin in all the files where this mixin occurs. For example :hover, :focus state for buttons. My tests;
- Current @include button-state -> 220KB
- Without @include button-state -> 167KB
- After new changes -> 183KB (+16KB) (it allows users to activate button states within custom HTML elements.)
Best Regards,