Skip to content

Instantly share code, notes, and snippets.

@rossnelson
Created December 10, 2012 03:03
Show Gist options
  • Save rossnelson/4248142 to your computer and use it in GitHub Desktop.
Save rossnelson/4248142 to your computer and use it in GitHub Desktop.
CSS Guide
/* CSS guide */
/* http://www.w3schools.com/cssref/css_selectors.asp */
#id, .class, *,
element, element1+element2, element1 element2, element2>element2, element1~element2,
[attribute], [attribute=value], [attribute~=value], [attribute|=value],
[attribute^=value], [attribute$=value], [attribute*=value],
:link, :visited, :active, :hover, :focus,
:first-letter, :first-line, :first-child, :first-of-type, :last-of-type, :only-of-type,
:only-child, :nth-child(n), :nth-last-child(n), :nth-of-type(n), :nth-last-of-type(n),
:last-child, :root, :empty, :target, :enabled, :disabled, :checked, :not(selector),
:before, :after, :lang(language),
::selection
{
/* structure */
height:; width:; margin:; padding:; position:; clear:;
top:; right:; bottom:; left:; float:;
max-height:; max-width:; min-height:; min-width:;
/* behavior */
overflow:; display:; vertical-align:; visibility:;
z-index:; zoom:;
/* font */
font-family:; font-weight:; font-size:; font-style:; color:; // ...
/* text */
line-height:; text-decoration:; text-transform:; text-align:;
text-indent:; text-overflow:; text-shadow:; text-stroke:;
word-break:; word-spacing:;
list-style:;
/* style */
background:; border:;
border-radius:; box-shadow:; box-sizing:;
/* animation | appearance */
cursor:; opacity:;
transform:; transform-origin:; transform-style:; transition:;
/* misc */
content:;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment