Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Ready for a sneak peek into Typography's possible future? Adobe has released a Prototype of a feature called CSS Regions, that allow type to flow from one column to the next around images and even within shapes. It's all handled by a series of proposed CSS properties. The prototype is displayed with a special version of WebKit, the same rendering engine found in Safari, Google Chrome, and Dreamweaver. Adobe has put out a public Prototype of CSS Regions on its Adobe Labs site, and you can find it at labs.adobe. com/technologies/cssregions.
Or just go to the Adobe Labs homepage and you'll find it there on the list. After you've taken a moment to read through the information about it, you're free to download the CSS Regions Prototype. There is a version for both Windows and Mac, which you can get to by selecting the check box that acknowledges that you've read and agreed to the terms of their licenses. Well, I've already downloaded the Mac version, and unzipped it, and put it on my Desktop.
So when you open up the folder, and it's the same structure on Windows, you'll see a binary folder, a samples folder, and some HTML, and text files. To get to the real goods, open up the bin or binary folder, and then double-click on MiniBrowser, and this opens up a custom browser that you can use to view and read about the CSS Regions Prototype. Let's jump right in to the samples so you can see what all the buzz is about. Well, this may not look like much, seems to be just simply files and a series of divs, but look what happens when I resize the window, and that third div begins to fill up with text. Pretty amazing! So, all of these areas are linked one to the other in a left right order, so that the text will flow automatically from one region to another as the browser window is resized.
I'm going to open up the browser window again, so you can see that. Now, you're not restricted in doing it a left to right, you can actually control the order of the content. So here I have content-order: 1 on the left, 2 on the right, and 3 in the middle and my third one is blank. But as I shrink the browser window, the text flows in, alright. Next up, let's look at another feature which is Content Shape. Now this is kind of one of the coolest things. You can actually put text within a specified shape.
Here we have a circle on the left, and a heart on the right. Even better, you can exclude text from specific shapes, so you can actually use white space within your designs. Adobe calls this Text Exclusion. Now, let me show you a more dynamic version of that, that's really great fun to play with. Here I have different shapes that I can change from: circle, heart, and star. So you can see that it really is a dynamic thing. I'll change the scale of the image. Here I'm upping the size of the star and notice that the text flows around it as I resize it and if you wanted to see what that outline is, just click on the Debug button there.
Next, I want to show you the drop cap exclusion, which is a very practical example of this technology. Although I showed you how to create drop caps in the Chapter 5 movie Inserting Drop Caps, you can see that this is a lot more sophisticated than what's capable with CSS3, as the text flows along the diagonal line of the Y. Now let's take a look at a couple of advanced examples. First, we'll start with the pie chart. Now when you go into the Advanced Examples section, you'll see that along the top, you have the option for seeing it in a number of form factors.
If you choose Desktop, it resizes to fill your current browser window, and here you see over on the right, text filling out a pie chart. Now, if I switch it to let's say the iPad view, I'll have to scroll down to see it, that same text is visible in a smaller format. I can even go into Landscape mode and you'll see again a different variation on it. Now, let's look at another one. Here is a great one: highlighting the Arches National Park, very scenic.
It is a beautiful job, very magazine- like I think, what you're able to do with CSS Regions, or what you will be able to do I should say, well, let me choose Desktop, and then change the size of the window, and you can see how the text flows there, all very nice. Finally, we'll take a look at the Bonneville Speedway Panorama, and what's kind of sweet about this one, just scroll down a little bit, so you see the car over on the right there. If I click on slide, and drag it, the car slides in the view, and notice that the type gets out of the way of the car.
Now let's take a quick look at the code, so you can see how this is done. You won't be able to see the code in the mini browser, but you can in a regular browser. So I'm going to switch over to Firefox and then open up a tab I have for the CSS Regions Arches National Park example. If I just scroll down you can see that the text is not being displayed in the normal browser, but if I go to View Source, you'll see as I go down that the text is actually all there.
Now the interesting part of this, are the specific tags that are being used. We can start to see them in the Source ID here. The first one is called webkit-flow with a value of article-thread and the webkit-flow property takes the content of the element out of the normal document flow, and then moves it into what's called a content thread and that content thread is identified by whatever the value of the string that follows, in this case, article-thread. Now, there is also a webkit-hyphens turned to auto.
This is not a CSS Region-specific property; it's actually in Safari at this point. Now, the content that was taken out of the regular flow and put into article thread is not displayed unless you declare a content from property, naming that same value, in this case, article-thread. Next up, we have webkit-wrap-shape-mode and that can be set to a number of values. It can either be set to none which means that it will ignore all wrap shapes, Content, where the content in the element will flow inside its own wrap shape, and Around, where the wrap shape fully affects both the inside and the outside content.
In this case, it's set to content. The webkit-wrap-shape-order property that you see here set to 1 is used to create text exclusions and works together with the webkit-wrap-shape property. Now you'll notice, this is very similar to an image map where the type of image is set, in this case, a polygon, and then a series of coordinates follows. As of this recording, CSS Regions is still working its way to the launchpad, but if it takes off, web designers will have a powerful new set of tools with which to manipulate type.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.