[wp-trac] [WordPress Trac] #24306: Twenty Thirteen: border-box box sizing will break many plugins
WordPress Trac
noreply at wordpress.org
Mon May 13 18:28:28 UTC 2013
#24306: Twenty Thirteen: border-box box sizing will break many plugins
---------------------------+------------------------------
Reporter: professor99 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: trunk
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------
Comment (by celloexpressions):
Recognizing that other themes might start using this alternate box model,
following Twenty Thirteen's lead or of their own accord, I've already
started explicitly defining box-sizing for my plugins' elements.
The trouble with using an alternate box model and the way themes/plugins
interact is tricky. It seems unrealistic to have themes only apply border-
box to the elements they need it on, because plugin elements could become
nested in theme html in a lot of places, so you'd need to avoid universal
selectors entirely and basically add a class to every element that needs
this (which would make development messy). It's far more realistic to have
plugins explicitly declare {{{box-sizing: content-box;}}} for all of their
elements; for example:
{{{
.plugin-container, .plugin-container * {
box-sizing: content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
}}}
Thus overriding border-box for plugin elements in case the theme has
declared it. PLugins could similarly use {{{border-box}}} if desired.
Obviously this means a lot of plugins need updating, but it would be the
forward-compatible thing to do for broader theme compatibility, and having
it in Twenty Thirteen will make people fix their plugins faster. It'd be
cool to tell plugin authors about this ASAP, though, since the issue isn't
confined to Twenty Thirteen. And there should be a note in the codex or
somewhere about checking this when looking at theme compatibility for
plugins that add code to the frontend.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24306#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list