The document discusses emerging CSS3 features such as variables, conditionals, selectors, filters, regions, grid layout, and flexbox. It provides examples and code snippets for many of these features. However, it notes that some features like variables and conditionals are not yet available. It encourages developers to only use features that solve real problems, mind vendor prefixes, check support, and take progressive enhancement and graceful degradation into account when using emerging CSS3 features.
1 of 48
Download to read offline
More Related Content
Future is now
1. The future is now
by @karolinaszczur
Web 5 conference, B辿ziers, France
2. Whos that girl?
Front-end dev and designer with 7
years of experience. Earlier worked
at AdTaily and Applicake. Currently
@XHTMLized.
karolinaszczur
3. 1. Long live CSS3
2. Back to the future
variables, conditionals, selectors, filters, paged media
exclusions, regions, grid layout, flexbox
3. Considerations
4. Borders
Enabling multiple shadows with inset, radius and border
image handling.
.box {
box-shadow: 5px 5px 10px rgb(255, 255, 255),
1px 0 1px rgba(0, 0, 0, .2) inset;
border-radius: 20px;
}
for border-image check: http://www.norabrowndesign.com/css-experiments/border-image-anim.html and http://css-tricks.com/understanding-border-image/
5. Color modes
HSL, HSLA, CMYK, RGBA
hue hue cyan red
saturation saturation magenta green
lightness lightness yellow black
alpha black alpha
http://www.flickr.com/photos/foxtwo/2540952589/
6. Backgrounds
Multiple images, determining the background position
relatively, expansion ratios.
.box {
background-image: url(/slideshow/future-is-now/images/bg_one.jpg), url(/slideshow/future-is-now/images/_ bg_two);
background-position: center top, left bottom;
background-origin: content-box;
background-clip: padding-box;
}
7. Text
Shadows, overflow and wrapping.
.box p {
text-shadow: 0 2px 3px rgba(0, 0, 0, .3);
text-overflow: ellipsis;
word-wrap: break-word;
}
11. Transitions
Smooth animations on property change
a, a:visited {
text-decoration: none;
color: #FFD600;
}
a {
-moz-transition: color 1s linear;
-webkit-transition: color 1s linear;
transition: color 1s linear;
}
a:hover, a:active, a:focus {
color: #ff6600;
}
12. Transforms
2 and 3D manipulations on objects
.box {
height: 300px;
width: 300px;
transform: scale(1, 1.5), rotate(30deg);
}
13. Benefits of CSS3
Fewer HTTP requests
Faster development
Lightweight CSS (?)
Good support
14. 1. Long live CSS3
2. Back to the future
variables, conditionals, selectors, filters, paged media
exclusions, regions, grid layout, flexbox
3. Considerations
20. Regions
.text-source {
flow-into: main-thread;
}
.region, .region-a, .region-b {
flow-from: main-thread;
}
CSS Regions Module Level 3: http://dev.w3.org/csswg/css3-regions/
21. Sample
content flow
Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
consectetur adipiscing elit. Nam at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet. Praesent
nunc sapien, sollicitudin at luctus dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et felis. Integer
vel, feugiat vitae dolor. Morbi vel risus quis velit rhoncus porta.
bibendum mattis ipsum id
imperdiet. Praesent dapibus auctor Proin vel quam in elit lacinia adipiscing. Pellentesque vitae ante vitae enim mattis
nisl ac pretium. Sed ac lorem id ultricies vitae quis libero. Curabitur cursus mattis elit vitae mattis. Aliquam et tellus
purus pulvinar aliquet at et felis. non mauris posuere consequat sit amet sit amet nisl.
Integer vel risus quis velit rhoncus
porta. Proin vel quam in elit lacinia
adipiscing. Pellentesque vitae ante
vitae enim mattis ultricies vitae Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
quis libero. Curabitur cursus mattis at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet.
elit vitae mattis. Aliquam et tellus
Praesent dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et
non mauris posuere consequat sit
felis. Integer vel risus quis velit rhoncus porta. Proin vel quam in elit lacinia adipiscing.
amet sit amet nisl. Donec
malesuada posuere lectus, id Pellentesque vitae ante vitae enim mattis ultricies vitae quis libero. Curabitur cursus
rutrum mauris mollis vitae. mattis elit vitae mattis.
22. Sample
content flow
Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
consectetur adipiscing elit. Nam at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet. Praesent
nunc sapien, sollicitudin at luctus dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et felis. Integer
vel, feugiat vitae dolor. Morbi vel risus quis velit rhoncus porta.
bibendum mattis ipsum id
imperdiet. Praesent dapibus auctor Proin vel quam in elit lacinia adipiscing. Pellentesque vitae ante vitae enim mattis
nisl ac pretium. Sed ac lorem id ultricies vitae quis libero. Curabitur cursus mattis elit vitae mattis. Aliquam et tellus
purus pulvinar aliquet at et felis. non mauris posuere consequat sit amet sit amet nisl. content flow
Integer vel risus quis velit rhoncus
porta. Proin vel quam in elit lacinia
adipiscing. Pellentesque vitae ante
vitae enim mattis ultricies vitae Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
quis libero. Curabitur cursus mattis at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet.
elit vitae mattis. Aliquam et tellus
Praesent dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et
non mauris posuere consequat sit
felis. Integer vel risus quis velit rhoncus porta. Proin vel quam in elit lacinia adipiscing.
amet sit amet nisl. Donec
malesuada posuere lectus, id Pellentesque vitae ante vitae enim mattis ultricies vitae quis libero. Curabitur cursus
rutrum mauris mollis vitae. mattis elit vitae mattis.
23. Sample
content flow
Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
consectetur adipiscing elit. Nam at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet. Praesent
nunc sapien, sollicitudin at luctus dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et felis. Integer
vel, feugiat vitae dolor. Morbi vel risus quis velit rhoncus porta.
bibendum mattis ipsum id
imperdiet. Praesent dapibus auctor Proin vel quam in elit lacinia adipiscing. Pellentesque vitae ante vitae enim mattis
nisl ac pretium. Sed ac lorem id ultricies vitae quis libero. Curabitur cursus mattis elit vitae mattis. Aliquam et tellus
purus pulvinar aliquet at et felis. non mauris posuere consequat sit amet sit amet nisl. content flow
Integer vel risus quis velit rhoncus
porta. Proin vel quam in elit lacinia
adipiscing. Pellentesque vitae ante
vitae enim mattis ultricies vitae Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nunc sapien, sollicitudin
quis libero. Curabitur cursus mattis at luctus vel, feugiat vitae dolor. Morbi bibendum mattis ipsum id imperdiet.
elit vitae mattis. Aliquam et tellus
Praesent dapibus auctor nisl ac pretium. Sed ac lorem id purus pulvinar aliquet at et
non mauris posuere consequat sit
felis. Integer vel risus quis velit rhoncus porta. Proin vel quam in elit lacinia adipiscing.
amet sit amet nisl. Donec
malesuada posuere lectus, id Pellentesque vitae ante vitae enim mattis ultricies vitae quis libero. Curabitur cursus
rutrum mauris mollis vitae. mattis elit vitae mattis.
43. 1. Long live CSS3
2. Back to the future
variables, conditionals, selectors, filters, paged media
exclusions, regions, grid layout, flexbox
3. Considerations