Based on the name of the thing "data attributes", I'm not sure it's good idea to use data to style things.
Those html5 data-* attributes are semantic attributes that meant to describe your data within the html and designed to be read and written by javascript (mainly). Note that they are also much slower to be accessed using css selectors than ids or classes.
Although, if it implies a modification on too much places (if you're maintaining 50 themes), the solution to use a data attribute could be ok as a quick fix. I'll still try to find a parent html element with any class / id and match that instead:
#parent form {}
.parent-div form {}
All that to give you time to add a class on your form in all the places it appears without pressure.