[whatwg] Styling form controls (Was: Re: Forms-related feedback)

Kornel Lesiński kornel at geekhood.net
Thu Dec 5 18:01:22 PST 2013


On Wed, 04 Dec 2013 16:12:50 -0000, TJ VanToll <tj.vantoll at gmail.com>  
wrote:

> The datepicker also shows the problem that using pseudo-elements as  
> styling hooks presents. The calendars presented on mobile browsers and  
> desktop browsers are radically different. Even if you wanted to  
> standardize certain hooks, there is literally nothing in common across  
> the implementations.

Maybe instead of coming up with one set of pseudo-elements that's limited  
to the lowest common denominator we should have multiple completely  
different sets of pseudo-elements for each kind of interface?

input::calendar.month-view-grid ::first-week-row {...} // typical desktop  
style

input::calendar.spin-wheel ::month-spinner {...} // iOS style

(or any other syntax with cats/hats/dogs/pseudo-functions, as long as it  
groups pseudo-elements per kind of calendar UI)

This way developers assuming date pickers are grids with a month view  
could style specific pseudo-elements for this layout and mobile browsers  
could ignore these styles completely.


-- 
regards, Kornel



More information about the whatwg mailing list