I need two demo sites. And I need them in two days

Similar documents
one file so many sites

Zen Garden. CSS Zen Garden

CSS Mapping in Advanced Mode for Events. Cvent, Inc 1765 Greensboro Station Place McLean, VA

Website Development with HTML5, CSS and Bootstrap

Scalable and Modular Architecture for CSS. The Workshop

Product Page PDF Magento 2 Extension

Scalable and Modular Architecture for CSS. The Workshop

Scalable and Modular Architecture for CSS. A flexible guide to developing sites small and large. by Jonathan Snook

Scalable and Modular Architecture for CSS. The Workshop

Building beautiful websites with Bootstrap: A case study. by Michael Kennedy michaelckennedy.net

Professional Course in Web Designing & Development 5-6 Months

WEB DESIGNING COURSE SYLLABUS

Guidelines for doing the short exercises

Overview

Important installation note Back to Top. Homepage Overview Back to Top

Advanced Dreamweaver CS6

Product Page PDF Magento Extension


Custom Contact Forms Magento 2 Extension

~Arwa Theme~ HTML5 & CSS3 Theme. By ActiveAxon

DRY CSS A DON T-REPEAT-YOURSELF METHODOLOGY FOR CREATING EFFICIENT, UNIFIED AND SCALABLE STYLESHEETS

Table Basics. The structure of an table

A Quick Introduction to the Genesis Framework for WordPress. How to Install the Genesis Framework (and a Child Theme)

Sitecore Experience Accelerator 1.2 Rev: September 13, Sitecore Experience Accelerator 1.2

Using CSS for page layout

Sitecore Experience Accelerator 1.1 Rev: September 13, Sitecore Experience Accelerator 1.1

Layout with Layers and CSS

Build Powerful FrontEnd Workflows with PostCSS. Guide to writing/generating cutting edge CSS

CSS (Cascading Style Sheets)

Helpline No WhatsApp No.:

Static Webpage Development

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

OPTICS READYTHEME CUSTOMIZATION

ENGINEERING DATA HUB VISUAL DESIGN SPECIFICATIONS VERSION 3. Created: 2/10/2017

Managing CSS Projects with ITCSS. DaFED Novi Sad, November 2014

Create First Web Page With Bootstrap

Web development using PHP & MySQL with HTML5, CSS, JavaScript

OddsMatrix. Everything is possible. SASS Code Standards

CM Mega Menu Documentation

Css Manually Highlight Current Page Menu Using

Create the Left Navigation SSI Quick Guide

Drupal 8 / Theming Quickstart

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

New Visual Design for IRON HQ Release Notes

SHADOWS READYTHEME CUSTOMIZATION

The Structure of the Web. Jim and Matthew

Dreamweaver CS4: Layout Guide. Převzato z

COMPONENT DRIVEN DESIGN AND DEVELOPMENT. Cristina Chumillas

High-level accessibility review BTAA

Getting Started with Access

IEEE Wordpress Theme Documentation

BindTuning Installations Instructions, Setup Guide. Invent Setup Guide

MARKET RESPONSIVE PRESTASHOP THEME USER GUIDE

PHP WITH ANGULAR CURRICULUM. What you will Be Able to Achieve During This Course

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder.

Sitecore Experience Accelerator 1.3 Rev: September 13, Sitecore Experience Accelerator 1.3

Bluehost and WordPress

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

JSN Moviebox Customization Manual Before We Start

Front-End UI: Bootstrap

More about HTML. Digging in a little deeper

Theme System. Wisej Themes 1 OVERVIEW

AGENDA. HTML CODING YOUR HOMEPAGE [ Part IV ] :: NAVIGATION <nav> :: CSS CODING FOR HOMEPAGE [ <nav> & child elements ] CLASS :: 13.

Web Designing. Course Content. Basic HTML Tags. Getting started with CSS. Dealing with Images

LUXE READYTHEME CUSTOMIZATION

DRESSSHOP RESPONSIVE PRESTASHOP THEME USER GUIDE

CORE PHP CURRICULUM. Introductory Session Web Architecture Overview of PHP Platform Origins of PHP in the open source community

FEWD START SCREENCAST!!!!

Chapter 11 Formatting a Long Document

IN4MATX 133: User Interface Software

Website Functionality

DIVINO READYTHEME CUSTOMIZATION

Digging Into WordPress. Chapter 4: Theme Design And Development Part 1 ( )

Interview Question & Answers

Google Sites Training

Color Swatches Pro. Magento Extension User Guide. Official extension page: Color Swatches Pro. User Guide: Color Swatches Pro

COMSC-031 Web Site Development- Part 2

GRAPHIC WEB DESIGNER PROGRAM

Adobe Dreamweaver CS6 Digital Classroom

Documentation:Travel Company Pro WordPress Theme

Administrative Training Mura CMS Version 5.6

MPT Web Design. Week 1: Introduction to HTML and Web Design

Word 2016: Using Section Breaks

Xerte. Guide to making responsive webpages with Bootstrap

DOCUMENTATION. Lotos WordPress Theme

Tutorial 4: Creating Special Effects with CSS

Index. Bootstrap framework ASP.NET MVC project set-up, default template, 223

CS7026 Media Queries II. Different Screen Size Different Design

FROM CSS TO SASS IN WORDPRESS. James Steinbach WP Summit #wpsummit.

A Guide to Using WordPress + RAVEN5. v 1.4 Updated May 25, 2018

Bonus Lesson: Working with Code

Cascading Style Sheets Level 2

CSS. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/43

Lecture 13. Page Layout. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar. Hover Effect:

MEGA MENU USER GUIDE. Phone: Extension version: 1.0 Magento Compatibility: CE 2.

Creating Effective School and PTA Websites. Sam Farnsworth Utah PTA Technology Specialist

Dreamweaver CS5 Lab 4: Sprys

Publications Office Web Guide

APEX Developers Do More With Less!! How do YOU manage your APEX CSS? Storage Options 1. Web server 2. APEX repository 3. In line 4.

Transcription:

smacss your up

@minamarkham

I need two demo sites And I need them in two days

CSS is easy.

hard CSS is easy.

CSS is bullshit.

Modular CSS

Focusing on creating healthy front-end modules instead of complete pages can help break complex page layouts into reusable solutions. - Dave Rupert

small pieces independent portable

Navigation, Tabs, Tables, Accordions, Lists, Dropdowns Pagination, Buttons, Labels, Inputs, Breadcrumbs, etc.

Tiny Bootstraps

Module, Pattern, Component, etc.

MVCSS, BEM, OOCSS, Suit, intuit.css

SMACSS

Scalable & Modular Architecture for CSS

Framework

categorization naming conventions depth of applicability

Categorization

base layout modules states themes

Base CSS resets, default styles (ex. html, body, h1, ul, etc)

Layout grid, major components ex. header, sidebar, nav

header content footer

header sidebar main content

Modules content patterns (ex. search-box, navigation, content-box)

navigation hero promo promo promo promo footer-text link-list

States module in various states

Themes module in various contexts

jessicahische.is

Naming Conventions

Base h1, h2, p, a, etc.

Layout.layout-*,.l-*

Module.<name>

Module.button

Sub-module.<name>-<state>

Sub-module.button-secondary

State.is-*

Theme.theme-*

Theme.theme-*

Depth of Applicability

header#top-menu > nav > ul > li a + div > ul > li > ul li:hover > a { }

10 generations!

,,, Specificity = 0,1,1,11 http://specificity.keegan.st/

header#top-menu > nav > ul > li a + div > ul > li > ul li:hover > a { }

header#top-menu > nav > ul > li a + div > ul > li > ul li:hover > a { }

.nav-subitem

,,, Specificity = 0,0,1,0 http://specificity.keegan.st/

.nav-subitem > a

,,, Specificity = 0,0,1,1 http://specificity.keegan.st/

child selectors class selectors naming conventions

Recap

categorize css rules meaningful names shallow selectors

add some

not SASS

Namespacing

the almighty ampersand

.btn { } &:hover { }

.btn:hover { }

.btn { } form & { }

form.btn { }

&- or &_

.btn { &-secondary { } &_secondary { } }

.btn-secondary { }.btn_secondary { }

nesting

inception rule

< 3 levels deep

.btn { &-secondary { &-icon { } } }

.btn-secondary { }.btn-secondary-icon { }

.btn { }.btn-large { }! <div class= btn btn-large >

@extend all the things!

.btn { }.btn-large {@extend.btn;}! <div class= btn-large >

%btn { }.btn-large {@extend %btn;}! <div class= btn-large >

don t @extend between modules

File Structure

@import

01. Utilities utilities/_index.scss @import 'global'; @import 'functions'; @import 'mixins'; @import 'helpers'; Variables, mixins, functions, etc. Basically anything that doesn t output CSS by itself.

01. Utilities 02. Libraries utilities/_lib.scss @import "lib/susy"; @import "lib/font- awesome"; @import "lib/pesticide"; Third-party libraries such as Susy, Font Awesome, Pesticide, and other plugins.

01. Utilities 02. Libraries 03. Base base/_index.scss @import normalize'; @import 'base'; CSS resets, Normalize, element styles

01. Utilities 02. Libraries 03. Base 04. Layout layout/_index.scss @import 'global'; @import 'functions'; @import 'mixins'; @import 'helpers'; Grid styles, major layout components (e.g. header, footer, sidebar, etc)

01. Utilities 02. Libraries 03. Base 04. Layout 05. Modules modules/_index.scss @import 'btn'; @import 'table'; @import 'nav'; Individual modules, such as buttons, navigation, menus, etc.

01. Utilities 02. Libraries 03. Base 04. Layout 05. Modules 06. States states/_index.scss @import 'states'; @import 'touch'; Describe states of being, ex: active, collapsed or hidden

01. Utilities 02. Libraries 03. Base 04. Layout 05. Modules 06. States 07. @font- face utilities/_fonts.scss Web fonts imports & declarations

01. Utilities 02. Libraries 03. Base 04. Layout 05. Modules 06. States 07. @font- face 08. Print states/_print.scss Print styles

!important

shame.css

_shame.scss

01. Utilities 02. Libraries 03. Base 04. Layout 05. Modules 06. States 07. @font- face 08. Print 09. Shame _shame.scss because hacks happen

small and readable

mina.so/sassystarter

Theming

@mixin theme($name) { @if $theme == $name { @content; } }

$theme: rebeccapurple

@include theme($rebeccapurple)

refactor all the things!

refactor all the things?

Baby steps

extract components create variables apply naming conventions nest and @extend

mina.so/smacss-menu

Before: 161 lines After: 97 lines

Recap

namespace with ampersands & @extends break modules into partials refactor in chunks

Resources

smacss.com

sass-lang.com

sassmeister.com

mina.so/smacss thanks! @minamarkham