Crazy New CSS Tools MIS 424 MIS 424 Professor Sandvig Professor Sandvig
Outline Overview of new CSS tools Responsive Frameworks Responsive Frameworks CSS preprocessors CSS preprocessors Minification Minification Bundling Bundling Implementing in.NET Master Pages Master Pages Visual Web Essentials Visual Web Essentials
Motivation for CSS tools Three primary drivers: 1. Mobile 2. Mobile 3. Mobile Multitude of screen size & devices Difficult to design and test
Responsive Frameworks Display well on all devices
Responsive Frameworks Page divided rows & columns Each row has 9-16 columns Determine width by selecting number of columns Example: Three column layout Three column layout Twitter Boostrap Twitter Boostrap
Responsive Frameworks Bootstrap: each row must add to 12 columns Header Header Left column Left column Content Content Right Right Output
Responsive Frameworks Dozens available Similar conceptually Some include more features: Bootstrap customization options Bootstrap customization optionscustomization Limitations: Utilize media queries (browser support) Utilize media queries (browser support)browser supportbrowser support CSS files can be large CSS files can be large
CSS Preprocessers Add programming features to HTML5 Reusability Reusability Structure Structure Languages: LESS, Sass, Stylus LESS, Sass, Stylus Useful with complex CSS Bootstrap built with LESS Bootstrap built with LESS
Minification Removes extra characters from.css &.js files Line breaks Line breaks Comments Comments White space White space Benefit Reduces download times Reduces download times Downside Not human readable Not human readable
Bundling Bundle multiple.css &.js files into one file Benefit: reduced download time
Implementing in.NET Responsive Frameworks Master pages Master pages Easy to convert existing site Easy to convert existing site Tree Tour example 2 column fluid layout 2 column fluid layout Customize layout for specific pages Customize layout for specific pages
Web Essentials Free Visual Studio extension Supports: CSS preprocessers CSS preprocessers Minification Minification Bundling Bundling Many other handy features Many other handy features
Web Essentials Minification & bundling Bundling combines & minifies files Bundling combines & minifies files
Web Essentials CSS Preprocessing Less preview screen & automatic compilation
Web Essentials Color picker in.css
Web Essentials Image browsing
Web Essentials Image viewer
Web Essentials Embed images into.css file
Web Essentials CSS browser support
Web Essentials Syntax error highlighting
Summary Mobile devices challenging New tools: Responsive Frameworks Responsive Frameworks CSS Preprocessors CSS Preprocessors Minification & bundling Minification & bundling ASP.NET MasterPages simplifies implementation MasterPages simplifies implementation Web Essentials Web Essentials