Complaints dept: @heydonworks
body {
font-size: 16px;
}
h2 {
font-size: 1.5em; /* 24px */
}
When you're worried about your CSS
being "future proof"...
even when it's not obvious :p
"HTML should allow separation of content and presentation. For this reason, markup that expresses structure is usually preferred to purely presentational markup."
<center>
<ul face="arial">
<li><font color="white" size="2">A list item</font></li>
<li><font color="white" size="2">Another list thingy</font></li>
</ul>
</center>
<ul>
<li>A list item</li>
<li>Another list thingy</li>
</ul>
Maintainable code base?
Efficiency?
<ul class="menu">
<li class="menu__item">first item</li>
<li class="menu__item">item number two</li>
</ul>
Can't be created with
Markdown
Textile
Standard HTML
Why I hate iOS7
How I Came To Terms With iOS7
50 Best iOS7 Icon Templates
Nulla
auctor eleifend turpis consequat pharetra. Nulla lobortis tempus
commodo. Donec et nisi dictum felis sollicitudin congue. Sed dapibus,
lectus sit amet adipiscing egestas, mauris est viverra nibh, iaculis
pretium sem orci aliquet mauris. Donec a congue leo. Vestibulum sit amet
ipsum lacus.
Maecenas sit amet tellus nec mi gravida posuere non pretium magna. Suspendisse potenti. Sed dapibus, lectus sit amet adipiscing egestas, mauris est viverra nibh (iaculis pretium sem orci aliquet mauris). Donec et nisi dictum felis sollicitudin congue. Curabitur consectetur faucibus nisl ac varius. Sed dapibus, lectus sit amet adipiscing egestas, mauris est viverra nibh, iaculis pretium sem orci aliquet mauris.
* + * {
margin-top: 1.5em;
}
* + * {
margin-top: 1.5em;
}
Maybe...
.module > *:last-child,
.module > *:last-child > *:last-child,
.module > *:last-child > *:last-child > *:last-child {
margin-bottom: 0;
}
<x-map data-key="6c86bb5b30a442c180772d978f3ae000"/>
[href] {/* has href attribute */}
[href="n"] {/* href value == n */}
MARKDOWN:
[payment page](https://secure.example-site.com)
<a href="https://secure.example-site.com">payment page</a>
HELPFUL
[href^="https"]:before {
content: '\E017';}
NOT SO HELPFUL (AUTHORED)
.icon-secure:before {
content: '\E017';
}
UNRELIABLE:
[href^="http:"]
[href^="http:"]:not([href*="this-domain.com"])
## ROCK & ROLL
↓
http://themes.googleusercontent.com/licensed/font?kit=xb9aY4w9ceh8JRzobID1nRI_LzupUmcPMBuwS4OyZBE
h2 {
font-size: 2em;
font-family: Lobster 2, Bevan;
}
3 items in last row
nth-last-child( 3 ), nth-last-child( 3 ) ~ li
desired width: 100% / 3
100% / 3 = 33.333%
@for $i from 1 through $cols {
li:nth-child(#{$cols}n+1):nth-last-child(#{$i}) {
width: 100% / $i;
& ~ li {
width: 100% / $i;
}
}
}
Works for
✔Any number of columns
✔Any number of items
CodePen demo: http://codepen.io/heydon/pen/bcdrl
$cols = 3 (8 items)
$cols = 5 (8 items)
$cols = 5 (9 items)
In other words: not using classes
CSS gives so much power to the
class
attribute, that authors could conceivably design their own “document language” based on elements with almost no associated presentation (such as DIV and SPAN in HTML) and assigning style information through the “class” attribute. Authors should avoid this practice since the structural elements of a document language often have recognized and accepted meanings.