Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSS Study Group 1

Kerrick Long
November 06, 2014

CSS Study Group 1

Kerrick Long

November 06, 2014
Tweet

More Decks by Kerrick Long

Other Decks in Programming

Transcript

  1. Kerrick Long Things I make and do Where to find

    me online meetup.com/STLEmber Lead Front-end Developer at Second Street www.KerrickLong.com twitter.com/KerrickLong github.com/Kerrick
  2. BASIC SELECTORS <h1 class="hello world" id="intro" > Example </h1> *

    /* Universal */ h1 /* Type */ .hello /* Class */ .world /* Class */ #intro /* ID */
  3. ATTRIBUTE SELECTORS <h1 class="hello world" id="intro" data-foo="bar-qux" data-bar="foo baz" >

    Example </h1> h1[data-foo] h1[data-foo="bar-qux"] h1[data-bar~="baz"] h1[data-foo|="bar"] h1[data-foo^="b"] h1[data-bar$="z"] h1[data-foo*="ar"]
  4. COMBINATORS <h1>Foo <h2>Bar <h3>Baz</h3> </h2> </h1> <h4>Quux</h4> <h6>Bang</h6> h1 h3

    /* Descendant */ h1 > h2 /* Child */ h1 + h4 /* Adjacent Sibling */ h1 ~ h6 /* General Sibling */
  5. MARGIN PROPERTIES margin-top margin-right margin-bottom margin-left /* Short-hand */ margin

    /* TRBL - Trouble! */ margin: 1px 2px 3px 4px; margin: 1px 2px; margin: 1px;
  6. PADDING PROPERTIES padding-top padding-right padding-bottom padding-left /* Short-hand */ padding

    /* TRBL - Trouble! */ padding: 1px 2px 3px 4px; padding: 1px 2px 3px; padding: 1px 2px; padding: 1px;
  7. 0 2 0 0 0 1 3 1 WHICH IS

    MORE SPECIFIC?