HAML/SASS and tenplate building clean semantic sites for less.

Slides:



Advertisements
Similar presentations
Tables Feb. 14, Tables Great way to organize and display information Laid out in columns and rows Think of an excel spreadsheet Defined with tag.
Advertisements

© 2007 Triune Group Insight. Strategy. Performance. Cascading Style Sheets (CSS) An Introduction Chris Poteet.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties-- List properties –Table properties-- Classification properties.
LIS650 lecture 4 Thomas Krichel today CSS Properties –Box properties-- List properties –Table properties-- Classification properties –(Audio.
LIS650 lecture 4 Thomas Krichel today Advice CSS Properties –Box properties –List properties –Classification properties Fun with selectors.
Copenhagen, 6 December 2004 Modern CSS Principles Miruna Bădescu Finsiel Romania.
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
CSS Cascading Style Sheets. What is CSS? CSS stands for Cascading Style Sheets (the page—or sheet—helps you create a style that will cascade across all.
J ENWARE Chapters 14 & 15 Learning Web Design, Fourth Edition by Jennifer Niederst Robbins Copyright © 2012.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Cascading Style Sheets
Cascading Style Sheets
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Standards XHTML and CSS. Today’s Show ► Discuss web standards ► XHTML ► Layout Without Tables ► CSS ► Why Web Standards?
Introduction to CSS.
Very quick intro HTML and CSS. Sample html A Web Title.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
INTRODUCTORY Tutorial 7 Creating Liquid Layouts. XP Objectives Discern the differences among various types of layouts Create a liquid layout Create a.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Theming with the Theme Roller Iain Ure. Theme roller General theming options The theme roller Demonstration Examples Exercise.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
CSS(Cascading Style Sheets )
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
ADVANCED CSS William Neely CEO, Piecewise.com. CSS FONTS AND TEXT CSS ‣ Line-height allows to indicate the amount of space between lines; allows for equal.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
Tutorial #8 – Creating Data Tables. Tutorial #6 Review – Layouts Two Column Fixed Width, Three Column Fixed Width Class VS. ID Container Universal Selector.
Multimedia & The World Wide Web winny HCI 201 Multimedia and the www.
Web standards pragmatism Patrick H. Lauke / Web Developers Conference / 12 November 2008 FROM VALIDATION TO THE REAL WORLD.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
WRT235: Writing in Electronic Environments CSS Classes, IDs, divs.
10/4/2015Tables1 Spring, 2008 Modified by Linda Kenney 4/2/08.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Essentials of HTML Class 4 Instructor: Jeanne Hart
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
XHTML and CSS. The Browser The browser is not print!
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
CSS BEST PRACTICES.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
HTML with Style!. What is a Style Sheet? CSS? Style Sheet CSSCascading Style Sheets A “language” for defining style rules. Rules that tell the browser.
CS3220 Web and Internet Programming CSS Basics
Concepts for fluid layout
Creating a Baseline Grid
Web Development & Design Foundations with HTML5 8th Edition
Cascading Style Sheets
CSS BEST PRACTICES.
Fixed Positioning.
Software Engineering for Internet Applications
Web Development & Design Foundations with H T M L 5
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
Concepts for fluid layout
Cascading Style Sheets III B. Com (Paper - VI) & III B
Cascading Style Sheets™ (CSS)
Presentation transcript:

HAML/SASS and tenplate building clean semantic sites for less.

The players. POSH Typographical Baseline Grid Layout Grid HAML/SASS tenplate

POSH POSH encapsulates the best practices of using semantic HTML to author web pages.semantic HTML isn't there a tag for that? semantic classes and id's no images for presentation

Before (markup w/ out posh) This is my headline this is a sub header this is a paragraph of content, it contains some bold text and some colored text. c this is a second paragraph

POSH (ahh, isn't that better) This is my headline this is a sub header this is a paragraph of content, it contains some bold text and some colored text. this is a second paragraph

POSH Check List The first rule of POSH is that you must validate your POSH.validate Second, drop the use of TABLEs for purely presentational purposes, spacer GIFs, and presentational-html in general.presentational-html Next, fix your Bed and BReakfast markup.Bed and BReakfast Eliminate Anorexic Anchors.Anorexic Anchors Use good semantic-class-names.semantic-class-names

Grids The grid system is an aid, not a guarantee. It permits a number of possible uses and each designer can look for a solution appropriate to his personal style. But one must learn how to use the grid; it is an art that requires practice. Josef Müller-Brockmann

Typographical Grid One of the things that separates good design from average design is baselines that line up. Web designers/developers have generally disregarded the baseline grid even though the necessary tools have been available for some time now.

A comparison of a page with arbitrary values with one that has considered vertical rhythm.

Em's Em's provide a relative alternative to px/pt, making your website scale gracefully to different font settings across browsers. By setting the pages overall font-size value to 62.5% in the body rule, text can be sized in ems using a value a tenth of the target pixel size. In other words, 1.0em equates to 10px, and 2.4em equates to 24px. Baseline grid is calculated by dividing the line-height by the font-size.

Layout Grids Grids are a template, a framework within which creativity can flourish. Too many designers spend time looking at a blank canvas, trying to figure out where elements should be positioned, but, if you have a flexible underlying grid, many such problems are already solved for you. It becomes obvious where and how elements should and can be positioned, thereby leaving you, the designer, with more time to work on graphic design and other page components. Instead of arbitrarily picking column sizes, grids enable you to create a common visual language throughout an entire Web site, rather than deciding things on a page-by-page basis. Components relate to each other, which makes it easier for users to scan content and develop familiarity with it.

Layout Grid

HAML Haml is the next step in generating views in your Rails application. Haml makes poorly nested markup a thing of the past. Your views are cleaner and look beautiful with haml. It's faster that erb's. What are you waiting for. Whitespace matters

Our old POSH This is my headline this is a sub header this is a paragraph of content, it contains some bold text and some colored text. this is a second paragraph

Now in HAML %h1 This is my headline %h2 this is a sub header %p this is a paragraph of content, it contains some %em bold text and some %span.highlight colored text. %p this is a second paragraph

ERB Welcome to our site! "sidebar" %>

HAML #content.left.column %h2 Welcome to our site! %p= print_information.right.column= render :partial => "sidebar"

SASS (syntactically awesome stylesheets) SASS is put quite simply an alternative way to write css. But in reality it is so much more. SASS provides: tabulation nested selectors constants mixins basic operations

CSS #main { width: 90%; } #main p { border-style: solid; border-width: 1px; border-color: #00f; } #main p a { text-decoration: none; font-weight: bold; } #main p a:hover { text-decoration: underline; }

SASS #main :width 90% p :border-style solid :border-width 1px :border-color #00f a :text-decoration none :font-weight bold a:hover :text-decoration underline

Plus Constants !my_constant = # Basic operations !my_highlight = !my_constant+# Mixins =clearfix display: inline-block &:after content: "." display: block height: 0 clear: both visibility: hidden * html & height: 1px

tenplate variable typograpical grid variable layout grid forms POSH layout microformats - coming soon

Typographical grid !font_size = 1.4 h1 :font-size= !font_size+.6+"em" :margin= (!line_height/!font_size)+"em"

Layout grid Leverage mixins !width = 960 !grid_width = 960/10 =column_calc(!col_size)

Resources/Thanks Microformats.org Opera Developers blog. baseline-grid/ HAML/SASS Obtiva Tom Kersten