Open tkrugg opened 9 years ago
Margins are needed for the thumb? If you don't get them the thumb will be drawn outside of the widget box?
probably. It still looks clumsy though. IMHO, the following looks better
I removed this line to reach this result.
I agree it looks better in this particular case but in general it might be problematic (example: you put the slider in a grid cell). What is important is that the user can do it if they want to (from the outside). If you confirm this is feasible I think we should close that issue.
I removed this line to reach this result.
But just removing this line it doesn't look so good when the knob is at the left extremity:
just removing this line it doesn't look so good when the knob is at the left extremity.
ok, but that's rather an implementation choice of d-slider. I think you'd agree that we could have implemented it so that when value="0", ie in the left-most position, the thumb doesn't step out of the rail.
@cjolif: you put the slider in a grid cell
but that's also true for a input[type=text] or any form element. The only point i'm raising here is that for the bootstrap theme, our form elements should behave the same way other bootstrap form elements do and fit in nicely inside bootstrap forms without requiring more tweaking from the user.
Another way to put this could be: if you have in a grid cell a input[type=text], a select, a combobox, a d-slider, you should not need to adjust the padding of each cell individually -- again, only for the bootstrap theme.
ok, but that's rather an implementation choice of d-slider. I think you'd agree that we could have implemented it so that when value="0", ie in the left-most position, the thumb doesn't step out of the rail.
But then you get other issues, like how to compute the position of the thumb. Currently the center of the thumb is the value. With that type of design it is neither the center, neither the left, nor the right. I'm not saying this is impossible, this is feasible to design this but as of today I hardly see us paying the price for that. Keeping this as an enhancement.
ok, but that's rather an implementation choice of d-slider. I think you'd agree that we could have implemented it so that when value="0", ie in the left-most position, the thumb doesn't step out of the rail.
FWIW, I think this can be done pretty easily by giving the d-slider-bar
element two siblings for the ends of the slider.
<d-slider>
<div class="d-slider-bar-start">
<div class="d-slider-bar">...</div>
<div class="d-slider-bar-end">
</d-slider>
has margins that mess up the alignment of basic bootstrap forms
Link to manual test