Daemonite / material

Material Design for Bootstrap 4
http://daemonite.github.io/material/
MIT License
3.2k stars 720 forks source link

Label on left of Switch #158

Closed djibe closed 6 years ago

djibe commented 6 years ago

Hi, sorry to bother you again.

How can we set the label of a Switch on the left ? It seems this control is flex, so I tried "order" CSS properties for flexboxes but it didn't work.

Thanks again

sesemaya commented 6 years ago

Hi @djibe

The switch is absolute positioned to the left of the .custom-switch, so flex utility classes won't change its positioning.

In order to achieve what you asked, you may need some custom CSS:

  1. Replace .custom-switch's padding-left with padding-right
  2. Adjust .custom-control-indicator's position from left: 0; to right: 0; left: auto'
djibe commented 6 years ago

Thank you so much. As always