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

Similar documents
CREATE SASSY WEB PARTS. Developer Guide to SASS usage in SPFx

Frontend UI Training. Whats App :

Introduction to Using NPM scripts as a Build Tool. 1. 1

Webpack. What is Webpack? APPENDIX A. n n n

55249: Developing with the SharePoint Framework Duration: 05 days

Making Sling Grunt Or How to Integrate Modern Front-End Development with Sling. Philip Hornig (Publicis Pixelpark), Michael Sunaric (Netcentric)

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

The Why And How of Front-End Architecture. Feel the rhythm, feel the rhyme, get on up, it s front-end time

"Charting the Course... MOC A: Developing with the SharePoint Framework. Course Summary

Web Development for Dinosaurs An Introduction to Modern Web Development

THE GREAT CONSOLIDATION: ENTERTAINMENT WEEKLY MIGRATION CASE STUDY JON PECK, MATT GRILL, PRESTON SO

Drupal 8 / Theming Quickstart

Index. B Background properties, 101 background-attachment property, 114 background-clip property, 113 background-color property, 101

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress"

August, HPE Propel Microservices & Jumpstart

Angular 2 Programming

Better tools for content editors. Petr ILLEK Morpht

Webpack 2 The last bundler you would need in Vijay Dharap, Principal Architect, Infosys

Brunch Documentation. Release Brunch team

CSS Preprocessing: Tools and Automation Techniques

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

COMPONENT DRIVEN DESIGN AND DEVELOPMENT. Cristina Chumillas

Overview of BC Learning Network SMS2 Introduction

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

Index. Elad Elrom 2016 E. Elrom, Pro MEAN Stack Development, DOI /

DrupalCon Barcelona Preston So September 22, 2015

Deep Dive on How ArcGIS API for JavaScript Widgets Were Built

Learn Web Development CodersTrust Polska course outline. Hello CodersTrust! Unit 1. HTML Structuring the Web Prerequisites Learning pathway.

Stencil: The Time for Vanilla Web Components has Arrived

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Client-side Debugging. Gary Bettencourt

Web Performance in

Client Side MVC with Backbone & Rails. Tom

Full Stack Web Developer

"Charting the Course... Comprehensive Angular. Course Summary

Front End Summit - Sep 27th

ANGULAR 2.X,4.X + TYPESRCIPT by Sindhu

APACHE SLING & FRIENDS TECH MEETUP SEPTEMBER Integrating a Modern Frontend Setup with AEM Natalia Venditto, Netcentric

Index. Bower, 133, 352 bower.json file, 376 Bundling files, 157

Comprehensive AngularJS Programming (5 Days)

CHAPTER 1: GETTING STARTED WITH ASP.NET 4 1

WebStorm, intelligent IDE for JavaScript development

// European formatting (custom symbol and separators), can also use options object as second parameter:

JavaScript and MVC Frameworks FRONT-END ENGINEERING

This tutorial has been prepared for beginners to help them understand the basic functionalities of Gulp.

Welcome. Quick Introductions

Webform: THERE IS THIS FOR THAT

Course 1: Microsoft Professional Orientation: Front-End Web Developer

Liferay Architecture

Your essential APEX companion. Marko apexbyg.blogspot.com

1 Woocommerce Products Designer

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

OddsMatrix. Everything is possible. SASS Code Standards

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

JSN UniForm User Manual. Introduction. A simple contact form created by JSN UniForm. JSN UniForm is a Joomla form extension which helps you create

Learn Gulp. Jonathan Birkholz. This book is for sale at This version was published on

Oracle JavaScript Extension Toolkit (JET)

Writing Modular Stylesheets With CSS Modules.

Oracle JavaScript Extension Toolkit (JET) Developing Applications with Oracle JET 3.2.0

PIMCORE TRAINING GUIDE

Webform: THERE IS THIS FOR THAT

Pragmatic Guide to Sass

IBM Forms V8.0 Custom Themes IBM Corporation

J, K, L. Node.js require() method, 403 package.json, 401 streams functionality, 401 task() method, 401 use strict statement, 403

Presented by. Dheepa Iyer Managing Consultant. Commissioned for. Reston SharePoint User Group. SharePoint Framework. May 2017

USER MANUAL TABLE OF CONTENTS. Easy Site Maintenance. Version: 1.0.4

COURSE OUTLINE MOC 20488: DEVELOPING MICROSOFT SHAREPOINT SERVER 2013 CORE SOLUTIONS

WORLDSKILLS STANDARD SPECIFICATION

Simple AngularJS thanks to Best Practices

Helpline No WhatsApp No.:

US: UK: +44 (0) AU: 1 (800) SG:

Serverless Microservices Are The New Black. Lorna Mitchell, IBM

Styling React and. Ways to Style and Best Practices In. Component Based Systems

Theme System. Wisej Themes 1 OVERVIEW

Love Your Load Times. Trim seconds off page loads, secure private files and make the most of your digital assets

Oracle JavaScript Extension Toolkit (JET) Developing Applications with Oracle JET 4.2.0

Oracle JavaScript Extension Toolkit (JET) Developing Applications with Oracle JET 5.0.0

Arjen de Blok. Senior Technical Consultant bij ICT Groep ( sinds 1995 Programmeren sinds 1990 Technologiën. Links

Blue Form Builder extension for Magento 2

GO! with Microsoft Access 2016 Comprehensive

Introduction to PHP. Handling Html Form With Php. Decisions and loop. Function. String. Array

Developing ASP.NET MVC Web Applications (486)

Building Your own Widget with ArcGIS API for JavaScript

EXPLORE MODERN RESPONSIVE WEB DESIGN TECHNIQUES

Build & Launch Tools (BLT) Automating best practices for enterprise sites

Oracle JavaScript Extension Toolkit (JET) Developing Applications with Oracle JET 4.1.0

Introduction to Sencha Ext JS

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

Full Stack Web Developer

ORACLE WCM 11G MASTER CLASS

Adobe Dreamweaver CS6 Digital Classroom

Getting MEAN. with Mongo, Express, Angular, and Node SIMON HOLMES MANNING SHELTER ISLAND

INDEX COPYRIGHTED MATERIAL

Documentation And Collaborating With Developers

Full Stack boot camp

Front End. Presentation Layer. UI (User Interface) User <==> Data access layer

Tuesday, January 13, Backend III: Node.js with Databases

Dreamweaver Domain 5: Organizing Content by Using Dreamweaver CS5

JEFFREY BADAJOS TURINGAN Online Portfolio: jeffreyturingan.com Contact Number:

IN PRACTICE. Daniele Bochicchio Stefano Mostarda Marco De Sanctis. Includes 106 practical techniques MANNING

Transcription:

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

Key TakeAways PostCSS - Deep Dive plugins you can use custom plugins Workflow Essential Concepts Plugins to help with tasks Drupal Theme Starter Template

Introduction Essential Advanced

Introduction what - why - how What is it? Microservice Architecture Single Responsibility Principle Installation Gulp Script

Philosopher s Stone

Alchemy

What is PostCSS? Transformer! A Workflow Tool - (post/pre)processor Language Extender CSS Wayback/Time Machine

architecture Collection of API & Micro Services

Architecture

What does PostCSS do? Parses CSS Creates Node Tree Provides APIs for processors Pipes between processors

Plugin Design Principle Single Responsibility Principle Do one thing and do well Node Modules Written in JS

200+ You have a plugin for that! PostCSS.parts

Why roll yours in PostCSS? Choice - freedom to choose Usage - tailor to your workflow Modular/ lightweight hence faster

Limitations of pre-processors @extend across media queries Automatically fix errors Feature Requests and how it is handled

Installation and First Task

Required Tools Node.js NPM - Dependency Management System Gulp/Grunt - The task runner

Workflow Anatomy

Install Node Installation

Gulp Task

Essential PostCSS Build custom workflow Requirements of a Workflow? Autoprefixer Linting futurecss Quantity Queries Container Queries CSS Modules Packs

Workflow Goals ENVIRONMENT Mechanical Rules Enforcement Debug Linting Easy SetUp CODE HELPERS Future Proofing Fallback Support Language Extensions Shortcuts Utilities

Toolchain ENVIRONMENT Mechanical Rules Enforcement - stylelint Debug - sourcemaps Linting - stylelint Easy SetUp - npm I/O - import/cssnano CODE HELPERS Fallback Support - oldie Future Proofing - cssnext Language Extensions precss Shortcuts - short Utilities - lot

ENVIRONMENT

Importer - postcss-import Before PostCSS - CSS

Linters - Stylelint StyleLint Mechanical Rules Enforcement Over 100 Rules Choose the ones you want

Linters - Stylelint

Packers cssnano Does minify and some errors. postcss-css-mqpacker Concats all styles of same media query. postcss-cachebuster Busts assets cache using url params. postcss-data-packer embedded base64 to separate file.

Source Maps

Style Guides postcss-style-guide, psg-theme-default Provides KSS Style Living Guides Uses Annotation to generate HTML

Style Guides

CODE HELPERS Future CSS

Future CSS postcss-custom-media postcss-custom-properties postcss-extend postcss-initial postcss-media-minmax cq-prolyfill

PostCSS Extend example from plugin page

cq-prolyfill Container Queries

Quantity Queries postcss-quantity-queries :at-least(count) :at-most(count) :between(start,end) :exactly(count)

CSS Modules postcss-initial {all:initial}

CODE HELPERS Language Extenders

Pre/post compiler PRE COMPILER write code in scss/less/stylus, gets converted into css. precss POST COMPILER write CSS Code, gets converted into CSS. cssnext

Pre/post compiler PRE COMPILER POST COMPILER mixins needs to be learned, their APIs provides sass like mixins, functions etc. plain CSS, which is parsed by Autoprefixers uses W3C css Variables

CODE HELPERS Utility Plugins

autoprefixer pxtorem postcss-sorting perfectionist postcss-font-pack postcss-fontpath Utility Plugins

Utility Plugins - AutoPrefixer refers caniuse.com to generate does not generate for border-radius etc http://autoprefixer.github.io/

Utility Plugins - pxtorem

Packs Curated plugins Takes care of interplay Does heavy lifting

Packs cssnano - packer, optimizer for production rucksack - new features and shortcuts short - shorthand properties precss - language extender cssnext - language extender (W3C) https://github.com/timaschew/postcsscompare-packs

Advanced Beyond the Basics Write your own plugin CSS Architecture BEM / SMACSS Organization Putting it all together

PostCSS Boilerplate postcss-plugin-boilerplate Wizard to help creation Clean git history Write index.js and test.js Document

Examine a plugin

Anatomy of a Plugin this is postcss-currency plugin

CSS Architecture

Architecture Challenges Abstraction Maintainability Change Management Debugging Documentation

SMACSS Categorizing / Organizing CSS Rules Base - base level CSS Layout - layout based classes (l-) Module - reusable modules State - state of an item is-active Theme - related to colors Reduced dependency on structure Thinking in Components

Block Element Modifier Rules to Name selectors

Theming Process Component Inventory - ppt Component Library - code Layout Pages Composition of Components Oddball Components Context based alignment/changes

End To End Workflow CLASSY THEME Configure with postcss Folder Structures Plugins Code Organization Debugging - source maps Linting

DEMO & CODE WALKTHROUGH

Summary What is PostCSS Architecture Why PostCSS How To start coding in PostCSS Workflow Goals PostCSS Tools that support Useful Plugins Write Plugin SMACSS/BEM All together

Appendix - UseFul Links PostCSS Page Plugins List PostCSS.parts cssnext precss compare css packs BEM SMACSS