HTML/CSS
Jump to navigation
Jump to search
to merge from bits of design.
General
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)
Selectors
- http://twostepmedia.co.uk/cssselectors/
- http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/
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 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
- https://github.com/andreasbovens/understanding-viewport
- http://www.brainjar.com/css/positioning/default.asp
Tips
Responsive
- http://webdesignerwall.com/tutorials/css-elastic-videos
- http://drupal.org/node/1413558
- http://drupal.org/node/1535954
- http://groups.drupal.org/node/233238
- http://drupal.org/project/fitvids - js lib
background
Animations & transitions
Resets, etc.
Grid
- http://grids.heroku.com/
- http://www.gridsystemgenerator.com/gs01.php
- http://gridpak.com/
- http://www.designbygrid.com/tools
- http://blog.centresource.com/2009/06/15/6-tips-and-tricks-for-designing-with-960/
- http://divitodesign.com/css/tricks-to-solve-960-css-framework-problems/
- http://hashgrid.com/ - js grid display
Vertical rhythm
- The Elements of Typographic Style Applied to the Web
- http://24ways.org/2006/compose-to-a-vertical-rhythm - oft' linked to
Web
- http://www.gridlover.net/
- http://drewish.com/tools/vertical-rhythm - calculator, px based
- http://topfunky.com/baseline-rhythm-calculator/ - px based
JS
Bookmarklets
- http://gridwax.gs/ - great
- http://sfcgeorge.github.com/Grid-Bookmarklet/
- http://scribu.net/util/baseline-checker-bookmarklet.html
CSS
Sass
- https://github.com/pyrsmk/vertical-rhythmic - sass mixins (no sure if worth it)
- https://github.com/OliverJAsh/vertical-rhythm
Typography
- CSS with vertical rhythm - drewish.com
- Scale & Rhythm
Font symbols
Sprites
Menus
Gradients
Misc
- http://davatron5000.github.com/deCSS3/ - bookmarklet to test pre css3 browsers
- http://www.youtube.com/watch?v=a2_6bGNZ7bA Faster HTML and CSS: Layout Engine Internals for Web Developers