[wp-trac] [WordPress Trac] #20579: Adding HTML5 Input Types default styling to twentyten and twentyeleven

WordPress Trac noreply at wordpress.org
Thu Nov 22 01:16:11 UTC 2012


#20579: Adding HTML5 Input Types default styling to twentyten and twentyeleven
-----------------------------+------------------
 Reporter:  georgestephanis  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  3.5
Component:  Bundled Theme    |     Version:  3.4
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------

Comment (by bpetty):

 Replying to [comment:16 lancewillett]:
 > I think a smarter approach to this would be to use a CSS selector to
 blacklist the input types we don't want to apply styles to: checkbox,
 radio, submit, button, color, file ... so something like
 {{{input[type^=checkbox]}}}.

 Except that {{{input[type^=checkbox]}}} does not mean "not this type", it
 represents an input element with the type attribute whose value begins
 with the prefix "checkbox". In fact, there isn't even a CSS3 selector that
 works for doing a blacklist on attribute values.

 Maybe you're thinking about jQuery {{{[type!="checkbox"]}}} selectors?
 Even if we did use that (and we shouldn't), we'd still need to specify 10
 different types.

 Replying to [comment:16 lancewillett]:
 > That'd make it much cleaner, and also benefit us when newer types are
 added in the future -- they'll look great without having to be explicitly
 added to the stylesheet.

 That's assuming all new input types added in the future used a regular
 text box style input that these styles are designed for. That's exactly 13
 out of the 23 current ones. It's impossible to say, but that might
 indicate maybe a little more than a 50/50 chance.

 Replying to [comment:16 lancewillett]:
 > Note: I also think we take a pragmatic approach, and just patch up the
 most common and the ones most likely to occur in WordPress output: email,
 url, password, text and just leave the rest to plugins or child themes to
 add if needed.

 I really did want to go this direction at first, but when it comes down to
 it, it's the theme's responsibility for styling everything. And if you
 look at this from a plugin developer's point of view, it's impossible to
 just assume that one style is going to fit all themes, nor is it possible
 to know if another theme is already providing these styles for other
 purposes as well.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20579#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list