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

Recommended for you

Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx

1. The document discusses different topics in CSS including the basics of CSS, background properties, fonts, text properties, the box model, lists, styling links, and positioning. 2. It provides examples and explanations of key CSS concepts like selectors, declarations, background images and colors, fonts, padding, borders, margins, and different positioning techniques. 3. The document is intended to teach the fundamentals of CSS through clear explanations, syntax examples, and diagrams of the box model.

cssstylesheetsitw
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

This document provides an introduction to HTML, CSS, and JavaScript for building websites. It discusses how websites work by connecting clients and servers, and compares making a website to writing a book by organizing content into pages. The document then covers the basic purposes and syntax of HTML for creating page content, CSS for styling, and JavaScript for interactivity. It provides many code examples and explains common elements, properties, and methods in each language to demonstrate basic front-end web development concepts and tools.

htmlweb developmentcss
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
HTML News Packages Lesson

The document provides an introduction to HTML, CSS, and JavaScript for creating online news packages. It discusses the main HTML tags and attributes used, including <h1>, <h2>, <p>, id, class, and style. It then covers CSS selectors like #id, .class, and style properties. Examples are provided for adjusting font sizes and colors. Div tags are also introduced, including how they are block elements that stretch full width by default.

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	
  {...}

Recommended for you

Jquery News Packages
Jquery News PackagesJquery News Packages
Jquery News Packages

jQuery is a JavaScript library that makes it easier to manipulate web pages and add interactivity. It allows developers to select HTML elements, add or modify content, and animate elements using less code than traditional JavaScript. The jQuery library is linked to in the <head> section of an HTML page using a <script> tag. jQuery commands begin with $ and use CSS selectors inside parentheses to target elements. Common commands include fadeOut(), hide(), and slideUp() to animate elements. Parameters can be passed to commands to modify their behavior.

htmlcssjquery
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS

This document provides an introduction to CSS (Cascading Style Sheets) and covers key concepts such as selectors, the box model, positioning, and responsive design. It explains that CSS is used to style and lay out elements on web pages and works together with HTML. The document outlines important CSS topics like selectors, properties and values, units of measurement, the box model, display types, flow, floats, and positioning. It emphasizes best practices like using relative units and media queries for responsive designs.

htmlintrocss
Css.html
Css.htmlCss.html
Css.html

This document provides an introduction and overview of Cascading Style Sheets (CSS). It defines CSS as used to format and style web pages, describes the advantages of using CSS including simplifying design changes and creating style sheets for different audiences. It then explains the basic syntax of CSS using examples and describes the three types of CSS styles: internal, inline, and external styles. Finally, it outlines different CSS selectors including element, id, and class selectors and provides an example of how to use CSS to style an HTML table.

csstypes of css
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

Recommended for you

HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!

HTML & CSS are languages used to structure and style web pages. HTML provides the content structure using elements, tags, and attributes. CSS controls the style and layout using selectors, properties, and values. Some common HTML terms include elements, tags, and attributes. A basic HTML document structure includes DOCTYPE, html, head, title, and body tags. CSS can be used to style HTML elements by selecting them with tags, classes, IDs and applying properties like color, font-size, background, and more.

htmlwebsiteweb design
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks

This document provides an overview of Object Oriented CSS (OOCSS), HTML5, and web performance. It discusses what OOCSS is, how to implement it, and why it is useful. It also briefly covers some HTML5 forms and communication features. Finally, it examines how to improve website speed. The goal is to look at these topics and discuss elegant and lean CSS as opposed to "fat sack of crap" code.

cssinternethtml5
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)

This document provides an introduction to HTML and CSS for frontend development. It begins with an overview of the instructor and goals of the course. Key concepts of HTML like tags, elements, and attributes are explained. CSS topics covered include selectors, properties, values, and layout techniques like positioning. Code examples and exercises are provided to demonstrate and practice the concepts. The document encourages continued learning and offers additional resources through Thinkful.

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;
}

Recommended for you

Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)

The document provides an overview of HTML and XHTML topics including: 1. It defines HTML as a markup language used to define the structure and layout of web pages using tags. XHTML is defined as a stricter version of HTML that follows XML syntax rules. 2. Key HTML topics covered include basic tags for headings, paragraphs, colors, fonts, lists, links, images and tables. It also discusses HTML forms, headers and bodies. 3. The document contrasts XHTML with HTML and outlines requirements for XHTML documents such as mandatory DOCTYPEs and proper nesting of tags.

itwhtml5xhtml
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS

This document provides an overview of CSS (Cascading Style Sheets) and how to style HTML elements. It defines CSS, explains how CSS works with HTML to style web pages, and provides examples of CSS selectors, properties and common techniques. The document also recaps HTML elements and structure, and outlines learning objectives around basic web design with HTML and CSS.

html css introduction
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

Here are some tips for hands-on part 2: - Add a class like .paragraph to the <p> tags containing your sentences - Add an ID like #image to the <img> tag - In an internal or external CSS file: .paragraph { color: blue; font-size: 20px; } #image { padding: 10px; display: block; margin: 0 auto; } - For background: body { background-color: lightgray; } - Play around with other CSS properties like text-align, font-family etc.

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

Recommended for you

2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now

The final spec of html5 won't be ready until 2022, but you don't have to wait that long to start using it today and build really advanced web apps.

HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes

This document summarizes an introductory workshop on web technologies including HTML, CSS, and the document object model (DOM). It provides an overview of the history and basics of HTML, how to set up a basic website, and introductions to CSS, the DOM, and additional web technologies covered in the workshop like forms and positioning.

htmlcssuscupe
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world

Extended slides from a recent Sydney Port80 presentation. The slides cover three overall topics: 1) a quick timeline of CSS-related events, 2) key events that changed CSS and 3) a discussion on writing better CSS.

html5 boilerplatecsssass
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;
}

Recommended for you

HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript

- HTML, CSS, and JavaScript are becoming the new standard for building applications and interactive experiences on the web. - Best practices include using semantic HTML, clean CSS with a focus on maintainability, and JavaScript performance optimizations. - Key techniques discussed are image sprites, progressive enhancement, and jQuery selector chaining to reduce DOM lookups.

htmlficss
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS

The document provides an agenda for a workshop on HTML, CSS, and putting them together. It covers HTML topics like semantic tags, comments, and best practices. It then discusses CSS topics such as IDs vs classes, floats, shorthand, and putting HTML and CSS together with project structure and layouts. The workshop aims to give an introduction to HTML, CSS, and how to structure websites using these languages.

layoutcsshtml5
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

There are many different ways to get into product leadership, and as a designer you are better suited than most. You have a knack for details, problem solving, and organization. And those skills, believe it or not, make you better suited to get your start in product leadership than many other career paths. Over the course of my career I’ve been a designer, front-end engineer, and now, most recently, a product leader. I’m ready to demystify what it takes to become a product leader, share the steps I took, and provide advice so that you too may jump into product. It’s not a journey without it’s struggles but it’s ripe with opportunity and enjoyment!

product managementmanagementleadership development
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>

Recommended for you

HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics

The document provides an introduction to HTML basics including HTML document structure, common tags, and formatting. It discusses the <!DOCTYPE> declaration, <head> and <body> sections, common text formatting tags, headings, paragraphs, comments, and includes code examples.

HTML/CSS/JS基础
HTML/CSS/JS基础HTML/CSS/JS基础
HTML/CSS/JS基础

淘宝前端技术培训第二课,HTML/CSS/JS基础

htmljavascriptued
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation

about this presentation: 1) this presentation was a quickie for non-tech employees, who wanted a basic understanding of html/css, as it related to a white-label SAAS product; 2) the back-end/front-end definitions relate to the specific application (it's inaccurate if node.js is in the picture)

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>

Recommended for you

Modularisierung von Webseiten
Modularisierung von WebseitenModularisierung von Webseiten
Modularisierung von Webseiten

Vortrag auf der Webtech 2012. Eine Webseite besteht aus vielen einzelnen Modulen, die alle als eigenes Universum betrachtet werden können. CSS-Präprozessoren helfen bei der effektiven Behandlung der Module. Prototyping im Browser und ein neuer Workflow werden dadurch einfacher.

htmlsasscss
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

Learn about web development, MVC frameworks, CRUD applications. Learn about Git, Github and Heroku, and how to create a basic Ruby on Rails web application.

railsgithubstarter app
Collaboration Practices
Collaboration PracticesCollaboration Practices
Collaboration Practices

We are born collaborators. As children we’re taught to share our toys, take turns on the playground, and, perhaps most powerful, use our imagination. These fundamental skills transcend from the playground to the classroom, and later into the workplace. Overtime, though, we lose the spark once had on the playground. Innovation comes at the cost of time and frustration, and workplace collaboration becomes unproductive. It doesn’t have to, and shouldn’t, be this way. Within this workshop we’ll cover collaboration in detail, outlining practices to help strengthen communication, establish understood roles, self-selected leaders, and work together. Collaboration shouldn’t be futile and a few simple practices can make all the difference in increasing team productivity and happiness.

productivityteamworkdesign thinking
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

Recommended for you

CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction

CSS3 is the latest standard for cascading style sheets (CSS). CSS3 introduces several new modules that expand the capabilities of CSS, including selectors, box model, backgrounds/borders, image values, text effects, transformations, animations, multiple column layout, and user interface. The document provides examples of CSS3 properties and modules, demonstrating borders, selectors, text effects, menus, and creating multiple columns. It concludes by thanking some websites for information on CSS3.

jquerycss3php
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)

The document discusses South Africa's policy priorities for land transport which include supporting basic needs, economic growth, developing human resources, and democratic decision making. It also discusses improving safety, security, reliability, quality, and speed of transporting people and goods. Typical international policy priorities like congestion management, environmental improvement, safety and health are also addressed. The role of various stakeholders like the accounting officer, chief financial officer, transport officer and drivers are defined. Key aspects of developing a transport strategy like performing environmental analysis, formulating objectives and consulting relevant parties are explained. Examples of elements that could be included in a transport and fleet management strategic plan and policy are provided such as service provision, vehicle acquisition, and performance monitoring.

Web designing
Web designingWeb designing
Web designing

Tech Altum provides a 4-month web design course covering HTML, CSS, JavaScript, jQuery, Photoshop, responsive layouts and Bootstrap. The course objectives are to provide concepts, technologies and skills for front-end web development. It covers topics such as HTML5 fundamentals, CSS3, responsive websites, Bootstrap framework, and implementing a sample project. The training is conducted by experienced corporate trainers and includes placement assistance and opportunities for live project training.

css3web designinghtml
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>

Recommended for you

Css ppt
Css pptCss ppt
Css ppt

CSS stands for cascading style sheet. It is not a language. It is a pat of design. CSS is a heart of HTML. There are 3 ways to attach CSS to a page,

Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices

Slides from 'Back to Basics' quarterly theme presentation @Version 1 covering: general front-end best practice guidelines,HTML markup, CSS, Java Script, Accessibility, Performance, Cross-browser compatibility, Code Reviews and Tools & resources

cssuihtml5
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation

Ruby on Rails is a web application framework that is designed to make programming web applications easier and more enjoyable. It includes features like an object-relational mapper called Active Record that allows database rows to be represented as objects, conventions that reduce configuration, and support for test-driven development. Rails is built on Ruby, an interpreted object-oriented programming language, and aims to be programmer friendly and allow powerful applications to be built quickly. Several experts praise Rails for lowering the barriers to entry for programming and being a well-thought-out framework.

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>

Recommended for you

Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation

This is ruby on rails presentation on BarCamp Phnom Penh's day in Cambodia on Saturday, September 20th 2008.

railsbarcamp
Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015Basic Transport & Fleet Mngt - AK2015
Basic Transport & Fleet Mngt - AK2015

The document provides an overview of basic transport and fleet management in the public sector. It discusses key topics such as the role of different stakeholders and their responsibilities, asset management practices for transport and fleet, management of government owned transport, outsourcing options, and loss control measures. The agenda includes understanding transport versus fleet management, procurement and maintenance of assets, and performance monitoring throughout the asset lifecycle.

Vehicle Management Software
Vehicle Management SoftwareVehicle Management Software
Vehicle Management Software

This document describes vehicle management software for garage owners and mechanics. The software allows users to enter vehicle and customer data only once and then perform multiple tasks with that data. It enables searching by vehicle, customer, or other methods. Users can enter customer and vehicle details, select customers from a dropdown box. The software can be customized with a company logo and reports, and is available as a single user cloud or PC version with a one-time fee of £49.

vehicle management software
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

Recommended for you

Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3

This presentation is target for developers that are new to CSS3, and would like to know what CSS3 they need to understand for Windows 8 development.

codecss3demo
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

Hello Friends my name is Dipen parmar and today you got all you need in HTML ,CSS, andJavaScript in just one document.... so please give like and subscribe my youtube channel https://www.youtube.com/channel/UChvhhqqFl23yYwq54ykoOQQ

html (programming language)cssprogramming language
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)

This document outlines building a guessing game with JavaScript. It introduces JavaScript fundamentals like variables, functions, parameters and returns. It breaks the game down into steps like generating a random number, accepting user input, checking guesses, and displaying feedback. Code examples are provided to get started on functions for generating a random number and displaying the guess count. The goal is to practice problem-solving like a developer and learn JavaScript as needed.

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);

Recommended for you

Fleet management system
Fleet management systemFleet management system
Fleet management system

The document discusses a fleet management system called Columbus that allows users to track and monitor vehicles through a small GPS device installed in each vehicle. The system's desktop application features a home screen with a toolbar, vehicle panel, and details panel to view real-time locations on a map, vehicle histories through graphs and charts, and generate customized reports. Key features of the system include live tracking, route playback, geofencing, alerts, vehicle status updates, and report customization.

asset trackingfleet managementgps
Web
WebWeb
Web

This document provides an introduction to HTML, CSS, and JavaScript. It discusses the objectives of familiarizing the reader with the web browser, providing first steps into these languages, and motivating further exploration. It then covers HTML tags and document structure, how CSS is used to style and separate design from content, and how JavaScript can be used to add interactivity to webpages. It also discusses how to insert CSS and JavaScript into an HTML page through internal, external and inline methods.

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

Here are the steps to build a basic horizontal navigation menu bar: 1. Create an unordered list <ul> with class="menu" 2. Add list items <li> for each menu item 3. Style the <ul> with display:inline-block and border-bottom 4. Style the <li> with display:inline-block, padding and hover effect 5. Add a class="current" to highlight the active page 6. Use a border-left on .current to create a left arrow Let me know if any part needs more explanation! Building menus is a common task and these techniques will serve you well.

girl develop it cincinnatigdi cincinnatigirl develop it
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
Abstract and Encapsulate
functionality with Objects
Modular HTML, CSS, & JS @shayhowe & @darbyfrey
JavaScript Primer
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop

Recommended for you

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

This document provides an overview of an introductory HTML/CSS crash course. It introduces the instructor and Thinkful, discusses the goals of learning core HTML and CSS concepts through building a basic website. It covers key topics like how the web works, HTML tags and elements, CSS selectors, properties and values, and linking a CSS stylesheet to HTML. The document emphasizes practicing the concepts through building assignments and challenges students to keep learning outside of the course.

html5frontendweb development
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

Joomla! Day Chicago 2011 presentation on building Joomla! templates with an emphasis on PHP code you can use to gain more control of your templates.

joomlaphpcorephp
Be nice to your designers
Be nice to your designersBe nice to your designers
Be nice to your designers

The document provides tips for Rails developers when working with designers, suggesting they use consistent naming for models and views, integrate CSS stylesheets and images properly, and use techniques like conditional comments and body classes to target styles for different browsers like Internet Explorer.

railsdesigner
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

Recommended for you

Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop

We go over what parts of HTML5 and CSS3 you can use right away and how to degrade gracefully in order to appease the older browsers. Then, we play with some of the awesome visual candy you can make using the latest properties. - Presented at PyGotham

htmlhtml5css
Css for Development
Css for DevelopmentCss for Development
Css for Development

The document contains a presentation on CSS (Cascading Style Sheets) given by Herman. The presentation covers the basics of CSS including how it separates design from HTML, writing CSS selectors for tags, classes and IDs, basic styling properties, the box model, positioning, CSS frameworks, and standards used at Bina Nusantara University.

cssweb design and development
HTML5 for ASP.NET Developers
HTML5 for ASP.NET DevelopersHTML5 for ASP.NET Developers
HTML5 for ASP.NET Developers

HTML5 is the next wave of development for the web, with the support from IE9 and IE10. Even Windows 8 will support native apps written in HTML5. This session will give an overview and a deeper dive into writing effective HTML5 together with your existing ASP.NET experience to create the best next generation web experience.

html5asp.net
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

Recommended for you

Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design

This document provides an overview and introduction to advanced technologies for web design, including HAML, SASS, Compass, CoffeeScript, Rake, and Charleston. HAML and SASS are markup languages that can simplify and improve HTML and CSS. Compass is a CSS meta-framework built with SASS. CoffeeScript is a programming language that compiles to JavaScript. Rake is a build tool that can be used with these technologies. Charleston is a static site generator that bundles Rake rules for using HAML, SASS, and CoffeeScript together on a project. Installation and usage instructions are provided for each technology.

htmlhamlsass
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)

This document provides an introduction to HTML and CSS for building websites. It discusses key concepts like tags, elements, attributes, selectors, properties and values. It explains how HTML provides structure and content while CSS handles visual presentation and layout. Students are guided through writing their first HTML page and linking a CSS stylesheet. The document promotes practicing skills learned and using resources like Google when learning. It also introduces Thinkful's full web development program which includes mentorship and career preparation.

Advanced dreamweaver
Advanced dreamweaverAdvanced dreamweaver
Advanced dreamweaver

This document provides instructions for advanced web design using Dreamweaver. It discusses using cascading style sheets (CSS) to change the appearance of HTML elements like links and applying styles through element tags, classes, IDs, and inline styles. It also covers including dynamic and reusable content through includes, templates, and programming. The document walks through deconstructing a sample page into header, navigation, footer, and other modular pieces that can be reused across pages and customized individually. Finally, it provides tips for organizing files, naming conventions, image sizes, and keeping content current.

advanced dreamweaver
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

Recommended for you

Advanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & EfficiencyAdvanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & Efficiency

Good CSS troubleshooting skills are important to decrease your workload and help you work better with others. Tips for clean code and targetting, as well as solutions to modern browser bugs are covered. Presented at Rich Web Experience 2011, Ft. Lauderdale, FL.

efficient codingcssdenisejacobs
Css intro
Css introCss intro
Css intro

The document discusses key concepts in CSS including selectors, the box model, positioning, and best practices. Some key points covered include: - CSS defines how HTML elements are displayed and styled. - There are different ways to insert CSS like external, internal, and inline styles. More specific styles have precedence. - Selectors target elements using tags, IDs, classes, descendants, children, siblings and pseudo-classes. - The box model describes the sizing of elements including margins, padding, borders, and positioning. - Common properties control colors, fonts, widths, heights, and visibility of elements. Best practices encourage semantic naming and avoiding !important.

web designhtmlcss
Css
CssCss
Css

This document provides an overview of CSS (Cascading Style Sheets) including its history, basic syntax and structure, common properties that can be styled, and different methods for applying styles. Key points covered include using CSS to style fonts, colors, links, and page layout with properties like padding, margin, and floats. The document also demonstrates how to select elements with IDs, classes, and other selectors to style them.

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

Recommended for you

Blog HTML example for IML 295
Blog HTML example for IML 295Blog HTML example for IML 295
Blog HTML example for IML 295

The document provides instructions for creating an HTML blog layout and styling with CSS. It describes adding div elements to structure content areas like headers, articles, and a Twitter widget. CSS code is provided to style each div by setting widths, colors, borders etc. Styling techniques like floats, margins and shadows are demonstrated. The goal is to create a multi-article blog layout with formatted text, images and embedded content.

htmliml_295css
HTML/CSS Web Blog Example
HTML/CSS Web Blog ExampleHTML/CSS Web Blog Example
HTML/CSS Web Blog Example

The document provides instructions for creating an HTML blog layout and styling. It describes adding div elements to structure the content, including a main wrapper, header, article sections, and formatting individual elements. Cascading Style Sheet (CSS) code is provided to style these divs by setting widths, margins, backgrounds, borders, shadows etc. The goal is to create a multi-section blog layout with formatted text, images, and embedded content like Twitter widgets and Prezi presentations.

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

This document discusses optimizing a website for search engines by ordering content properly and making the template search engine friendly. It recommends: - Placing important content above elements search engines can't read like Flash - Grouping and reordering content divisions so the most important content is higher in the source code - Using CSS for layout instead of tables to allow proper reading by crawlers - Generating the right H1, H2, H3 tags using template overrides The document demonstrates these techniques by restructuring a sample template's CSS and HTML to make the content flow in a search engine optimized order from top to bottom.

joomladagenjoomladaysjd09nl
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

Recommended for you

CSS3
CSS3CSS3
CSS3

The document discusses various new elements in CSS3 including shadow effects, rounded corners, border images, colored borders, opacity transitions, RGBA/HSLA colors, attribute selectors, multi-column layouts, transitions, web fonts, and media queries. It also covers CSS preprocessors like Sass and Less, adding variables, nesting, mixins and other features to make CSS more powerful and modular. Best practices for performance include minimizing HTTP requests, caching, browser support, frameworks and tools.

css3
Class 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsClass 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & Ids

Lecture prepared for Web Design (GRAPH-3271-01) at the Rhode Island School of Design. Wintersession 2011. Instructor: 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

我們都同意,其實 CSS 並不難。但是很快的你發現,當專案開始變大,你的 CSS 變得越來越難維護 — tag、id 還有 class 交錯使用,選擇器越組越長,這段 CSS 看起來好眼熟? 為什麼你需要 Object Oriented CSS Methodology?什麼是 OOCSS、SMACSS 還有 BEM (甚至是最新的 AMCSS)?如何寫出具有可預測性、可重複使用且易於維護的架構?

amcssoocsscss methodology
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

Recommended for you

How Constraints Cultivate Growth
How Constraints Cultivate GrowthHow Constraints Cultivate Growth
How Constraints Cultivate Growth

Imagine a playground with no rules. The never-ending dodgeball game would dominate the entire blacktop space, pushing out the jump ropers and Red Rover players. It would never be your turn to go on the swings. And try as you might to remain honest, you'd still catch yourself cheating at Hot Lava Tag. In order for peace and progress to occur, rules are necessary. The same thought can be applied to designing and developing websites. Nowadays, our options are endless and as designers and developers we can build any website or application we wish. What these options don't guarantee, however, is that what we build will be of any quality or fulfill our users' needs. Fortunately, we can rely on constraints, or "tech rules", to ensure our products are sound. By settling constraints, we force ourselves to be more productive. They help us make decisions, creating focus around the problem we are trying to solve. They improve our consistency, which provides a better experience for our users. And they help us grow, a valuable asset in times of innovation. Within this session, Shay will dive into different constraints and their benefits to building websites. Constraints are good and, when leveraged properly, allow us to truly flourish. It's your turn to go on the swings. Enjoy it.

web designproduct managementpersonal growth
UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3UI Design with HTML5 & CSS3
UI Design with HTML5 & CSS3

HTML5 and CSS3 have taken shape and are being put to use everyday. What does this mean for you and how do you know if you are leveraging them correctly? Shay Howe, user interface engineer at Groupon, will break down HTML5 and CSS3 showing you how to build a better user interface and improve the over all user experience. New HTML5 input types and CSS3 rounded corners are just the begging, learn what else can help bring your website to the next level.

htmlcss3html5
HTML5 Semantics
HTML5 SemanticsHTML5 Semantics
HTML5 Semantics

Semantics have been an underlining part of HTML for years, using elements, attributes, and values to reinforce the meaning of content. In the wake of popularity, HTML5 has expanded the library of semantic options and cleaned up former semantic options along the way. These improved semantics advocate accessibility and progressive enhancement, providing more intuitive user interfaces and mobile supplementation. One problem still looms, semantics are only of benefit when used properly. Adoption at large is necessary, and essential to building a better web.

front-end developmentweb designhtml
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
 
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
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 PowerPoint
Sahil 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 - AK2015
Andre 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

Web
WebWeb
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
Erin 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 designers
Pai-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 Development
tsengsite
 
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 Design
Bryce 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
 
Css
CssCss
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
 
CSS3
CSS3CSS3
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 CSS3
Shay 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

Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeMahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
hina ojha$A17
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
dakshishsingh98798
 
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model SafeDaryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
jiya khan$A17
 
SMACNA - DUCT CONSTRUCTION STANDARDS-2005.pdf
SMACNA -  DUCT CONSTRUCTION STANDARDS-2005.pdfSMACNA -  DUCT CONSTRUCTION STANDARDS-2005.pdf
SMACNA - DUCT CONSTRUCTION STANDARDS-2005.pdf
Magdiel70
 
S S Bhavikatti Civil Engineering Structural Designing
S S Bhavikatti Civil Engineering Structural DesigningS S Bhavikatti Civil Engineering Structural Designing
S S Bhavikatti Civil Engineering Structural Designing
SuvamoyPanja
 
Design Impulse: Boost the power of design
Design Impulse: Boost the power of designDesign Impulse: Boost the power of design
Design Impulse: Boost the power of design
Pieter van Langen
 
Product Showcase Presentation |slides sample.pptx
Product Showcase Presentation |slides sample.pptxProduct Showcase Presentation |slides sample.pptx
Product Showcase Presentation |slides sample.pptx
wojakmodern
 
With Fear For Our Democracy I Dissent Shirt
With Fear For Our Democracy I Dissent ShirtWith Fear For Our Democracy I Dissent Shirt
With Fear For Our Democracy I Dissent Shirt
TeeFusion
 
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】 .
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】  .十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】  .
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】 .
telchlarzelere270
 
Glasgow University degree Certificate
Glasgow University degree CertificateGlasgow University degree Certificate
Glasgow University degree Certificate
tezeqes
 
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdhBalhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
NakulJain35
 
2024_summer_my_dream_gnjp_20240705_ks.pdf
2024_summer_my_dream_gnjp_20240705_ks.pdf2024_summer_my_dream_gnjp_20240705_ks.pdf
2024_summer_my_dream_gnjp_20240705_ks.pdf
kousato1
 
Professional Document Editing Services / Bank Statement Editing
Professional Document Editing Services / Bank Statement EditingProfessional Document Editing Services / Bank Statement Editing
Professional Document Editing Services / Bank Statement Editing
Edit Bank Statement
 
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeGhaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
nikhilkumarji0156
 
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model SafeGreater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
kumkum tuteja$A17
 
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
ijk38lw
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
anany pandey$A17
 
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENGPortfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
Rostyslav Kasyanenko
 
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdfHill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
Vasu283735
 
A Green City is an urban area that prioritizes sustainability
A Green City is an urban area that prioritizes sustainabilityA Green City is an urban area that prioritizes sustainability
A Green City is an urban area that prioritizes sustainability
Mostafa Abd Elrahman
 

Recently uploaded (20)

Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeMahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
Mahipalpur @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
 
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model SafeDaryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Daryaganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
 
SMACNA - DUCT CONSTRUCTION STANDARDS-2005.pdf
SMACNA -  DUCT CONSTRUCTION STANDARDS-2005.pdfSMACNA -  DUCT CONSTRUCTION STANDARDS-2005.pdf
SMACNA - DUCT CONSTRUCTION STANDARDS-2005.pdf
 
S S Bhavikatti Civil Engineering Structural Designing
S S Bhavikatti Civil Engineering Structural DesigningS S Bhavikatti Civil Engineering Structural Designing
S S Bhavikatti Civil Engineering Structural Designing
 
Design Impulse: Boost the power of design
Design Impulse: Boost the power of designDesign Impulse: Boost the power of design
Design Impulse: Boost the power of design
 
Product Showcase Presentation |slides sample.pptx
Product Showcase Presentation |slides sample.pptxProduct Showcase Presentation |slides sample.pptx
Product Showcase Presentation |slides sample.pptx
 
With Fear For Our Democracy I Dissent Shirt
With Fear For Our Democracy I Dissent ShirtWith Fear For Our Democracy I Dissent Shirt
With Fear For Our Democracy I Dissent Shirt
 
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】 .
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】  .十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】  .
十大美洲杯投注网站-美洲杯投注网站平台网址大全 |【​网址​🎉ac123.net🎉​】 .
 
Glasgow University degree Certificate
Glasgow University degree CertificateGlasgow University degree Certificate
Glasgow University degree Certificate
 
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdhBalhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
Balhani 1st yr (1).pdfhshhshshshshshshshdhdhdh
 
2024_summer_my_dream_gnjp_20240705_ks.pdf
2024_summer_my_dream_gnjp_20240705_ks.pdf2024_summer_my_dream_gnjp_20240705_ks.pdf
2024_summer_my_dream_gnjp_20240705_ks.pdf
 
Professional Document Editing Services / Bank Statement Editing
Professional Document Editing Services / Bank Statement EditingProfessional Document Editing Services / Bank Statement Editing
Professional Document Editing Services / Bank Statement Editing
 
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeGhaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Ghaziabad @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
 
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model SafeGreater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
Greater Kailash @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Vishakha Singla Top Model Safe
 
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
一比一原版(ual毕业证书)伦敦艺术大学毕业证如何办理
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Akshra Ojha Top Model Safe
 
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENGPortfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
Portfolio of Family Coat of Arms, devised by Kasyanenko Rostyslav, ENG
 
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdfHill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
Hill Dan - Dark matter and trojan horses. A strategic design vocabulary.pdf
 
A Green City is an urban area that prioritizes sustainability
A Green City is an urban area that prioritizes sustainabilityA Green City is an urban area that prioritizes sustainability
A Green City is an urban area that prioritizes sustainability
 

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
  • 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