SlideShare a Scribd company logo
1 of 37
Download to read offline
ZURBFoundation5
Clean+Organized
JamesStone.com
1 — Copyright 2015-2016, James Stone, All Rights Reserved.
Amostlycssframework
· jQuery + JS: required by some components
· Sass: CSS Preprocessor
· Everything On by Default
2 — Copyright 2015-2016, James Stone, All Rights Reserved.
TheBasics
3 — Copyright 2015-2016, James Stone, All Rights Reserved.
JavaScript
· Individual Imports Per Component
· Import jQuery First
· Activate FastClick.js for better mobile ux
· Use DEFER Attribute
4 — Copyright 2015-2016, James Stone, All Rights Reserved.
UseSass
· Allows you to quickly "theme"
· Easily upgradeable via Bower
· Extend ZURB Components with @mixins
5 — Copyright 2015-2016, James Stone, All Rights Reserved.
PresentationalClasses
6 — Copyright 2015-2016, James Stone, All Rights Reserved.
PresentationalClasses
· always use .small-12 instead of .medium-12
or .large-12
· always start with the medium grid (unless
mobile first)
· then refine small + large as needed
· if radically different use visibility classes
7 — Copyright 2015-2016, James Stone, All Rights Reserved.
beconsistent
.show-for-small-only vs. .hide-for-small-only
.hide-for-small-only vs. .show-for-medium-up
pick one – consistency is key – keep the order
keep the form
8 — Copyright 2015-2016, James Stone, All Rights Reserved.
wordorder
class=" small-8 medium-9 large-10 columns
small-centered "
grid, columns, grid modifiers
small to large
offset, centered, push/pull
9 — Copyright 2015-2016, James Stone, All Rights Reserved.
omitanythingyoucan
small-centered medium-centered large-
uncentered
small-centered medium-uncentered large-
uncentered
small-12 medium-12 large-12
10 — Copyright 2015-2016, James Stone, All Rights Reserved.
whenclassesgobad
small-8 columns medium-offset-2 small-centered
medium-uncentered large-pull-4
maybe it's time for a @mixin
11 — Copyright 2015-2016, James Stone, All Rights Reserved.
source: xkcd.com/844
12 — Copyright 2015-2016, James Stone, All Rights Reserved.
CSS
OOCSS BEM Something Else?
13 — Copyright 2015-2016, James Stone, All Rights Reserved.
CSS
· Use OOCSS Principals when it makes sense
· Follow ZURB Foundation Naming Conventions
(BEM is out)
· Great Reference: SMACSS Book
If you want to go full BEM – just use the sass
mixins
14 — Copyright 2015-2016, James Stone, All Rights Reserved.
SassWorkflow
· Grunt
· Libsass (no Sass 3.3-3.4 features)
· Sourcemaps or Inline Comments
· Autoprefixer (config for sourcemaps)
· Development vs. Production
15 — Copyright 2015-2016, James Stone, All Rights Reserved.
SassOrganization-app.scss
1. Brand Variables
2. ZURB Foundation Overrides
3. Foundation Imports
4. Components
5. Modules (Views, Templates)
6. Sitewide
7. Etc.
8. Live Prototyping
16 — Copyright 2015-2016, James Stone, All Rights Reserved.
/********************************/
/* ~/scss/brand/_variables.scss */
/********************************/
// set common colors and calculations
$brand-light-blue: lighten($brand-blue, 20%);
$brand-dark-gray-text: #333333;
// set any other globals
$brand-spacing: rem-calc(20);
17 — Copyright 2015-2016, James Stone, All Rights Reserved.
/********************************/
/* ~/scss/brand/_settings.scss */
/********************************/
// copy and paste from foundation/_settings.scss
$primary-color: $brand-light-blue;
// refactor same values or colors into brand/vars
18 — Copyright 2015-2016, James Stone, All Rights Reserved.
_settings.scss
· not to be confused with the foundation/
foundation/_settings.scss
· no dead sass vars
· these can change from time-to-time, easy
upgrade
· can be thought of as the theme, skin, look of site
· be careful, changes everything sitewide
19 — Copyright 2015-2016, James Stone, All Rights Reserved.
foundationimports
· just pull from bower_components/
_foundation.scss
· turn on / off what you need for performance
· to leave @mixins set:
$include-html-classes or include-html-n-classes
· in theory they all work
20 — Copyright 2015-2016, James Stone, All Rights Reserved.
quicktip
for rapid prototyping leave // @import
"foundation"; and or // $include-html-classes:
true; at the top and commented out.
Then just uncomment when prototyping.
Recomment and adjust when done.
21 — Copyright 2015-2016, James Stone, All Rights Reserved.
Components blocks of html + css used in more
than one page
Modules everything that is page sepcific
Sitewide single elements / selectors on more
than one page
Shame/Drupalisms/etc. stuff that doesn't fit
appropriately named
Prototype work fast in app.scss but find it a home
fast
22 — Copyright 2015-2016, James Stone, All Rights Reserved.
componentsWWZD?
23 — Copyright 2015-2016, James Stone, All Rights Reserved.
<a class="button small secondary disabled"></a>
<button class="small secondary disabled"></button>
<ul class="button-group">
<li><a class="button">Lorem.</a></li>
<li><a class="button">Quo.</a></li>
<li><a class="button">Reiciendis.</a></li>
</ul>
24 — Copyright 2015-2016, James Stone, All Rights Reserved.
saywhatitis
sayittheZURBway
KISS
25 — Copyright 2015-2016, James Stone, All Rights Reserved.
$vars: true;
@function magic-calc($some-value: true) { @return }
@mixin my-component-base($some-value: true) { // css }
ul.my-component {
& li {
& a.button {
&.disabled {
// ...
}
}
}
}
26 — Copyright 2015-2016, James Stone, All Rights Reserved.
nesting
27 — Copyright 2015-2016, James Stone, All Rights Reserved.
sassisprettysmart
ul.my-component { }
ul.my-component li { }
ul.my-component li a.button { }
ul.my-component li a.button.disabled { }
makesrefactoringclassnamesfastandeasy
28 — Copyright 2015-2016, James Stone, All Rights Reserved.
my-component, another-component a {
& small {
}
}
becomes
my-component small { }
another-component a small { }
watch out for
my-component {
& p, & a { /* each selector needs an & */ }
}
29 — Copyright 2015-2016, James Stone, All Rights Reserved.
modules
· same structure, same process, only the scope is
different
· based on project structure: views, templates,
pages, etc.
/* component */
.everything-else
ul.my-component>li>a
.everything-else
/* module, wrap entire page with a div */
.view-index-find>
.everything-else
30 — Copyright 2015-2016, James Stone, All Rights Reserved.
namingconventions
· make it easy to find, have a direct 1-to-1
correlation
· keep the list alphabetical
scss/view/index/_find.scss
scss/view/partial/auth/_header.scss
scss/page/about-us/_mission.scss
scss/template/blog/_article.scss
31 — Copyright 2015-2016, James Stone, All Rights Reserved.
exampleapp.scss
@import "some-app/brand/defaults";
@import "some-app/brand/settings";
@import "settings"; // DO NOT MODIFY
// For troubleshooting or prototyping, uncomment line below
// @import "foundation";
32 — Copyright 2015-2016, James Stone, All Rights Reserved.
// Performance: uncomment above and comment unused components so they don't generate CSS
//@import "foundation/components/accordion";
@import "foundation/components/alert-boxes";
@import "foundation/components/block-grid";
@import "foundation/components/breadcrumbs";
@import "foundation/components/button-groups";
@import "foundation/components/buttons";
//@import "foundation/components/clearing";
//@import "foundation/components/dropdown";
//@import "foundation/components/dropdown-buttons";
//@import "foundation/components/flex-video";
@import "foundation/components/forms";
@import "foundation/components/grid";
@import "foundation/components/inline-lists";
//@import "foundation/components/joyride";
33 — Copyright 2015-2016, James Stone, All Rights Reserved.
//@import "foundation/components/keystrokes";
@import "foundation/components/labels";
// @import "foundation/components/magellan";
@import "foundation/components/orbit";
@import "foundation/components/pagination";
@import "foundation/components/panels";
//@import "foundation/components/pricing-tables";
@import "foundation/components/progress-bars";
@import "foundation/components/reveal";
//@import "foundation/components/side-nav";
//@import "foundation/components/split-buttons";
@import "foundation/components/sub-nav";
@import "foundation/components/switches";
//@import "foundation/components/tables";
@import "foundation/components/tabs";
@import "foundation/components/thumbs";
@import "foundation/components/tooltips";
@import "foundation/components/top-bar";
@import "foundation/components/type";
//@import "foundation/components/offcanvas";
@import "foundation/components/visibility";
34 — Copyright 2015-2016, James Stone, All Rights Reserved.
// VIEWS
@import "some-app/view/about-us";
@import "some-app/view/article";
@import "some-app/view/become-a-member";
@import "some-app/view/contact";
@import "some-app/view/create-account";
@import "some-app/view/footer";
@import "some-app/view/header";
@import "some-app/view/index";
@import "some-app/view/share";
@import "some-app/view/verify";
35 — Copyright 2015-2016, James Stone, All Rights Reserved.
// COMPONENTS
@import "some-app/component/audio-player";
@import "some-app/component/card";
@import "some-app/component/datepicker";
@import "some-app/component/progress";
@import "some-app/component/rating";
@import "some-app/component/sidebar";
@import "some-app/component/slider";
@import "some-app/component/timeline";
@import "some-app/component/triangle";
@import "some-app/component/user-profile";
@import "some-app/component/visualization";
// SITEWIDE
@import "some-app/drupalisms";
@import "some-app/sitewide";
36 — Copyright 2015-2016, James Stone, All Rights Reserved.
JamesStone.com
@JAMESSTONEco
37 — Copyright 2015-2016, James Stone, All Rights Reserved.

More Related Content

What's hot

Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具andyyou
 
DEFCON-23-Nadeem-Douba-BurpKit
DEFCON-23-Nadeem-Douba-BurpKitDEFCON-23-Nadeem-Douba-BurpKit
DEFCON-23-Nadeem-Douba-BurpKitNadeem Douba
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角Mei-yu Chen
 
MEAN Stack
MEAN StackMEAN Stack
MEAN StackDotitude
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02Paul Bele
 
JavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceJavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceDmitry Sheiko
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performanceNick Dreckshage
 
002. Working with Webpack
002. Working with Webpack002. Working with Webpack
002. Working with WebpackBinh Quan Duc
 
Microservices Architecture: Labs
Microservices Architecture: LabsMicroservices Architecture: Labs
Microservices Architecture: Labsgjuljo
 
005. a React project structure
005. a React project structure005. a React project structure
005. a React project structureBinh Quan Duc
 
Chaos patterns - architecting for failure in distributed systems
Chaos patterns - architecting for failure in distributed systemsChaos patterns - architecting for failure in distributed systems
Chaos patterns - architecting for failure in distributed systemsJos Boumans
 
006. React - Redux framework
006. React - Redux framework006. React - Redux framework
006. React - Redux frameworkBinh Quan Duc
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks ComparisonDeepu S Nath
 
Mehr Performance für WordPress - WordCamp Köln
Mehr Performance für WordPress - WordCamp KölnMehr Performance für WordPress - WordCamp Köln
Mehr Performance für WordPress - WordCamp KölnWalter Ebert
 

What's hot (18)

Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具
 
DEFCON-23-Nadeem-Douba-BurpKit
DEFCON-23-Nadeem-Douba-BurpKitDEFCON-23-Nadeem-Douba-BurpKit
DEFCON-23-Nadeem-Douba-BurpKit
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
 
Mean stack
Mean stackMean stack
Mean stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
JavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceJavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right Choice
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
 
002. Working with Webpack
002. Working with Webpack002. Working with Webpack
002. Working with Webpack
 
Microservices Architecture: Labs
Microservices Architecture: LabsMicroservices Architecture: Labs
Microservices Architecture: Labs
 
005. a React project structure
005. a React project structure005. a React project structure
005. a React project structure
 
Let's vue
Let's vueLet's vue
Let's vue
 
Chaos patterns - architecting for failure in distributed systems
Chaos patterns - architecting for failure in distributed systemsChaos patterns - architecting for failure in distributed systems
Chaos patterns - architecting for failure in distributed systems
 
006. React - Redux framework
006. React - Redux framework006. React - Redux framework
006. React - Redux framework
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks Comparison
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
Mehr Performance für WordPress - WordCamp Köln
Mehr Performance für WordPress - WordCamp KölnMehr Performance für WordPress - WordCamp Köln
Mehr Performance für WordPress - WordCamp Köln
 

Viewers also liked

Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...
Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...
Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...Carlos Ospina
 
Responsive Web Design using ZURB Foundation
Responsive Web Design using ZURB FoundationResponsive Web Design using ZURB Foundation
Responsive Web Design using ZURB FoundationSolTech, Inc.
 
brain computer-interfaces PPT
 brain computer-interfaces PPT brain computer-interfaces PPT
brain computer-interfaces PPTVijay Mehta
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6Rekha Yadav
 

Viewers also liked (7)

Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...
Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...
Convert a Site Template to a Drupal 7 Theme using SASS or LESS and Zurb Found...
 
Responsive Web Design using ZURB Foundation
Responsive Web Design using ZURB FoundationResponsive Web Design using ZURB Foundation
Responsive Web Design using ZURB Foundation
 
IPV6 ppt
IPV6 pptIPV6 ppt
IPV6 ppt
 
ipv6 ppt
ipv6 pptipv6 ppt
ipv6 ppt
 
IPv6
IPv6IPv6
IPv6
 
brain computer-interfaces PPT
 brain computer-interfaces PPT brain computer-interfaces PPT
brain computer-interfaces PPT
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
 

Similar to ZURB Foundation 5: Clean + Organized

React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS Hamed Farag
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAidan Foster
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Matt Raible
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingManuel Garcia
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemVlad Fedosov
 
Modern Web Applications with Sightly
Modern Web Applications with SightlyModern Web Applications with Sightly
Modern Web Applications with SightlyRadu Cotescu
 
High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2Niti Chotkaew
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsJulien Lecomte
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationSpiros Martzoukos
 
CSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfCSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfJonDan6
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionBoldRadius Solutions
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themVlad Fedosov
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sasspriyanka1452
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTimothy Oxley
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityAshok Modi
 
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B....NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...NETFest
 

Similar to ZURB Foundation 5: Clean + Organized (20)

SCSS Styleguide
SCSS StyleguideSCSS Styleguide
SCSS Styleguide
 
Aurelia intro
Aurelia introAurelia intro
Aurelia intro
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser rendering
 
LvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design SystemLvivCSS: Web Components as a foundation for Design System
LvivCSS: Web Components as a foundation for Design System
 
Modern Web Applications with Sightly
Modern Web Applications with SightlyModern Web Applications with Sightly
Modern Web Applications with Sightly
 
High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ation
 
CSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfCSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdf
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
Moving to Drupal
Moving to DrupalMoving to Drupal
Moving to Drupal
 
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B....NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
 

More from James Stone

Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsJames Stone
 
Easy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistEasy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistJames Stone
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSSJames Stone
 
Living Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapLiving Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapJames Stone
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingJames Stone
 
ZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemJames Stone
 
Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5James Stone
 

More from James Stone (7)

Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-components
 
Easy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistEasy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React Styleguidist
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSS
 
Living Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapLiving Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own Bootstrap
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
 
ZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the Ecosystem
 
Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5
 

Recently uploaded

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 

Recently uploaded (20)

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

ZURB Foundation 5: Clean + Organized

  • 1. ZURBFoundation5 Clean+Organized JamesStone.com 1 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 2. Amostlycssframework · jQuery + JS: required by some components · Sass: CSS Preprocessor · Everything On by Default 2 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 3. TheBasics 3 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 4. JavaScript · Individual Imports Per Component · Import jQuery First · Activate FastClick.js for better mobile ux · Use DEFER Attribute 4 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 5. UseSass · Allows you to quickly "theme" · Easily upgradeable via Bower · Extend ZURB Components with @mixins 5 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 6. PresentationalClasses 6 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 7. PresentationalClasses · always use .small-12 instead of .medium-12 or .large-12 · always start with the medium grid (unless mobile first) · then refine small + large as needed · if radically different use visibility classes 7 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 8. beconsistent .show-for-small-only vs. .hide-for-small-only .hide-for-small-only vs. .show-for-medium-up pick one – consistency is key – keep the order keep the form 8 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 9. wordorder class=" small-8 medium-9 large-10 columns small-centered " grid, columns, grid modifiers small to large offset, centered, push/pull 9 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 10. omitanythingyoucan small-centered medium-centered large- uncentered small-centered medium-uncentered large- uncentered small-12 medium-12 large-12 10 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 11. whenclassesgobad small-8 columns medium-offset-2 small-centered medium-uncentered large-pull-4 maybe it's time for a @mixin 11 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 12. source: xkcd.com/844 12 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 13. CSS OOCSS BEM Something Else? 13 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 14. CSS · Use OOCSS Principals when it makes sense · Follow ZURB Foundation Naming Conventions (BEM is out) · Great Reference: SMACSS Book If you want to go full BEM – just use the sass mixins 14 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 15. SassWorkflow · Grunt · Libsass (no Sass 3.3-3.4 features) · Sourcemaps or Inline Comments · Autoprefixer (config for sourcemaps) · Development vs. Production 15 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 16. SassOrganization-app.scss 1. Brand Variables 2. ZURB Foundation Overrides 3. Foundation Imports 4. Components 5. Modules (Views, Templates) 6. Sitewide 7. Etc. 8. Live Prototyping 16 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 17. /********************************/ /* ~/scss/brand/_variables.scss */ /********************************/ // set common colors and calculations $brand-light-blue: lighten($brand-blue, 20%); $brand-dark-gray-text: #333333; // set any other globals $brand-spacing: rem-calc(20); 17 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 18. /********************************/ /* ~/scss/brand/_settings.scss */ /********************************/ // copy and paste from foundation/_settings.scss $primary-color: $brand-light-blue; // refactor same values or colors into brand/vars 18 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 19. _settings.scss · not to be confused with the foundation/ foundation/_settings.scss · no dead sass vars · these can change from time-to-time, easy upgrade · can be thought of as the theme, skin, look of site · be careful, changes everything sitewide 19 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 20. foundationimports · just pull from bower_components/ _foundation.scss · turn on / off what you need for performance · to leave @mixins set: $include-html-classes or include-html-n-classes · in theory they all work 20 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 21. quicktip for rapid prototyping leave // @import "foundation"; and or // $include-html-classes: true; at the top and commented out. Then just uncomment when prototyping. Recomment and adjust when done. 21 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 22. Components blocks of html + css used in more than one page Modules everything that is page sepcific Sitewide single elements / selectors on more than one page Shame/Drupalisms/etc. stuff that doesn't fit appropriately named Prototype work fast in app.scss but find it a home fast 22 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 23. componentsWWZD? 23 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 24. <a class="button small secondary disabled"></a> <button class="small secondary disabled"></button> <ul class="button-group"> <li><a class="button">Lorem.</a></li> <li><a class="button">Quo.</a></li> <li><a class="button">Reiciendis.</a></li> </ul> 24 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 25. saywhatitis sayittheZURBway KISS 25 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 26. $vars: true; @function magic-calc($some-value: true) { @return } @mixin my-component-base($some-value: true) { // css } ul.my-component { & li { & a.button { &.disabled { // ... } } } } 26 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 27. nesting 27 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 28. sassisprettysmart ul.my-component { } ul.my-component li { } ul.my-component li a.button { } ul.my-component li a.button.disabled { } makesrefactoringclassnamesfastandeasy 28 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 29. my-component, another-component a { & small { } } becomes my-component small { } another-component a small { } watch out for my-component { & p, & a { /* each selector needs an & */ } } 29 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 30. modules · same structure, same process, only the scope is different · based on project structure: views, templates, pages, etc. /* component */ .everything-else ul.my-component>li>a .everything-else /* module, wrap entire page with a div */ .view-index-find> .everything-else 30 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 31. namingconventions · make it easy to find, have a direct 1-to-1 correlation · keep the list alphabetical scss/view/index/_find.scss scss/view/partial/auth/_header.scss scss/page/about-us/_mission.scss scss/template/blog/_article.scss 31 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 32. exampleapp.scss @import "some-app/brand/defaults"; @import "some-app/brand/settings"; @import "settings"; // DO NOT MODIFY // For troubleshooting or prototyping, uncomment line below // @import "foundation"; 32 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 33. // Performance: uncomment above and comment unused components so they don't generate CSS //@import "foundation/components/accordion"; @import "foundation/components/alert-boxes"; @import "foundation/components/block-grid"; @import "foundation/components/breadcrumbs"; @import "foundation/components/button-groups"; @import "foundation/components/buttons"; //@import "foundation/components/clearing"; //@import "foundation/components/dropdown"; //@import "foundation/components/dropdown-buttons"; //@import "foundation/components/flex-video"; @import "foundation/components/forms"; @import "foundation/components/grid"; @import "foundation/components/inline-lists"; //@import "foundation/components/joyride"; 33 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 34. //@import "foundation/components/keystrokes"; @import "foundation/components/labels"; // @import "foundation/components/magellan"; @import "foundation/components/orbit"; @import "foundation/components/pagination"; @import "foundation/components/panels"; //@import "foundation/components/pricing-tables"; @import "foundation/components/progress-bars"; @import "foundation/components/reveal"; //@import "foundation/components/side-nav"; //@import "foundation/components/split-buttons"; @import "foundation/components/sub-nav"; @import "foundation/components/switches"; //@import "foundation/components/tables"; @import "foundation/components/tabs"; @import "foundation/components/thumbs"; @import "foundation/components/tooltips"; @import "foundation/components/top-bar"; @import "foundation/components/type"; //@import "foundation/components/offcanvas"; @import "foundation/components/visibility"; 34 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 35. // VIEWS @import "some-app/view/about-us"; @import "some-app/view/article"; @import "some-app/view/become-a-member"; @import "some-app/view/contact"; @import "some-app/view/create-account"; @import "some-app/view/footer"; @import "some-app/view/header"; @import "some-app/view/index"; @import "some-app/view/share"; @import "some-app/view/verify"; 35 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 36. // COMPONENTS @import "some-app/component/audio-player"; @import "some-app/component/card"; @import "some-app/component/datepicker"; @import "some-app/component/progress"; @import "some-app/component/rating"; @import "some-app/component/sidebar"; @import "some-app/component/slider"; @import "some-app/component/timeline"; @import "some-app/component/triangle"; @import "some-app/component/user-profile"; @import "some-app/component/visualization"; // SITEWIDE @import "some-app/drupalisms"; @import "some-app/sitewide"; 36 — Copyright 2015-2016, James Stone, All Rights Reserved.
  • 37. JamesStone.com @JAMESSTONEco 37 — Copyright 2015-2016, James Stone, All Rights Reserved.