Closed Swizz closed 3 years ago
Good point. This type of thing was definitely not a core design choice on my part. The simple truth is that there are so many variables that I simply missed out on places where the calc()
function could be used to great effect. The example you gave with the switch is a great example of such a scenario. There are probably many more places where calc()
can be used to improve the extensibility of the framework, and if someone points out more, I would greatly appreciate that.
About your specific change, I can hopefully patch this out in the next (minor) release.
This has been fixed in the latest release. Moreover, I have created a pinned issue to finding other places where calc()
can be used: https://github.com/halfmoonui/halfmoon/issues/62
Thank you for bringing this up. I will go ahead and close this.
Hi there, you did an awesome job here !
I have only one little concern. I was playing arround with
.custom-switch>(input+label)
especially about width ; when I found this :Trying to change the width of the switch, I was wondering how the
--switch-slider-left-checked
was calculated. Then I came to this :So I did a little quick search, and found another constants that are somehow calculated but written by hand ; and a little fews or no
calc()
.So here is the question :
calc
? Is this a core choice or a mistake ?Somehow, setting only a variable that will snow ball all the others ones that may depend on it, could be so powerful ! What do you think ?
Cheers,