@JvP, the “ranges” function only works for the slider portion of a unit picker. So with your settings above, those would be respected while you drag the slider back and forth, but you can still always enter whatever value you want (as long as its units are allowed) in the input manually. This is how unit pickers work in the main tool as well…sliders have ranges tied to them, but users can still go into the input and manually override to any value they want, even if it is outside the range of the slider.
As for your question on the “padding” type you can use as a preset for sliders, that means it has it’s ranges tuned for general padding to be used inside an element. For example, sliders can be set to have a min
value that is negative if needed…this can be used on things like margins, but negative values are not allowed on padding, so the padding preset does not allow negative values. The padding preset is setup thusly with the following ranges:
'padding' : {
slider : true,
units : sizeUnitsAll,
keywords : [],
ranges : {
'px' : { 'min' : 0, 'max' : 100, 'step' : 5 },
'em' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'rem' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'%' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'vw' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'vh' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'vmin' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
'vmax' : { 'min' : 0, 'max' : 5, 'step' : 0.25 },
},
},
The basic idea is that you have some simple ranges to work with to create internal padding in elements like lists, cards, buttons, et cetera. Generally, you shouldn’t need something larger than these values in those situations, and if you do, you can map in your own custom ranges if you desire.
Hopefully that helps to clear things up!