[theme-reviewers] content_width in variable-width themes
Kirk Wight
kwight at kwight.ca
Thu Jan 26 00:48:08 UTC 2012
I'm thinking of the Theme Unit Test - it's easier for the photos and
embedded video to jump the content container with variable widths in a
small browser window.
On 25 January 2012 19:34, Chip Bennett <chip at chipbennett.net> wrote:
> I'm unaware why it wouldn't be acceptable?
>
> The Guideline is to *define* $content_width; the intent is that the
> defined $content_width is appropriate for the design of the Theme. In other
> words, the default assumption is that the Theme is defined for a specific
> width, and then defines a (static) value for $content_width, accordingly.
>
> In other words: making $content_width dynamic is the *exception*, rather
> than the rule.
>
> Chip
>
>
> On Wed, Jan 25, 2012 at 6:30 PM, Kirk Wight <kwight at kwight.ca> wrote:
>
>> Hm, seems like a lot.
>>
>> Maybe my questions is, can we pass a variable-width theme that just uses
>> a reasonable width, say $content_width=640? I'm doing a theme, for a talk,
>> that demonstrates the bare minimum in requirements for approval, so it came
>> up.
>>
>> I'm leaning towards accepting it - anyone else, for or against?
>>
>>
>> On 25 January 2012 17:54, Chip Bennett <chip at chipbennett.net> wrote:
>>
>>> I'm not aware of any consensus *best* practice for dynamic
>>> content-width; however, I use a method in Oenology that works, and has thus
>>> far been robust, for setting $content_width dynamically according to the
>>> selected layout (full, one-column, two-column, three-column, etc.). Here's
>>> the function:
>>>
>>> https://github.com/chipbennett/oenology/blob/master/functions/theme-setup.php#L33
>>>
>>> Note that I hook the function both into wp_head with a priority of 0,
>>> and also into admin_head (so that it applies to the post editor).
>>>
>>> (If anyone has any ideas for improving the implementation, or has any
>>> ideas for a better practice altogether, I'll be happy to modify.)
>>>
>>> Chip
>>>
>>> On Wed, Jan 25, 2012 at 4:41 PM, Kirk Wight <kwight at kwight.ca> wrote:
>>>
>>>> It seems $content_width has to be in pixels, so unless it's set very
>>>> small, it's conceivable that the embed test in the Theme Unit Test will
>>>> overflow the content area at some point.
>>>>
>>>> What is the best method for setting $content_width in a variable-width
>>>> theme?
>>>>
>>>>
>>>> _______________________________________________
>>>> theme-reviewers mailing list
>>>> theme-reviewers at lists.wordpress.org
>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>
>>>>
>>>
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120125/fff4388c/attachment.htm>
More information about the theme-reviewers
mailing list