Created by: cvrebert
I propose adding these on the grounds that the of S
feature would allow us to make our widgets more robust. We've had several issue reports (e.g. #15684 (closed), #13825 (closed), #16540 (closed)) where folks tried to put stuff like <input type="hidden">
within .input-group
or .btn-group
, but this broke the :first-child
/:last-child
-based selectors we use to adjust rounded corners.
With this feature, we could restrict the children considered to only the relevant ones, thus ignoring other irrelevant elements. For example, we could use :nth-child(1 of .btn)
in our .btn-group
CSS to ignore non-.btn
children and thus round the corners correctly in such cases.
Refs:
- http://caniuse.com/#feat=css-nth-child-of
- https://drafts.csswg.org/selectors-4/#the-nth-child-pseudo
- https://crbug.com/304163
- https://bugzil.la/854148
CC: @twbs/team for review