You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider alternative method of styling toggle buttons (don't use data-toggle="buttons" for styling) #23728
As of today we need to add data-toggle="buttons" to get proper styling on check / radio buttons done with inputs + labels. While I totally see how it works perfectly with provided jQuery plugins, it is not very intuitive for people not using jQuery but rather using a framework like Angular or React.
Would you consider another method of styling toggle buttons, for example using a dedicated CSS class (eg. .toggle-buttons)?
I've opened similar issue in the past (#20359) but then closed it as a duplicate of #18874. #18874 in turn got closed as a duplicate of number of other issues without addressing the problem. Hence I'm opening a new issue to start with a "clean slate".
Activity
mdo commentedon Aug 29, 2017
Yeah, this should be a class. I don't think anything else is done via
dataattributes?pkozlowski-opensource commentedon Aug 29, 2017
Nope, I didn't bump into other cases where
data-*is needed for pure styling purposes. So apart from this particular case we should be all good!For the reference, the
data-toggle="buttons"selector is used today in JS plugin (bootstrap/js/src/button.js
Lines 31 to 32 in 78f29d2
mdo commentedon Aug 29, 2017
Using it in our JS is fine, but behavior should be detached from styles. That way you can drop our JS and use your own without styling issues.
mdo commentedon Nov 25, 2017
#24733 was merged, so closing.
chore: sync with twbs (#1)
Remove .col-form-legend in favor of .col-form-label (#24932)
Sync v-4dev with twbs (#4)
merge after v4-beta3 release