[theme-reviewers] How to deal with alignone: any best practice recommendations?

Emil Uzelac emil at themeid.com
Wed Jul 18 21:55:26 UTC 2012


Hi Bill,

You're not out of the line, this code is available to the public and if you
can come up with the better solution please go right ahead. Codes were not
written by me, all I did was to make them Theme
Review<http://codex.wordpress.org/Theme_Review>compatible and to help
authors getting their images properly aligned,
that's pretty much it. They are not there just as an example, that's a
working CSS copy used on who knows how many Themes.

On other hand I personally did not find this to be unnecessary because not
every developer will have clean codes and Theme styles would override
generated classes easily, that would be one of the reasons for having DIV
element in front of the property and if they don't do anything, but it can
help under special circumstances, why remove them? All declarations are
there for a reason :)

As far as margins for alignnone, why not? it looks much nicer and cleaner
too, but we're also jumping from what's really needed to a personal
preferences.

Thanks,
Emil



On Wed, Jul 18, 2012 at 4:19 PM, William Ludwig <weludwig at gmail.com> wrote:

> Okay, I'm normally quiet and tend to defer to those who have more
> experience but I have a slight concern about pointing people to the sample
> CSS provided for alignments at
> http://codex.wordpress.org/CSS#WordPress_Generated_Classes
>
> The CSS provided, while functional, is far from effecient and I would
> worry about developers copy/pasting that wholesale into their theme without
> editing.  For example the second rule has both .aligncenter and
> div.aligncenter as selectors.  The div.aligncenter is unnecessary and adds
> nothing.  There are several other rules below that which are just slower
> selectors with the same rules as above.
>
> I know that this is just meant as examples to get someone started but if I
> saw this in a theme I would really question the person who wrote it.
>
> To the original question I would suggest not adding any
> alignment/margin/etc to images with alignnone. The way I have always
> understood it was that alignnone images should display inline with the
> surrounding content naturally.
>
> I hope I'm not out of line and I reserve the right to be completely wrong.
>  Thanks.
> Bill Ludwig
>
>
> On Wed, Jul 18, 2012 at 4:17 PM, esmi at quirm dot net <esmi at quirm.net>wrote:
>
>> on 18/07/2012 21:46 Emil Uzelac said the following:
>>
>>  While ago I rewrote
>>> http://codex.wordpress.org/**CSS#WordPress_Generated_**Classes<http://codex.wordpress.org/CSS#WordPress_Generated_Classes> at the moment
>>> that was (IMO) the best align* practices. Clear isn't the best thing to
>>> do,
>>> because that will create an issue down the road.
>>>
>>
>> I was unsure about the clearing too but some default margins would be a
>> good idea. I'll start adding this into my themes.
>>
>> Perhaps that Codex sub-section could be added to the Resources on <
>> http://make.wordpress.org/**themes <http://make.wordpress.org/themes>>?
>>
>>
>> Mel
>> --
>> http://quirm.net
>> http://blackwidows.co.uk
>> ______________________________**_________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.**wordpress.org<theme-reviewers at lists.wordpress.org>
>> http://lists.wordpress.org/**mailman/listinfo/theme-**reviewers<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/20120718/5010336c/attachment-0001.htm>


More information about the theme-reviewers mailing list