Designing the web can be very cumbersome. Things tend to get out of hand when more advanced visual techniques such as those known from classic media are to be applied. Add in a variety of viewport sizes and you are either lost or doomed. Now, new CSS features allow us to treat the web as a first-class design surface: wrap and clip text around custom shapes, blend together background images and gain much better layout control for your responsive design. Let's take a look at CSS Shapes, CSS Regions and background blend modes!
A talk presented at border:none 2013 October 25, in Nuremberg.
10. .content {
/* collect content into a named flow */
flow-into: myFlow;
}
.region {
/* render the content from the named flow */
flow-from: myFlow;
}
41. Background Blending
/* blend background images of the same element */
.element {
background: url(image1.jpg), url(image2.jpg);
background-blend-mode: overlay;
}
55. Complex shapes
/* shape defined by points of a polygon */
.content {
shape-inside: polygon(x1, y1 x2, y2 ... );
}
/* shape defined by the alpha levels of an image */
.content {
shape-inside: url(image.png);
shape-image-threshold: 0.5;
}