A Help Introduction About Css Level 4
A Help Introduction About Css Level 4
Diego Eis
tableless.com.br
Diego Eis
I love work with web.
And I lost 37 pounds. ;-)
@diegoeis
@tableless
http://tableless.com.br
http://medium.com/@diegoeis
http://slideshare.net/diegoeis
CSS Level 3
Was all about shadows, borders, backgrounds, 3D,
transitions and animations.
This was awesome!
Because this solved many problems.
Do you remember when you created rounded borders with
four images, or created opacity background with PNG, or
even used many DIVs to produce multiple backgrounds?
CSS Level 4
Is all about select and detect things.
Sure, CSS Level 4 can do more
than that, but most important
is select and detect things.
#IMHO
Selectors
New selectors are coming.
Parent selector
Select a parent element based on its child.
// Select LI that is a parent of P
$li > p { border: 1px solid #ccc; }
Logical Combinators
Select a collection of elements.
:matches()
Functional pseudo-class select elements contained in
selector list argument.
// Old way
section h1,
header h1,
article h1 {
color: blue;
}
// select H1 contained in section, header or article elements
:matches(section, header, article) h1 {
color: blue;
}
:not()
Functional pseudo-class with selector list as argument that
NOT is represented by this argument.
button:not([DISABLED]) { ... }
// Normal
@media (light-level: dim) {
...
}
// Very light
@media (light-level: washed) {
...
}
Scripting Media Features
Detect if the actual UA support script languages on the
current document.
// The the UA supports scripting and that support is active
@media (scripting: enabled) {
...
}
@diegoeis
@tableless
http://tableless.com.br
http://medium.com/@diegoeis
http://slideshare.net/diegoeis