SlideShare a Scribd company logo
Modular
HTML, CSS, & JS
Workshop
Shay Howe
@shayhowe
learn.shayhowe.com
Darby Frey
@darbyfrey
darbyfrey.com
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Shay Howe
@shayhowe
learn.shayhowe.com
Darby Frey
@darbyfrey
darbyfrey.com
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
1 Groundwork
2 HTML & CSS
3 JavaScript
4 Onward
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
1
Groundwork
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Common Problems
• Websites have difficulty scaling
• Code bases become brittle
• Files and code bases begin to swell
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
What’s Wrong
• Best practices aren’t exactly best practices
• Standards need to evolve
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Best Bad Practices
• Avoid extra elements
• Avoid classes
• Leverage type selectors
• Leverage descendent selectors
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Best Bad Practices
Avoiding classes
article#main	
  aside	
  ul	
  li	
  {...}
section:last-­‐child	
  div:nth-­‐child(7)	
  a	
  {...}
Leveraging selectors
a.btn	
  {...}
#main	
  a.btn	
  {...}
#main	
  div.feature	
  a.btn	
  {...}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Best Bad Practices
Bad
#contact	
  li:nth-­‐child(1)	
  input,
#contact	
  li:nth-­‐child(2)	
  input	
  {
	
  	
  width:	
  50%;
}
#contact	
  li:nth-­‐child(3)	
  textarea	
  {
	
  	
  width:	
  75%;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Best Bad Practices
Good
.col-­‐1	
  {
	
  	
  width:	
  50%;
}
.col-­‐2	
  {
	
  	
  width:	
  75%;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Maintainability
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Code Must Be…
• Organized
• Modular
• Performant
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Methodologies
OOCSS
• Object-Oriented CSS
From Nicole Sullivan – oocss.org
SMACSS
• Scalable and Modular Architecture for CSS
From Jonathan Snook – smacss.com
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Reuse Code
• Do not duplicate code
• Remove old code
• Defer loading subsequent styles
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Reuse Code
Bad
.news	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
}
.social	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Reuse Code
Good
.news,
.social	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
}
Better
.feat-­‐box	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Use Classes
• Write understandable class names
• Avoid unnecessary nesting
• Use same strength specificity
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Use Classes
Bad
.feat-­‐box	
  .callout	
  .pr	
  {
	
  	
  font-­‐size:	
  12px;
}
.feat-­‐box	
  .callout	
  .pr	
  .un	
  {
	
  	
  color:	
  #39f;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Use Classes
Good
.feat-­‐box	
  .price	
  {
	
  	
  font-­‐size:	
  12px;
}
.feat-­‐box	
  .unit	
  {
	
  	
  color:	
  #39f;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Specificity?
• Determines which styles are applied
• Each selector has a specificity weight
• High specificity beats low specificity
• Low specificity is key
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Measuring Specificity
Formula
IDs, Classes/Pseudo-classes/Attributes, Elements
High Specificity(Bad)
#primary	
  #main	
  div.gallery	
  figure.media	
  {...}
IDs: 2, Classes: 2, Elements: 2 — Compiled: 2–2–2
Low Specificity(Good)
.gallery-­‐media	
  {...}
IDs: 0, Classes: 1, Elements: 0 — Compiled: 0-1-0
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Watch Specificity
• Be explicit
• Keep specificity low
• Never use IDs or !important
• Avoid nested selectors
header#main	
  div.spotlight	
  strong	
  span
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Watch Specificity
Bad
#primary	
  #main	
  div.gallery	
  {
	
  	
  text-­‐transform:	
  uppercase;
}
#primary	
  #main	
  div.gallery	
  figure.media	
  {
	
  	
  background:	
  #ccc;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Watch Specificity
Good
.gallery	
  {
	
  	
  text-­‐transform:	
  uppercase;
}
.gallery-­‐media	
  {
	
  	
  background:	
  #ccc;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
2
HTML & CSS
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Abstract Structure
• Separate presentation(or theme) from layout
• Create an object layer for layout
• Create a skin layer for theme
• Use a grid
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Abstract Structure
Bad
.news	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  400px;
}
<div	
  class="news">...</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Abstract Structure
Good
.grid-­‐4	
  {
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  400px;
}
.feat-­‐box	
  {
	
  	
  background:	
  #ccc;
	
  	
  color:	
  #666;
}
<div	
  class="grid-­‐4	
  feat-­‐box">...</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Transparentize Elements
• Stylize elements to be transparent
• Keep visual properties apart from layout
properties
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Transparentize Elements
Bad
.pagination	
  {
	
  	
  border-­‐radius:	
  5px;
	
  	
  border:	
  1px	
  solid	
  #eee;
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  620px;
}
<ul	
  class="pagination">...</ul>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Transparentize Elements
Good
.grid-­‐8	
  {
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  620px;
}
.offset-­‐box	
  {
	
  	
  border-­‐radius:	
  5px;
	
  	
  border:	
  1px	
  solid	
  #eee;
}
<ul	
  class="grid-­‐8	
  offset-­‐box">...</ul>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Create Adaptable Layouts
• Height and width should be flexible
• Height should extend with content
• Width should extend with a grid
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Create Adaptable Layouts
Bad
#main	
  {
	
  	
  float:	
  left;
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  620px;
}
#aside	
  {
	
  	
  float:	
  left;
	
  	
  margin:	
  0	
  10px;
	
  	
  width:	
  300px;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Create Adaptable Layouts
Good
.grid-­‐4,
.grid-­‐8	
  {
	
  	
  float:	
  left;
	
  	
  margin:	
  0	
  10px;
}
.grid-­‐4	
  {
	
  	
  width:	
  300px;
}
.grid-­‐8	
  {
	
  	
  width:	
  620px;
}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Separate Content
• Separate content from container
• Stylize content regardless of container
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Separate Content
Bad
.alert	
  {
	
  	
  background:	
  #f2dede;
	
  	
  border-­‐radius:	
  10px;
	
  	
  color:	
  #b94a48;
	
  	
  padding:	
  10px	
  20px;
}
<div	
  class="alert">...</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Separate Content
Good
.alert	
  {
	
  	
  border-­‐radius:	
  10px;
	
  	
  padding:	
  10px	
  20px;
}
.alert-­‐error	
  {
	
  	
  background:	
  #f2dede;
	
  	
  color:	
  #b94a48;
}
<div	
  class="alert	
  alert-­‐error">...</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Avoid Parent Dependency
• Remove parent container dependency
• Decouple CSS from HTML
• Create components to be used anywhere
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Avoid Parent Dependency
Bad
.feat-­‐box	
  {
	
  	
  background:	
  #ccc;
}
article	
  .feat-­‐box	
  {
	
  	
  background:	
  #fff;
}
<article>
	
  	
  <div	
  class="feat-­‐box">...</div>
</article>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Avoid Parent Dependency
Good
.feat-­‐box	
  {
	
  	
  background:	
  #ccc;
}
.feat-­‐box-­‐alt	
  {
	
  	
  background:	
  #fff;
}
<article>
	
  	
  <div	
  class="feat-­‐box-­‐alt">...</div>
</article>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Favor Semantics
• Allow elements to adapt
• Uses individual classes to extend modules
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Favor Semantics
Bad
.feat-­‐box	
  h2	
  {
	
  	
  color:	
  #f60;
	
  	
  font:	
  18px	
  Helvetica,	
  sans-­‐serif;
}
<div	
  class="feat-­‐box">
	
  	
  <h2>...</h2>
</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Favor Semantics
Good
.feat-­‐subhead	
  {
	
  	
  color:	
  #f60;
	
  	
  font:	
  18px	
  Helvetica,	
  sans-­‐serif;
}
<div	
  class="feat-­‐box">
	
  	
  <h2	
  class="feat-­‐subhead">...</h2>
</div>
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
In Practice
HTML & CSS
http://bit.ly/modular-html-css-js
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
3
JavaScript
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
JavaScript
fs.readdir(source,	
  function(err,	
  files)	
  {
	
  	
  if	
  (err)	
  {
	
  	
  	
  	
  console.log('Error	
  finding	
  files:	
  '	
  +	
  err)
	
  	
  }	
  else	
  {
	
  	
  	
  	
  files.forEach(function(filename,	
  fileIndex)	
  {
	
  	
  	
  	
  	
  	
  console.log(filename)
	
  	
  	
  	
  	
  	
  gm(source	
  +	
  filename).size(function(err,	
  values)	
  {
	
  	
  	
  	
  	
  	
  	
  	
  if	
  (err)	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  console.log('Error	
  identifying	
  file	
  size:	
  '	
  +	
  err)
	
  	
  	
  	
  	
  	
  	
  	
  }	
  else	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  console.log(filename	
  +	
  '	
  :	
  '	
  +	
  values)
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  aspect	
  =	
  (values.width	
  /	
  values.height)
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  widths.forEach(function(width,	
  widthIndex)	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  height	
  =	
  Math.round(width	
  /	
  aspect)
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  console.log('resizing	
  '	
  +	
  filename	
  +	
  'to	
  '	
  +	
  height	
  +	
  'x'	
  +	
  height)
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  this.resize(width,	
  height).write(destination	
  +	
  'w'	
  +	
  width	
  +	
  '_'	
  +	
  filename,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  function(err)	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  if	
  (err)	
  console.log('Error	
  writing	
  file:	
  '	
  +	
  err)
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  })
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }.bind(this))
	
  	
  	
  	
  	
  	
  	
  	
  }
	
  	
  	
  	
  	
  	
  })
	
  	
  	
  	
  })
	
  	
  }
})
http://callbackhell.com
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
JavaScript
image	
  =	
  new	
  Image('filename.jpg');
image.resize(400,	
  300);
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Abstract and Encapsulate
functionality with Objects
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
JavaScript Primer
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
function	
  multiply(one,	
  two){
	
  	
  return	
  one	
  *	
  two;
};
function(one,	
  two){
	
  	
  return	
  one	
  *	
  two;
};
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
Assigned to Variables
var	
  multiply	
  =	
  function(one,	
  two){
	
  	
  return	
  one	
  *	
  two;
};
multiply(3,4);	
  =>	
  12
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
Elements in an Array
var	
  multiply	
  =	
  function(one,	
  two){
	
  	
  return	
  one	
  *	
  two;
};
var	
  array	
  =	
  [1,	
  2,	
  3,	
  multiply];
array[3](3,4);	
  =>	
  12
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
Pass as Arguments to Functions(Callback Pattern)
var	
  multiply	
  =	
  function(one,	
  two){
	
  	
  return	
  one	
  *	
  two;
};
var	
  sumSquare	
  =	
  function(one,	
  two,	
  callback){
	
  	
  sum	
  =	
  one	
  +	
  two;
	
  	
  return	
  callback(sum,	
  sum);
};
sumSquare(1,	
  2,	
  multiply);	
  =>	
  9
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Functions
Properties of an Object
var	
  person	
  =	
  {
	
  	
  name:	
  'Darby	
  Frey',
	
  	
  location:	
  'Chicago',
	
  	
  nameAndLoc:	
  function(name,	
  location){
	
  	
  	
  	
  return	
  name	
  +	
  '	
  -­‐	
  '	
  +	
  location;
	
  	
  }
};
person.nameAndLoc(person.name,person.location);	
  
=>	
  'Darby	
  Frey	
  -­‐	
  Chicago'
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Objects
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Objects are Containers for
Properties and Functions
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Objects
Simple Object
var	
  person	
  =	
  {
	
  	
  name:	
  'Darby	
  Frey',
	
  	
  location:	
  'Chicago',
	
  	
  twitter:	
  '@darbyfrey'
};
person.name;	
  =>	
  'Darby	
  Frey'
person.location;	
  =>	
  'Chicago'
person.twitter;	
  =>	
  '@darbyfrey'
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Objects
Functions as Properties
var	
  person	
  =	
  {
	
  	
  name:	
  'Darby	
  Frey',
	
  	
  location:	
  'Chicago',
	
  	
  twitter:	
  '@darbyfrey',
	
  	
  nameAndLoc:	
  function(){
	
  	
  	
  	
  return	
  this.name	
  +	
  '	
  -­‐	
  '	
  +	
  this.location;
	
  	
  }
};
person.nameAndLoc();	
  =>'Darby	
  Frey	
  -­‐	
  Chicago'
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Constructor Functions
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Constructor Functions
When a function is called with the new
keyword it’s a constructor function
Constructor Functions
• Create a new instance of the object
• Create their own context accessible by the
this keyword
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Constructor Functions
var	
  Person	
  =	
  function(){}
me	
  =	
  new	
  Person();
typeof	
  me;	
  =>	
  object
me;	
  =>	
  Person	
  {}
me.name;	
  =>	
  undefined
me.name	
  =	
  'Darby	
  Frey';
me;	
  =>	
  Person	
  {name:	
  'Darby	
  Frey'}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Constructor Functions
this is the Context
var	
  Person	
  =	
  function(name,	
  location){}
me	
  =	
  new	
  Person('Darby	
  Frey',	
  'Chicago');
me;	
  =>	
  Person	
  {}
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Constructor Functions
this is the Context
var	
  Person	
  =	
  function(name,	
  location){
	
  	
  this.name	
  =	
  name;
	
  	
  this.location	
  =	
  location;
};
me	
  =	
  new	
  Person('Darby	
  Frey',	
  'Chicago');
me;	
  =>	
  Person	
  {name:	
  "Darby	
  Frey",	
  location:	
  
"Chicago"};
me.name;	
  =>	
  'Darby	
  Frey'
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Prototype
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Prototype
• A Prototype is a blueprint of Attributes and
Functions given to an Instance of an Object
created by a Constructor Function
• Attributes and Functions defined in a
Prototype will be available to every Instance
of that Object
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Prototype
var	
  Person	
  =	
  function(name,	
  location){
	
  	
  this.name	
  =	
  name;
	
  	
  this.location	
  =	
  location;
};
Person.prototype	
  =	
  {
	
  	
  coolGuy:	
  true,
	
  	
  chicagoan:	
  function(){
	
  	
  	
  	
  return	
  this.location	
  ==	
  'Chicago'
	
  	
  }
};
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Prototype
darby	
  =	
  new	
  Person('Darby	
  Frey',	
  'Chicago');
darby.coolGuy;	
  =>	
  true
darby.chicagoan();	
  =>	
  true
shay	
  =	
  new	
  Person('Shay	
  Howe',	
  'Ohio');
shay.coolGuy;	
  =>	
  true
shay.chicagoan();	
  =>	
  false
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
In Practice
JavaScript
http://bit.ly/modular-html-css-js
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
4
Onward
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Approach
• Stop thinking about pages
• Start thinking about components
• Take visual inventory
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Themes
• Decouple HTML and CSS
• Separate presentation from layout
• Separate content from container
• Extend elements with classes
• Abstract functionality with objects
• Leverage JavaScript templates
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Outcomes
• Maintainability!
• Reusable code, less duplication
• Flexibility and extensibility
• Improved standards
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
What’s next
Build a style guide
• Twitter Bootstrap, Zurb Foundation
Review methodologies
• OOCSS, SMACSS
Test your code
• CSS Lint, JS Lint, Inspector, PageSpeed,
Console
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Thank You!
@shayhowe
learn.shayhowe.com
@darbyfrey
darbyfrey.com

More Related Content

What's hot

Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
Tadpole Collective
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Joseph Lewis
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
Marc Grabanski
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
Dr.Lokesh Gagnani
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
Marc Huang
 
Jquery News Packages
Jquery News PackagesJquery News Packages
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
Randy Oest II
 
Css.html
Css.htmlCss.html
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
Ana Cidre
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
Tim Wright
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)
Daniel Friedman
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
Dr.Lokesh Gagnani
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
Hawkman Academy
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointSahil Gandhi
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
Pamela Fox
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
Russ Weakley
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
 

What's hot (20)

Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
 
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
HTML News Packages Lesson
 
Jquery News Packages
Jquery News PackagesJquery News Packages
Jquery News Packages
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Css.html
Css.htmlCss.html
Css.html
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
 
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 

Viewers also liked

Yes, Designer, You CAN Be a Product Leader
Yes, Designer, You CAN Be a Product LeaderYes, Designer, You CAN Be a Product Leader
Yes, Designer, You CAN Be a Product Leader
Shay Howe
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
HTML/CSS/JS基础
HTML/CSS/JS基础HTML/CSS/JS基础
HTML/CSS/JS基础
jay li
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Modularisierung von Webseiten
Modularisierung von WebseitenModularisierung von Webseiten
Modularisierung von Webseiten
Jens Grochtdreis
 
Intro to Web Development from Bloc.io
Intro to Web Development from Bloc.ioIntro to Web Development from Bloc.io
Intro to Web Development from Bloc.io
Douglas Wright
 
Collaboration Practices
Collaboration PracticesCollaboration Practices
Collaboration Practices
Shay Howe
 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
Jaeni Sahuri
 
Fleet & transport policy - Envision International (Conf 2010)
Fleet & transport policy - Envision International (Conf 2010)Fleet & transport policy - Envision International (Conf 2010)
Fleet & transport policy - Envision International (Conf 2010)
Andre Knipe
 
Web designing
Web designingWeb designing
Web designing
Avinash Malhotra
 
Css ppt
Css pptCss ppt
Css ppt
Nidhi mishra
 
Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices
Karolina Coates
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
Michael MacDonald
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
ChanHan Hy
 
Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015Andre Knipe
 
Vehicle Management Software
Vehicle Management SoftwareVehicle Management Software
Vehicle Management Software
Tracey Billings
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
Dipen Parmar
 
Building a game with JavaScript (March 2017, washington dc)
Building a game with JavaScript (March 2017, washington dc)Building a game with JavaScript (March 2017, washington dc)
Building a game with JavaScript (March 2017, washington dc)
Daniel Friedman
 
Fleet management system
Fleet management systemFleet management system
Fleet management system
Shree Deepam Infotech Pvt. Ltd.
 

Viewers also liked (20)

Yes, Designer, You CAN Be a Product Leader
Yes, Designer, You CAN Be a Product LeaderYes, Designer, You CAN Be a Product Leader
Yes, Designer, You CAN Be a Product Leader
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
HTML/CSS/JS基础
HTML/CSS/JS基础HTML/CSS/JS基础
HTML/CSS/JS基础
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Modularisierung von Webseiten
Modularisierung von WebseitenModularisierung von Webseiten
Modularisierung von Webseiten
 
Intro to Web Development from Bloc.io
Intro to Web Development from Bloc.ioIntro to Web Development from Bloc.io
Intro to Web Development from Bloc.io
 
Collaboration Practices
Collaboration PracticesCollaboration Practices
Collaboration Practices
 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
 
Fleet & transport policy - Envision International (Conf 2010)
Fleet & transport policy - Envision International (Conf 2010)Fleet & transport policy - Envision International (Conf 2010)
Fleet & transport policy - Envision International (Conf 2010)
 
Web designing
Web designingWeb designing
Web designing
 
Css ppt
Css pptCss ppt
Css ppt
 
Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015
 
Vehicle Management Software
Vehicle Management SoftwareVehicle Management Software
Vehicle Management Software
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
 
Building a game with JavaScript (March 2017, washington dc)
Building a game with JavaScript (March 2017, washington dc)Building a game with JavaScript (March 2017, washington dc)
Building a game with JavaScript (March 2017, washington dc)
 
Fleet management system
Fleet management systemFleet management system
Fleet management system
 

Similar to Modular HTML, CSS, & JS Workshop

Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
TJ Stalcup
 
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Joomla! Day Chicago 2011 - Templating the right way - Jonathan ShroyerJoomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Steven Pignataro
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designersPai-Cheng Tao
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers
Justin Lee
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application DesignBryce Kerley
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
Thinkful
 
Advanced dreamweaver
Advanced dreamweaverAdvanced dreamweaver
Advanced dreamweaver
Sumit Tambe
 
Advanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & EfficiencyAdvanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & Efficiency
Denise Jacobs
 
Css intro
Css introCss intro
Css intro
Julia Vi
 
Blog HTML example for IML 295
Blog HTML example for IML 295Blog HTML example for IML 295
Blog HTML example for IML 295
Evan Hughes
 
HTML/CSS Web Blog Example
HTML/CSS Web Blog ExampleHTML/CSS Web Blog Example
HTML/CSS Web Blog Example
Michael Bodie
 
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nl
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nlSource Ordered Templates - - Joomla!Days NL 2009 #jd09nl
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nl
Joomla!Days Netherlands
 
Class 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsClass 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & Ids
Erika Tarte
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Li-Wei Lu
 

Similar to Modular HTML, CSS, & JS Workshop (20)

Web
WebWeb
Web
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Joomla! Day Chicago 2011 - Templating the right way - Jonathan ShroyerJoomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
Joomla! Day Chicago 2011 - Templating the right way - Jonathan Shroyer
 
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
 
Advanced dreamweaver
Advanced dreamweaverAdvanced dreamweaver
Advanced dreamweaver
 
Advanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & EfficiencyAdvanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & Efficiency
 
Css intro
Css introCss intro
Css intro
 
Css
CssCss
Css
 
Blog HTML example for IML 295
Blog HTML example for IML 295Blog HTML example for IML 295
Blog HTML example for IML 295
 
HTML/CSS Web Blog Example
HTML/CSS Web Blog ExampleHTML/CSS Web Blog Example
HTML/CSS Web Blog Example
 
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nl
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nlSource Ordered Templates - - Joomla!Days NL 2009 #jd09nl
Source Ordered Templates - - Joomla!Days NL 2009 #jd09nl
 
CSS3
CSS3CSS3
CSS3
 
Class 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsClass 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & Ids
 
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSSObject-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
Object-Oriented CSS 從 OOCSS, SMACSS, BEM 到 AMCSS
 

More from Shay Howe

How Constraints Cultivate Growth
How Constraints Cultivate GrowthHow Constraints Cultivate Growth
How Constraints Cultivate Growth
Shay Howe
 
UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3
Shay Howe
 
HTML5 Semantics
HTML5 SemanticsHTML5 Semantics
HTML5 Semantics
Shay Howe
 
Quality Development with HTML5
Quality Development with HTML5Quality Development with HTML5
Quality Development with HTML5
Shay Howe
 
Quality Development with CSS3
Quality Development with CSS3Quality Development with CSS3
Quality Development with CSS3Shay Howe
 
The Web Design Process: A Strategy for Success
The Web Design Process: A Strategy for SuccessThe Web Design Process: A Strategy for Success
The Web Design Process: A Strategy for Success
Shay Howe
 
Writing for the Web: The Right Strategy
Writing for the Web: The Right StrategyWriting for the Web: The Right Strategy
Writing for the Web: The Right Strategy
Shay Howe
 

More from Shay Howe (7)

How Constraints Cultivate Growth
How Constraints Cultivate GrowthHow Constraints Cultivate Growth
How Constraints Cultivate Growth
 
UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3
 
HTML5 Semantics
HTML5 SemanticsHTML5 Semantics
HTML5 Semantics
 
Quality Development with HTML5
Quality Development with HTML5Quality Development with HTML5
Quality Development with HTML5
 
Quality Development with CSS3
Quality Development with CSS3Quality Development with CSS3
Quality Development with CSS3
 
The Web Design Process: A Strategy for Success
The Web Design Process: A Strategy for SuccessThe Web Design Process: A Strategy for Success
The Web Design Process: A Strategy for Success
 
Writing for the Web: The Right Strategy
Writing for the Web: The Right StrategyWriting for the Web: The Right Strategy
Writing for the Web: The Right Strategy
 

Recently uploaded

Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
ameli25062005
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
smpc3nvg
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
TeeFusion
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
madhavlakhanpal29
 
Mohannad Abdullah portfolio _ V2 _22-24
Mohannad Abdullah  portfolio _ V2 _22-24Mohannad Abdullah  portfolio _ V2 _22-24
Mohannad Abdullah portfolio _ V2 _22-24
M. A. Architect
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
smpc3nvg
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
708pb191
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
h7j5io0
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
9a93xvy
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
h7j5io0
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint
Alvis Oh
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
ameli25062005
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
boryssutkowski
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
fabianavillanib
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
ameli25062005
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
PrabhjeetSingh219035
 
projectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdfprojectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdf
farazahmadas6
 

Recently uploaded (20)

Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Mohannad Abdullah portfolio _ V2 _22-24
Mohannad Abdullah  portfolio _ V2 _22-24Mohannad Abdullah  portfolio _ V2 _22-24
Mohannad Abdullah portfolio _ V2 _22-24
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
 
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
一比一原版(BU毕业证书)伯恩茅斯大学毕业证成绩单如何办理
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
 
projectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdfprojectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdf
 

Modular HTML, CSS, & JS Workshop

  • 1. Modular HTML, CSS, & JS Workshop Shay Howe @shayhowe learn.shayhowe.com Darby Frey @darbyfrey darbyfrey.com
  • 2. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Shay Howe @shayhowe learn.shayhowe.com Darby Frey @darbyfrey darbyfrey.com
  • 3. Modular HTML, CSS, & JS @shayhowe & @darbyfrey 1 Groundwork 2 HTML & CSS 3 JavaScript 4 Onward
  • 4. Modular HTML, CSS, & JS @shayhowe & @darbyfrey 1 Groundwork
  • 5. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Common Problems • Websites have difficulty scaling • Code bases become brittle • Files and code bases begin to swell
  • 6. Modular HTML, CSS, & JS @shayhowe & @darbyfrey What’s Wrong • Best practices aren’t exactly best practices • Standards need to evolve
  • 7. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Best Bad Practices • Avoid extra elements • Avoid classes • Leverage type selectors • Leverage descendent selectors
  • 8. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Best Bad Practices Avoiding classes article#main  aside  ul  li  {...} section:last-­‐child  div:nth-­‐child(7)  a  {...} Leveraging selectors a.btn  {...} #main  a.btn  {...} #main  div.feature  a.btn  {...}
  • 9. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Best Bad Practices Bad #contact  li:nth-­‐child(1)  input, #contact  li:nth-­‐child(2)  input  {    width:  50%; } #contact  li:nth-­‐child(3)  textarea  {    width:  75%; }
  • 10. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Best Bad Practices Good .col-­‐1  {    width:  50%; } .col-­‐2  {    width:  75%; }
  • 11. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Maintainability
  • 12. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Code Must Be… • Organized • Modular • Performant
  • 13. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Methodologies OOCSS • Object-Oriented CSS From Nicole Sullivan – oocss.org SMACSS • Scalable and Modular Architecture for CSS From Jonathan Snook – smacss.com
  • 14. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Reuse Code • Do not duplicate code • Remove old code • Defer loading subsequent styles
  • 15. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Reuse Code Bad .news  {    background:  #ccc;    color:  #666; } .social  {    background:  #ccc;    color:  #666; }
  • 16. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Reuse Code Good .news, .social  {    background:  #ccc;    color:  #666; } Better .feat-­‐box  {    background:  #ccc;    color:  #666; }
  • 17. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Use Classes • Write understandable class names • Avoid unnecessary nesting • Use same strength specificity
  • 18. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Use Classes Bad .feat-­‐box  .callout  .pr  {    font-­‐size:  12px; } .feat-­‐box  .callout  .pr  .un  {    color:  #39f; }
  • 19. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Use Classes Good .feat-­‐box  .price  {    font-­‐size:  12px; } .feat-­‐box  .unit  {    color:  #39f; }
  • 20. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Specificity? • Determines which styles are applied • Each selector has a specificity weight • High specificity beats low specificity • Low specificity is key
  • 21. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Measuring Specificity Formula IDs, Classes/Pseudo-classes/Attributes, Elements High Specificity(Bad) #primary  #main  div.gallery  figure.media  {...} IDs: 2, Classes: 2, Elements: 2 — Compiled: 2–2–2 Low Specificity(Good) .gallery-­‐media  {...} IDs: 0, Classes: 1, Elements: 0 — Compiled: 0-1-0
  • 22. Modular HTML, CSS, & JS @shayhowe & @darbyfrey
  • 23. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Watch Specificity • Be explicit • Keep specificity low • Never use IDs or !important • Avoid nested selectors header#main  div.spotlight  strong  span
  • 24. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Watch Specificity Bad #primary  #main  div.gallery  {    text-­‐transform:  uppercase; } #primary  #main  div.gallery  figure.media  {    background:  #ccc; }
  • 25. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Watch Specificity Good .gallery  {    text-­‐transform:  uppercase; } .gallery-­‐media  {    background:  #ccc; }
  • 26. Modular HTML, CSS, & JS @shayhowe & @darbyfrey 2 HTML & CSS
  • 27. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Abstract Structure • Separate presentation(or theme) from layout • Create an object layer for layout • Create a skin layer for theme • Use a grid
  • 28. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Abstract Structure Bad .news  {    background:  #ccc;    color:  #666;    margin:  0  10px;    width:  400px; } <div  class="news">...</div>
  • 29. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Abstract Structure Good .grid-­‐4  {    margin:  0  10px;    width:  400px; } .feat-­‐box  {    background:  #ccc;    color:  #666; } <div  class="grid-­‐4  feat-­‐box">...</div>
  • 30. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Transparentize Elements • Stylize elements to be transparent • Keep visual properties apart from layout properties
  • 31. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Transparentize Elements Bad .pagination  {    border-­‐radius:  5px;    border:  1px  solid  #eee;    margin:  0  10px;    width:  620px; } <ul  class="pagination">...</ul>
  • 32. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Transparentize Elements Good .grid-­‐8  {    margin:  0  10px;    width:  620px; } .offset-­‐box  {    border-­‐radius:  5px;    border:  1px  solid  #eee; } <ul  class="grid-­‐8  offset-­‐box">...</ul>
  • 33. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Create Adaptable Layouts • Height and width should be flexible • Height should extend with content • Width should extend with a grid
  • 34. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Create Adaptable Layouts Bad #main  {    float:  left;    margin:  0  10px;    width:  620px; } #aside  {    float:  left;    margin:  0  10px;    width:  300px; }
  • 35. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Create Adaptable Layouts Good .grid-­‐4, .grid-­‐8  {    float:  left;    margin:  0  10px; } .grid-­‐4  {    width:  300px; } .grid-­‐8  {    width:  620px; }
  • 36. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Separate Content • Separate content from container • Stylize content regardless of container
  • 37. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Separate Content Bad .alert  {    background:  #f2dede;    border-­‐radius:  10px;    color:  #b94a48;    padding:  10px  20px; } <div  class="alert">...</div>
  • 38. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Separate Content Good .alert  {    border-­‐radius:  10px;    padding:  10px  20px; } .alert-­‐error  {    background:  #f2dede;    color:  #b94a48; } <div  class="alert  alert-­‐error">...</div>
  • 39. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Avoid Parent Dependency • Remove parent container dependency • Decouple CSS from HTML • Create components to be used anywhere
  • 40. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Avoid Parent Dependency Bad .feat-­‐box  {    background:  #ccc; } article  .feat-­‐box  {    background:  #fff; } <article>    <div  class="feat-­‐box">...</div> </article>
  • 41. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Avoid Parent Dependency Good .feat-­‐box  {    background:  #ccc; } .feat-­‐box-­‐alt  {    background:  #fff; } <article>    <div  class="feat-­‐box-­‐alt">...</div> </article>
  • 42. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Favor Semantics • Allow elements to adapt • Uses individual classes to extend modules
  • 43. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Favor Semantics Bad .feat-­‐box  h2  {    color:  #f60;    font:  18px  Helvetica,  sans-­‐serif; } <div  class="feat-­‐box">    <h2>...</h2> </div>
  • 44. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Favor Semantics Good .feat-­‐subhead  {    color:  #f60;    font:  18px  Helvetica,  sans-­‐serif; } <div  class="feat-­‐box">    <h2  class="feat-­‐subhead">...</h2> </div>
  • 45. Modular HTML, CSS, & JS @shayhowe & @darbyfrey In Practice HTML & CSS http://bit.ly/modular-html-css-js
  • 46. Modular HTML, CSS, & JS @shayhowe & @darbyfrey 3 JavaScript
  • 47. Modular HTML, CSS, & JS @shayhowe & @darbyfrey
  • 48. Modular HTML, CSS, & JS @shayhowe & @darbyfrey
  • 49. Modular HTML, CSS, & JS @shayhowe & @darbyfrey
  • 50. Modular HTML, CSS, & JS @shayhowe & @darbyfrey
  • 51. Modular HTML, CSS, & JS @shayhowe & @darbyfrey JavaScript fs.readdir(source,  function(err,  files)  {    if  (err)  {        console.log('Error  finding  files:  '  +  err)    }  else  {        files.forEach(function(filename,  fileIndex)  {            console.log(filename)            gm(source  +  filename).size(function(err,  values)  {                if  (err)  {                    console.log('Error  identifying  file  size:  '  +  err)                }  else  {                    console.log(filename  +  '  :  '  +  values)                    aspect  =  (values.width  /  values.height)                    widths.forEach(function(width,  widthIndex)  {                        height  =  Math.round(width  /  aspect)                        console.log('resizing  '  +  filename  +  'to  '  +  height  +  'x'  +  height)                        this.resize(width,  height).write(destination  +  'w'  +  width  +  '_'  +  filename,                        function(err)  {                            if  (err)  console.log('Error  writing  file:  '  +  err)                        })                    }.bind(this))                }            })        })    } }) http://callbackhell.com
  • 52. Modular HTML, CSS, & JS @shayhowe & @darbyfrey JavaScript image  =  new  Image('filename.jpg'); image.resize(400,  300);
  • 53. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Abstract and Encapsulate functionality with Objects
  • 54. Modular HTML, CSS, & JS @shayhowe & @darbyfrey JavaScript Primer
  • 55.
  • 56.
  • 57. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions
  • 58. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions function  multiply(one,  two){    return  one  *  two; }; function(one,  two){    return  one  *  two; };
  • 59. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions Assigned to Variables var  multiply  =  function(one,  two){    return  one  *  two; }; multiply(3,4);  =>  12
  • 60. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions Elements in an Array var  multiply  =  function(one,  two){    return  one  *  two; }; var  array  =  [1,  2,  3,  multiply]; array[3](3,4);  =>  12
  • 61. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions Pass as Arguments to Functions(Callback Pattern) var  multiply  =  function(one,  two){    return  one  *  two; }; var  sumSquare  =  function(one,  two,  callback){    sum  =  one  +  two;    return  callback(sum,  sum); }; sumSquare(1,  2,  multiply);  =>  9
  • 62. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Functions Properties of an Object var  person  =  {    name:  'Darby  Frey',    location:  'Chicago',    nameAndLoc:  function(name,  location){        return  name  +  '  -­‐  '  +  location;    } }; person.nameAndLoc(person.name,person.location);   =>  'Darby  Frey  -­‐  Chicago'
  • 63. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Objects
  • 64. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Objects are Containers for Properties and Functions
  • 65. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Objects Simple Object var  person  =  {    name:  'Darby  Frey',    location:  'Chicago',    twitter:  '@darbyfrey' }; person.name;  =>  'Darby  Frey' person.location;  =>  'Chicago' person.twitter;  =>  '@darbyfrey'
  • 66. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Objects Functions as Properties var  person  =  {    name:  'Darby  Frey',    location:  'Chicago',    twitter:  '@darbyfrey',    nameAndLoc:  function(){        return  this.name  +  '  -­‐  '  +  this.location;    } }; person.nameAndLoc();  =>'Darby  Frey  -­‐  Chicago'
  • 67. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Constructor Functions
  • 68. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Constructor Functions When a function is called with the new keyword it’s a constructor function Constructor Functions • Create a new instance of the object • Create their own context accessible by the this keyword
  • 69. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Constructor Functions var  Person  =  function(){} me  =  new  Person(); typeof  me;  =>  object me;  =>  Person  {} me.name;  =>  undefined me.name  =  'Darby  Frey'; me;  =>  Person  {name:  'Darby  Frey'}
  • 70. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Constructor Functions this is the Context var  Person  =  function(name,  location){} me  =  new  Person('Darby  Frey',  'Chicago'); me;  =>  Person  {}
  • 71. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Constructor Functions this is the Context var  Person  =  function(name,  location){    this.name  =  name;    this.location  =  location; }; me  =  new  Person('Darby  Frey',  'Chicago'); me;  =>  Person  {name:  "Darby  Frey",  location:   "Chicago"}; me.name;  =>  'Darby  Frey'
  • 72. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Prototype
  • 73. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Prototype • A Prototype is a blueprint of Attributes and Functions given to an Instance of an Object created by a Constructor Function • Attributes and Functions defined in a Prototype will be available to every Instance of that Object
  • 74. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Prototype var  Person  =  function(name,  location){    this.name  =  name;    this.location  =  location; }; Person.prototype  =  {    coolGuy:  true,    chicagoan:  function(){        return  this.location  ==  'Chicago'    } };
  • 75. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Prototype darby  =  new  Person('Darby  Frey',  'Chicago'); darby.coolGuy;  =>  true darby.chicagoan();  =>  true shay  =  new  Person('Shay  Howe',  'Ohio'); shay.coolGuy;  =>  true shay.chicagoan();  =>  false
  • 76. Modular HTML, CSS, & JS @shayhowe & @darbyfrey In Practice JavaScript http://bit.ly/modular-html-css-js
  • 77. Modular HTML, CSS, & JS @shayhowe & @darbyfrey 4 Onward
  • 78. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Approach • Stop thinking about pages • Start thinking about components • Take visual inventory
  • 79. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Themes • Decouple HTML and CSS • Separate presentation from layout • Separate content from container • Extend elements with classes • Abstract functionality with objects • Leverage JavaScript templates
  • 80. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Outcomes • Maintainability! • Reusable code, less duplication • Flexibility and extensibility • Improved standards
  • 81. Modular HTML, CSS, & JS @shayhowe & @darbyfrey What’s next Build a style guide • Twitter Bootstrap, Zurb Foundation Review methodologies • OOCSS, SMACSS Test your code • CSS Lint, JS Lint, Inspector, PageSpeed, Console
  • 82. Modular HTML, CSS, & JS @shayhowe & @darbyfrey Thank You! @shayhowe learn.shayhowe.com @darbyfrey darbyfrey.com