Other Features

Columns

column-count: 1;      
column-width: 10em;   
column-rule: 1px solid #bbb;
column-gap: 2em;      

Adipisicing rump nostrud exercitation turkey, bresaola deserunt ullamco beef ribs pork loin ball tip pig pork belly nisi. Cillum sunt officia deserunt, beef aliqua ham ut t-bone sed ut consequat shoulder. Nostrud excepteur biltong non, fatback salami incididunt beef cupidatat occaecat.

Reprehenderit ham hock labore tri-tip chuck, excepteur ut. Meatball sint enim beef ribs, mollit laborum flank commodo fatback pariatur tail rump eiusmod spare ribs dolore. Ut minim qui, tongue eu short ribs pancetta excepteur incididunt culpa consequat pastrami magna chuck. Flank sunt sint, occaecat ut adipisicing labore turkey laboris in magna.

Chicken bacon meatloaf minim meatball salami sunt spare ribs.

Bacon sed tail, pork loin pariatur meatloaf hamburger exercitation corned beef shank ex esse sirloin qui beef ribs. Consectetur anim corned beef, cupidatat ex enim tempor. Pariatur consectetur ad, enim ut quis consequat aliquip exercitation jowl tenderloin ham dolore.

Fugiat excepteur aliqua, cow dolor swine shoulder elit tri-tip shankle. Irure consectetur cow labore, cupidatat exercitation ea jerky ham officia dolore tongue eu aliqua. Ham hock irure beef ribs non, flank sausage eiusmod ham short loin nostrud.

  • Chrome
  • Safari 3.1
  • Firefox 2
  • Opera 11
  • IE 10
  • -webkit- and -moz-required

box-sizing

box-sizing: content-box | border-box
content-box
border-box
div {
width: 200px; 
height:100px; 
padding: 20px;
margin:20px;
border-width: 5px;
}
border-box
  • -webkit- Safari 5 and older
  • -moz- for all Firefox versions
  • Chrome
  • Safari 3.1/5.1
  • Firefox 2/8
  • Opera 9.5
  • IE 8

border-box replicates the old IE box model

Flexible Box Model

Used to position horizontal and vertical stacks.

.box {
  display: box;
  box-orient:;
}
.box .one, .box .two {
  box-flex: 1;
}
.box .three {
  box-flex: 3;
}
  • Chrome
  • Safari 3.1
  • Firefox 2
  • Opera 12
  • IE 10
  • -webkit-, -moz-, -ms- required
Box one
Box two
Box three

Flexible Box Model

.box {
  display: box;
  box-pack: ;
  box-align: ;
}

Old FlexBox Properties

display: box ;
box-orient:  horizontal | vertical | inherit;
      
box-pack: start | end | center | justify;

box-align: start | end | center | baseline | stretch;

box-flex: integer | 0;

box-flex-group

box-ordinal-group

box-direction: normal | reverse | inherit;

box-lines:

New FlexBox Properties

display: flexbox | inline-flexbox;
flex-direction: lr | rl | tb | bt | inline | 
    inline-reverse | block | block-reverse

flex-order: integer | 1;
      
flex-pack: start | end | center | justify;

flex-align: auto | baseline;
  • Chrome 15
  • Safari 5.1
  • Firefox 7
  • Opera 12
  • IE 10

W3C specs

The spec syntax changed drastically. Browsers are curently changing..

grid layout

Using grid system to lay out content, dividing available space into columns and rows

grid-columns:
grid-rows:
grid-column:
grid-row:
grid-cell:
grid-cell-stacking:
grid-template:
grid-column-span:
grid-row-span:
grid-column-sizing:
grid-row-sizing:
grig-flow:
grid-column-align:
grid-row-align:
grid-layer:

W3C Specifications

display: grid | inline-grid 
  • Chrome
  • Safari 3.1
  • Firefox 2
  • Opera 12
  • IE 10
  • -ms- required

Cursors

  • crosshair
  • default
  • help
  • move
  • e-resize
  • ne-resize
  • nw-resize
  • n-resize
  • se-resize
  • sw-resize
  • s-resize
  • w-resize
  • text
  • wait
  • progress
  • none
  • context-menu
  • cell
  • vertical-text
  • alias
  • copy
  • no-drop
  • not-allowed
  • col-resize
  • row-resize
  • all-scroll
  • zoom-in
  • zoom-out

text-overflow: ellipsis

p {
  text-overflow: ellipsis; 
  white-space: nowrap;
  overflow: hidden;
}

overflow-hidden only: Play with the slider to see what happens at the end of the line

white-space: nowrap, overflow: hidden: Play with the slider to see what happens at the end of the line

text-overflow: ellipsis; white-space: nowrap; and overflow: hidden: Play with the slider to see what happens at the end of the line

Needs nowrap and overflow:hidden (anything other than visible) to work. Prefix in Opera

  • Chrome
  • Safari
  • Firefox 7
  • Opera 11
  • IE 6

word-wrap: breakword

word-wrap:  normal | break-word
Despite the old adage, smiles is not longer than supercalifragilisticexpialidocious.
  • Chrome 1
  • Safari 1
  • Firefox 3.5
  • Opera 10.5
  • IE 5.5

calc()

  • Chrome
  • Safari
  • Firefox 4
  • Opera 11
  • IE 9
.colA {
  width:50%;
  margin-right: 1em;
}
.colB {
  width: -moz-calc(50% - 1em);
}
  • +, -, *, /, mod, min, and max operators.
  • Vendor prefixed in Firefox, not in MS
  • Not yet ready for production
  • Intro to calc()

rem

html { 
    font-size: 62.5%; 
} 
p { 
    font-size: 13px; 
    font-size: 1.3rem; 
} 
small { 
    font-size: 11px; 
    font-size: 1.1rem; 
}
  • Chrome 6
  • Safari 5
  • Firefox 3.6
  • Opera 11.6
  • IE 9

Masking

    • complex shapes based off alpha of an image.
    • Overlay box with pattern
    • knock out portions of box in final display.
    div {
      background-image:url(images/frame.jpg);
      -webkit-mask: url(images/framemask.png); 
    }
    • -webkit-mask (SHORTHAND)
    • -webkit-mask-attachment (background-attachment)
    • -webkit-mask-clip (background-clip)
    • -webkit-mask-origin (background-origin)
    • -webkit-mask-image (background-image)
    • -webkit-mask-repeat (background-repeat)
    • -webkit-mask-composite (background-composite)
    • -webkit-mask-box-image (border-image)

pointer-events: none;

Can the element be clicked?!?!

.animatedElement {
  pointer-events: none;
}

Did you note that you could change the transforms examples even when the example was covering the code?


  • Chrome

  • Safari

  • Firefox
  • Opera
    SVG only
  • IE
    SVG Only

-webkit-user-modify

Related to contentEditable: Determines whether content of an element is editable.

-webkit-user-modify: read-only | read-write | read-write-plaintext-only;
-moz-user-modify: read-only | read-write | write-only;
read-only
The content is read-only.
read-write
The content can be read and written.
write-only (moz only)
The user is able to edit the content, but not to read it.
read-write-plaintext-only (webkit)
The content can be read and written, but any rich formatting of pasted text is lost.

We're done with CSS for today!

Home ➹