+ All Categories
Home > Documents > Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is...

Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is...

Date post: 26-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
13
Chapter 17
Transcript
Page 1: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Chapter 17

Page 2: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

CSS comment is simply a note contained within two sets of characters, /* and */

Comment code that isn’t obvious

Add info helpful to other coders

Page 3: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Style names must begin with letter, can’t contain illegal characters (&, *, |, etc.)

Name by PURPOSE, not appearance or location

Avoid cryptic names like .s

Page 4: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Style with multiple classes to save time

Page 5: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

LESS - http://lesscss.org/

SASS - http://sass-lang.com/

Allows variables

Preprocessor adds vendor prefixes

Combines style sheets and minifies to improve download time

Can be confusing, so use Scout or Compass to convert

http://mhs.github.io/scout-app/

http://compass.kkbox.com/

Page 6: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Group styles

Parts of page (e.g. main content styles in one group, navigation in another)

Purpose (e.g. Typography in one group, layout in another group)

Use comments to distinguish groups

Use flags to aid searching –http://stopdesign.com/archive/2005/05/03/css-tip-flags.html

Page 7: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Link to main style sheet, then import others organized by function

NOTE: remember import is buggy in IE - see http://reference.sitepoint.com/css/at-import

Page 8: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

“zero out” formatting

Padding & margins

Font sizes

Display html5 elements as blocks

Line height

Table borders and cells

Remove borders from linked images

List indents and bullets

Remove quote marks from q tag

See reset.css in tutorials/17 folder or see http://nicolasgallagher.com/about-normalize-css/

Page 9: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Compartmentalize your pages

Page 10: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t
Page 11: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Class each body by page<body class="home">

Class each link in nav bar<a href="/index.html“ class="homeLink">Home</a>.

Create a descendent selector to format each section’s link differently when the link is inside a page for that section.

Page 12: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t
Page 13: Tables and Forms - cuyahacka.comcuyahacka.com/213/presentations/CSS3ch17.pdf · CSS comment is simply a note contained within two sets of characters, /* and */ Comment code that isn’t

Recommended