future shock treatment ctrl+s SVN HTML CSS JavaScript elements - - PowerPoint PPT Presentation
future shock treatment ctrl+s SVN HTML CSS JavaScript elements - - PowerPoint PPT Presentation
future shock treatment ctrl+s SVN HTML CSS JavaScript elements attributes class names IDs HTML body id="users" /users/ body id="users" class="view" /users/username body id="users"
ctrl+s SVN
HTML CSS JavaScript
HTML
elements attributes class names IDs
body id="users"
/users/
body id="users" class="view"
/users/username
body id="users" class="edit"
/users/username/edit
HTML
<body> <div class="section"> ... </div><!-- /.section --> .section { width: 60%; }
site
<body id="users"> <div class="section"> ... </div><!-- /.section --> #users .section { width: 40%; }
site-area
<body id="users" class="view"> <div class="section"> ... </div><!-- /.section --> #users.view .section { width: 100%; } #users.edit .section { width: 80%; }
site-area-page
CSS
element selectors attribute selectors class selectors ID selectors
CSS
global styles helper styles page structure styles page-specific styles
CSS
typography.css colour.css layout.css
CSS
screen.css print.css handheld.css
CSS
<link rel="stylesheet" media="screen" type="text/css" href="screen.css?20090622">
screen.css
CSS library
reset lists tables forms
CSS framework
framework JavaScript
jQuery
“Find stuff and do stuff to it.”
CSS selectors
jQuery
jQuery(selector).event(function(){ action; }); document .getElementById('foo') .getElementsByTagName('bar') jQuery('#foo .bar')
jQuery
<script type="text/javascript" src="http://ajax.googleapis.com/ ajax/libs/jquery/1/jquery.min.js"> </script>
jQuery
jQuery(function($) { $('body').addClass('hasJS'); });
.hasJS .module { display: none; }
pattern recognition
progressive disclosure
<a href="#login" class="toggler">log in</a> ... <div id="login"> ... </div><!-- /#login --> jQuery('a.toggler').click(function() { var id = jQuery(this).attr('href'); jQuery(id).slideToggle('fast'); }); .hasJS #login { display: none; position: absolute; }
table:hover thead th a table tbody tr:hover th a table tbody tr td a:hover
a-grade c-grade x-grade
browser support
known knowns known unknowns unknown unknowns
IE6
p = 50 log ––––– + 1 a aie6 t tie6
[ ]
IE6
box-shadow: 5px 5px 0 rgba(0,0,13,0.3)
blockquote p:last-child
text-shadow: 1px 1px 1px #fff; border-radius: 1em;
800 1024 1280
screen support
640 %
min-width: px max-width: em
screen support
formats
text binary simple complex
- pen
closed
standards
OED Duden microformats W3C
HTML5 2022?
HTML5
<header></header> <nav></nav> <section> <header></header> <article></article> <article></article> <footer></footer> </section> <aside></aside> <footer></footer>
HTML5
<div class="header"></div><!-- /.header --> <div class="nav"></div><!-- /.nav --> <div class="section"> <div class="header"></div><!-- /.header --> <div class="article"></div><!-- /.article --> <div class="article"></div><!-- /.article --> <div class="footer"></div><!-- /.footer --> </div><!-- /.section --> <div class="aside"></div><!-- /.aside --> <div class="footer"></div><!-- /.footer -->
/users/ /users/username /users/username/edit
URIs
/does/ /does/teach/ /does/teach/ajax
http://www.w3.org/Provider/Style/URI
“Cool URIs don’t change” —Tim Berners-Lee, 01998
Historical note: At the end of the 20th century when this was written, “cool” was an epithet of approval particularly among young, indicating trendiness, quality, or appropriateness.
http://www.flickr.com/photos/rachelandrew/357308665/ http://www.flickr.com/photos/withassociates/3212670286/ http://www.flickr.com/photos/eggplant/44101381/