Skip to content

Instantly share code, notes, and snippets.

@paceaux
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paceaux/766553010c6cfe321d08 to your computer and use it in GitHub Desktop.
Save paceaux/766553010c6cfe321d08 to your computer and use it in GitHub Desktop.
property order
/**
* property order
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
p {
background: rgba(100,100,100,.2);
padding: .618em;
}
.fontThenLh {
font-size:1em;
line-height: 1.5;
}
.lhThenFont {
line-height: 1.5;
font-size: 1em;
}
.fontThenMargin{
font-size: 1.5em;
margin: 2em;
}
.marginThenFont {
margin: 2em;
font-size:1.5em;
}
.shortHandBorderFirst {
border: 1px solid gray;
border-right: 1px solid orange;
border-bottom: 1px solid yellow;
border-left: 1px solid green;
}
.shortHandBorderLast {
border-right: 1px solid orange;
border-bottom: 1px solid yellow;
border-left: 1px solid green;
border-top: 1px solid red;
border: 1px solid gray;
}
<p class="fontThenLh">
Font size first, then line-height
</p>
<p class="lhThenFont">
line-height first, then font
</p>
<p class="fontThenMargin">
Font size first, then margin
</p>
<p class="marginThenFont">
Margin, then font
</p>
<p class="shortHandBorderFirst">
Shorthand border first</p>
<p class="shortHandBorderLast">
shorthand border last
</p>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment