HTML/CSS

From Things and Stuff Wiki
Revision as of 02:18, 1 July 2012 by Milk (talk | contribs)
Jump to navigation Jump to search


to merge from bits of design. aaand break out.

Specs

Docs, guides, etc.

Tools

http://unify.eightshapes.com/what-you-get/

div { outline:1px solid red; }

Testing

Browsers I use:

  • Chromium 21 (Dev)
  • Google Chrome 19
  • Firefox 13
  • Firefox 16 (Nightly)
  • Opera 12

To check


Resets, etc.

Different browsers have different defaults.

Specificity

p has a specificity of 1 (1 HTML)
div p has a specificity of 2 (2 HTML; 1+1)
.sith has a specificity of 10 (1 class)
div p.sith has a specificity of 12 (2 HTML and a class; 1+1+10)
#sith has a specificity of 100 (1 id)
body #darkside .sith p has a specificity of 112 (HTML, id, class, HTML; 1+100+10+1)

[2] [3] ([4]),[5]

Properties

Selectors

h1 + h2
  <h1></h1><h2></h2>

h1 > h2
  <h1><h2></h2></h1>

Positioning

display: block - default 100% width, flows vertically
display: inline - consumes width of content, flows horizontally
display: inline-block
display: table-cell - vertical align method [6]
  http://www.quirksmode.org/css/display.html
float - floats element next to containing box or other floated element
position: absolute - out of flow
rgba(0, 0, 0, 0.2) - shadow

Tips

Responsive

Accessibility

See also Design

Headings should not be removed using display:none, because it removes the headings from assistive technology. Instead headings can be made invisible to sighted users using CSS class="element-invisible". [9]

Background

Outline

Animations & transitions

Grid

Vertical rhythm

Web

JS

Bookmarklets

CSS

Sass

Font symbols

Sprites

Header, footer

Menus

Gradients

Full screen

Misc

Preprocess

Frameworks