I'm submitting this patch in preparation for work on a "skins" or "themes" feature for admin_menu. This patch follows CSS coding standards to the letter.

CommentFileSizeAuthor
admin_menu-css-coding-standards.patch8.52 KBpsynaptic

Comments

psynaptic’s picture

I forgot to say: the patch was created from the sites/all dir using diff -urp

sun’s picture

Status: Active » Fixed

Committed to all 3.x branches with small adjustments. (I don't know who proposed those extra blank lines between rule sets, but they horribly suck.) Some comments were a bit displaced.

Thanks!

sun’s picture

Removed that horrible rule from the standards. There was no agreement on this standard. And I can come up with countless of reasons for why it will NOT become a standard at all.

psynaptic’s picture

Thanks for committing at least part of my patch.

Why does it suck to have a less densely formatted CSS file? I personally feel that the extra line makes the file more readable and do believe it should be part of Drupal's CSS coding standards. The closing brace does act as a sort of blank line but it looks messy and bunched up like you're trying to save bandwidth.

I'll not try to argue my point about the comments as you clearly didn't like the changes. I just think "greater" is more accurate than "above" or "more".

psynaptic’s picture

Are you happy with the alphabetising of properties? I mean, surely this should be by semantics. Put width with height, clear with float, top and left with position, font declarations together. Thoughts?

sun’s picture

I'm absolutely open for standards, and in fact, I'm encouraging everyone to introduce and manifest standards. I don't really care whether color definitions are written all uppercase (which I don't like either) or declarations are sorted alphabetically (which might not be right from a technical perspective, but definitely is a standard *everyone* is able understand).

Only that one standard about line-feeds (the only thing I reverted from your patch) I totally disagree with. Line-feeds should be used where it makes sense, to group rule sets, chapters, or any other underlying logic. But not forced. We also don't force this standard for PHP:

$foo = $bar;

$baz = $beer;

$foobar = array();

do_foo_with_bar($bar);

while ($bar) {

  echo $bar['one'];

  echo $bar['two'];

  $baz--;

  if ($baz) {

    break;

  }

}

That's plain senseless.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.