[wp-trac] [WordPress Trac] #24306: Twenty Thirteen: border-box box sizing will break many plugins

WordPress Trac noreply at wordpress.org
Tue Jun 4 21:00:16 UTC 2013


#24306: Twenty Thirteen: border-box box sizing will break many plugins
---------------------------+--------------------
 Reporter:  professor99    |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.6
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |
---------------------------+--------------------

Comment (by professor99):

 Hi Jayjdk,

 No theme I have come across uses the universal selector to set box-sizing
 to border-box (and I'm always cross checking problems with themes and
 WPUF). Can you name one?

 As to fixing the problems with having to support both box sizing models it
 really depends on what your plugin is doing.

 If it's just adding a box to content given a certain pre-existing width
 then you will have to define the box model. Unfortunately you will have to
 use javascript to get the real width as there is no way I know of to
 ascertain in CSS which box model is in operation.

 If your modifying pre-existing content then it's a different ball game.
 You will have use javascript to assert the box model and act accordingly.

 Unfortunately the [class*="your-plugin-prefix-"] selector has a big
 problem in that box-sizing isn't inherited so any child of that selector
 will revert to the universal box-sizing.

 Seriously though wouldn't the solution be to define content-box sizing for
 the widget and entry-content classes using the selectors I gave two posts
 back? That would mean that plugins both past and future would be
 compatible with this theme.

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


More information about the wp-trac mailing list