If you want to use an attribute selector, then, do like this:
[data-role="page"] {
/* Styles */
}
Note: There are many numbers of attribute selectors you can use for various scenarios that are all covered in the document I link to. Despite custom data attributes being a "new HTML5 feature".
- browsers will not have any problems with supporting non-standard attributes, so you should be able to filter them with attribute selectors;
- If you don't care about CSS validation either, as CSS doesn't bother about non-namespaced attribute names as long as they don't break the selector syntax.