-
Notifications
You must be signed in to change notification settings - Fork 8
Will themes and their rendering be standardized? #20
Description
The demo page illustrates a number of different themes for <std-switch> and has a particular rendering (including animations). Will the available theme names be standardized? Will exact details of the rendering and animation be standardized?
If theme names aren't standardized, and browsers support different sets, there is poor interop. If theme names are standardized but their renderings aren't, they are not useful to authors who want an exact appearance. If names and renderings are standardized, this is without precedent for form controls in the platform, and potentially problematic. Platform renderings change over time. Switches haven't always looked the same in iOS for instance. The standardized versions might not even match any platform, for example the cocoa theme in the demo does not accurately replicate the rendering or appearance of switches in any iOS version. Fully accurate replication in a polyfill may not even be possible without violating intellectual property of platform vendors.
A possible alternate approach: there is a default appearance (possibly platform-specific), and it can be fully overridden to be exactly what the developer wants using normal CSS. <input type=button> and <input type=text> de facto have this behavior (if not per any spec) and it lets browsers have a platform-matching default styling if desired, while also meeting requirements to have controls styled a specific way on all platforms in some site. <input type=checkbox> lacks this, which is why sites use either uncustomized checkboxes or div soup. Sites would likely not be satisfied with a canned set of predefined themes.