Specify which checkboxes should be swipeable #1
Replies: 3 comments
-
|
If not all checkboxes in a group should be enlarged, I am pretty sure I have to tag the inputs. |
Beta Was this translation helpful? Give feedback.
-
|
I hate the idea of the library tagging all inputs by default. Might change my mind on this later. |
Beta Was this translation helpful? Give feedback.
-
|
Implemented and closed in #7. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to implement this at work, but in the table that I want to use there are multiple checkboxes per row – I'm only interested in swiping the ones in the first column.
If we up the supported browsers to allow for
:has(), and we explicitly specify what checkboxes to be swipable with the attribute<input type=checkbox data-checkswipe-use>, then the CSS rule could be:and the JavaScript could be updated to first check if any checkboxes have that attribute and only apply to those, otherwise apply to all.
Alternatively to support IE9 (a goal for me), if there are any tagged checkboxes in a group, we could apply a second tag to the parent
data-checkswipe-specificand have the CSS use:not(); the rules would be:(
:is()is not supported by IE9, but can be expanded to remove it - using it to better explain my thoughts)Beta Was this translation helpful? Give feedback.
All reactions