Skip to content

Instantly share code, notes, and snippets.

@leftieFriele
Forked from paulirish/1-tablemarkup.html
Created August 1, 2011 13:54
Show Gist options
  • Save leftieFriele/1118158 to your computer and use it in GitHub Desktop.
Save leftieFriele/1118158 to your computer and use it in GitHub Desktop.
whitespace use for html/css readability
<!-- formatting fun #1: tables! -->
<!-- use whitespace to mimic the layout you want. leave off optional end tags for readability -->
<table>
<caption>Selector engines, parse direction</caption>
<thead>
<tr><th>Left to right <th>Right to left
<tbody>
<tr><td>Mootools <td>Sizzle
<tr><td>Sly <td>YUI 3
<tr><td>Peppy <td>NWMatcher
<tr><td>Dojo Acme <td>querySelectorAll
<tr><td>Ext JS
<tr><td>Prototype.js
</table>
/* formatting fun #2: css3 columns! */
/* prefixes in descending length, relevant prop stays adjacent. */
/* having styles in columns on one line is going to hurt when using stuff like transitions and when the number of arguments on the prefixes are different. therefor I put them on separate styles. I also reversed the indenting as this one will leave your CSS looking nice when you remove the prefixes */
.columned {
column-count: 3;
-webkit-column-count: 3;
-moz-column-count: 3;
column-gap: 15px;
-webkit-column-gap: 15px;
-moz-column-gap: 15px;
}
/* other css formatting ideas at css3please.com and at dropshado.ws/post/2054719546/css-formatting */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment