[wp-testers] Gallery CSS/xHTML

Spencer Lavery phobea at gmail.com
Fri Mar 28 09:54:10 GMT 2008


As an extra note - a way to cater for both up-to-date themers, and old
themes that don't have styles for the Gallery yet - would be to
introduce a gallery.php template file.

WP could check to see if it exists - if it does it applies no CSS, and
applies HTML according to the gallery.php file - if it doesn't exist
it could add in the HTML/CSS in the way that it does currently. Like
comments.php

Spencer Lavery wrote:

> Matt Mullenweg wrote:
>
>  >Spencer Lavery wrote:
>  >> Instead of forcing each image to be wrapped in a DL, add some new WP
>  >> template tags for targeting the gallery specifically inside the loop,
>  >> for example:
>
>  >I think Andy already articulated the point really well, but it might
>  >also help to take a step back and think of shortcodes like little magic
>  >expansions.
>
>  The patch is half-way there. Does it remove the inline styles on the
>  <br>, and the <br> itself? I find it odd that WordPress is assuming
>  themers won't know how to clear elements properly. I know a key part
>  of WordPress recently is making everything work for users with no
>  knowledge of design/code whatsoever, but I always thought that valid
>  code was a fundamental element of WordPress, and injecting CSS also
>  seems like rather a backward step.
>
>  >The most popular shortcode we've done thus far is a youtube one, which
>  >is like [youtube http://youtube.com/?v=aoeuaoue]. This gets expanded,
>  >just like the gallery shortcode, into a magic snippet on display. A
>  >blogger can easily move it around their post, copy and paste it, and
>  >modify its arguments. In the [youtube] case there's just a single
>  >argument, but others might have more complex ones, like the gallery
>  >shortcode.
>
>  I wasn't aware of the shortcode. The shortode looks excellent and can
>  certainly do most of the things I would need it to. Though the choice
>  of using a DL as the default HTML element is questionable - it's no
>  way a Definition List semantically - it's barely even a list. It
>  actually a series of images, in the same way that a series of words
>  make up a paragraph. I would stick to vanilla formatting (A and IMG
>  tags only) inside of one div with the .gallery class. Themers will be
>  able to target and control the elements easily enough with that
>  formatting.
>
>  >Hardcoding the magic expansions into the theme would be really
>  >inflexible for both the blogger and themer. This combines the best of
>  >blogger ease-of-use with theme control, as they can override any aspect
>  >already.
>
>  I guess I just disagree with this notion fundamentally. The themer
>  should have more control over how things appear than the blogger,
>  because if the blogger was competent enough to make those decisions,
>  they wouldn't need to use anybody elses themes. I'm sure at the very
>  beginning of WP the devs thought to themselves "should we really let
>  users control how posts are formatted in HTML?" time has shown the
>  right choice. Forcing and restricting the HTML by placing it within
>  core pages (I have a similar gripe wp_list_cats etc.) is a step
>  backwards in my opinion - you should be trying to move the project
>  forward with a goal of completely separating the following elements:
>
>  php
>  formatting (x/html)
>  presentation (css)
>
>  Themers/users should have complete control over formatting and
>  presentation, never needing to touch the php (except the hooks in the
>  themes, and loops if they so wish). Most of the WP templating system
>  allows this, but elements such a wp_list_cats don't. I assumed that
>  this was old code waiting to be revised, but to introduce new code
>  using this same, old method isn't where I thought WP was trying to go.
>
>  I'm still part of the group that only wants/needs the WP admin area to
>  act as a front-end for the database, not the blog itself.
>


More information about the wp-testers mailing list