Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > CSS

Up Late with CSS3, and Loving It!

  • Print
  • + Share This
  • 💬 Discuss
Andy Clarke believes in experiments, Dan Cederholm is excited about layering, and John Allsopp reveals an nth-child secret. Learn the favorite CSS tricks of these three web design experts.

Getting three CSS experts on three separate continents together was a bit too much of a challenge, so Miraz Jordan interviewed Andy Clarke, Dan Cederholm and John Allsopp virtually.

Here these three book authors share their ideas about web standards, CSS, web browsers, device size challenges, the effect of content management systems, and the future of web development. They also tell us why we should find out more about the latest CSS development: CSS3.

In case you haven’t caught up with their latest accomplishments:

Miraz Jordan: You all embrace the concepts and practice of web standards. A decade ago, few had heard of web standards, and even fewer cared. What's your impression of the current state of web standards?

John Allsopp: I think that among "early adopter" developers – those who read the blogs, follow the trends – there's definitely a strong adoption of standards, and best practices in development. They focus on accessibility, separation of structure from presentation, and so on. In some specific areas, such as government, I also think there's an understanding of these issues. Among the broader profession, probably less so, but the trend is clearly there.

Andy Clarke: Very few web designers and developers and, in my experience, fewer clients care about standards, even if they know what they are. Most care about achieving their business goals and about "getting the job done."  And you know what? That’s OK.

Dan Cederholm: It's a mixed bag. As John Allsopp mentioned, among the early adopters, standards are important, even taken for granted perhaps. There's still work to be done, of course, in the realm of education and within corporate in-house teams. A lot was accomplished over the last several years in spreading the good word on web standards, and that's encouraging.

Jordan: Do you see a broad acceptance of web standards among professionals who create websites, or is it still an uphill battle? What causes people to stumble?

Allsopp: I think the key challenge we face as a profession is that we are still essentially self taught. Web design and development are rarely offered in computer science and design programs, and often covered badly when they are. So, unless developers new to the industry stumble upon the right books, sites, and communities, it's likely they'll start off on the wrong foot. Then they need to unlearn many techniques and skills.

Clarke: Thanks to a lot of hard work by standards advocates, software vendors and educators, the web is already a far more accessible place than it was even five years ago. Tables for layout, font elements, and other remnants of bad practice have largely gone in the work that I see. 

Cederholm: As standards evolve, I see the job of advocating best practices only getting more difficult. For instance, it's been a challenge explaining the benefits of using advanced CSS and CSS3 that works today in some environments. Some see vendor-specific styling to be counter to the web standards movement. It's not, and the concept of progressive enhancement is even more important to grasp than ever.

Jordan: Many of us struggle with CSS. How did you come to learn CSS? Did you learn from a book or a teacher? Did you just wake up one morning knowing everything about CSS?

Allsopp: I came across CSS not long after it became a standard, and started being supported in the version 4 browsers, in 1996 or so. Back then there were literally a handful of experts: Eric Meyer, Tod Fahrner, Sue Sims, and a few others. The focal point of the community was a thriving newsgroup. It was definitely a community helping itself. 

Clarke: Early on I learned CSS from many late nights taking apart the few examples and tutorials that were around at the time. 

Cederholm: I too, learned CSS by viewing source and experimenting. When CSS really took off as a viable option for all types of sites back in the early 2000s, it was an exciting watershed time for discovering best practices, solving complex problems, understanding the limitations of browsers, etc. Blogs were focused on tutorials and knowledge sharing and it was awesome.

Jordan: What parts of CSS do people have the most trouble with?

Allsopp: To me, the trickiest part of CSS is understanding selectors, and "thinking" with them. Too often, developers learn to use class and id selectors, as well as HTML element selectors, and then use these all the time. My adage is, "To a person with a hammer, everything looks like a nail." In my book, I really try to help people "think in CSS:" to look at markup and think about how attribute and structural selectors can select parts of their document, rather than using class all the time. I blame Zen Garden for that one!

Clarke: I still believe that while books (like mine, of course) and online tutorials are great starting points, the best way to learn is to experiment for yourself. With new CSS3 plus experimental CSS properties now available, I find myself staying up late again. It’s an exciting time (again) to be working on the web.

Jordan: OK, I confess, I've been a bit busy recently, and although I've heard of CSS 3, I don't know anything about it. Are we all supposed to be using CSS 3 now? What are the main things we should know about CSS 3?

Allsopp: One of the great things about the way CSS3 is being developed is we are seeing a great balance between innovation and standardization. Browser developers like Opera, Apple, and Mozilla are documenting and proposing aspects of CSS3, while also implementing them.

Most of the new CSS3 features are essentially automatically backwards compatible. If they’re not, they’re still easy to use in a way that progressively enhances a page, without impacting usability for users of browsers that don't support these features. It's safe to use border-radius, text and box shadows, and so on, provided you keep in mind what happens when browsers don't support them (and of course aren't obsessed with your pages looking identical in every browser).

I also put together some tools for exploring CSS3 properties, which means people can start playing with them right away without worrying about syntax.

Clarke: Using CSS3 (and experimental CSS) properties is perfectly acceptable if appropriate for the job in hand.

Cederholm: While the specification isn't done, there is already a fair amount of useful stuff implemented in some browsers.

I've been advocating "progressive enrichment:" using advanced CSS and CSS3 properties that work in some modern browsers, while other browsers might not even know what they're missing. If designers grasp that important concept, they’ll find CSS3 offers incredible flexibility and more compact code.

Even if you're not comfortable with using CSS3 now on production sites, it's still great to experiment with it and use it for prototyping. Adjusting opacity and color with RGBA while building things, for instance, initially saves time. Using border-radius for rounding corners, being able to adjust the amount of roundedness and color on the fly is beneficial, while design details are being hammered out.

Additionally, the fun stuff in Webkit also applies to its mobile implementations on the iPhone, Android, Palm Pre, etc. There are many reasons to get exciting and start using CSS3 today.

Jordan: One of the problems in web design has always been that web browsers render code differently. We have a plethora of browsers now: Safari, Chrome, Firefox, Opera and others, each with its own idiosyncrasies. What does this mean for the work you do?

Allsopp: I've long seen browser differences as a feature of the web, not a bug. Indeed, I actually stopped worrying about this issue in 2000!

Of course, browser bugs need to be taken into account, but these are becoming less and less of an issue. We Web Developers typically aren't aware how fortunate we are; the frustrations of getting pages to work across browsers is nothing compared to trying to target even two operating systems, such as Mac OS X and Windows.

Clarke: Because of CSS3’s modular approach, it is unlikely (by design) that all browsers will implement the same CSS at the same time. Web sites will probably never look or be experienced exactly the same in every browser.

Cederholm: Web sites don't need to look exactly the same in every browser! Once you accept that, and can convince your client or boss, it means you can concentrate on the stuff that actually matters, such as content, usability, functionality, portability, etc.

Jordan: What's your favorite CSS "trick?" What does it do, and why do you like it?

Allsopp: Hmmm. There's so much! From a purely geeky perspective, I really like structural selectors. The CSS3 selectors like nth-child mean you can often style just about any part of a page without the use of class or id at all. I have a whole chapter on these and other CSS3 selectors in Developing with Web Standards

Clarke: I am very excited about adding a subtle interaction to a design using CSS transforms and transitions. You can see these in action on the home page of For a Beautiful Web.

Cederholm: I've been most excited lately about the layering possibilities brought by RGBA. The combinations and added texture are endless, and open up some real unique (until now) visuals for the web. We just need Internet Explorer to get on board.

Jordan: A decade ago we were all pretty much stuck with 13- to 20-inch monitors. Now we have everything from 3.5 inch iPhones and 9 inch netbooks to 30-inch cinema displays. What impact has this had on your approach to website design?

Allsopp: In a philosophical sense, not a great deal. In practical terms, it requires getting up to speed with CSS3 media queries. They are well supported in most modern browsers already, and designed to work with older browsers as well. I even wrote a chapter on them in Chapter 14 of my book.

OK, enough plugs – but I think media queries will be one of the key tools for web developers as the browser real estate landscape fragments further and further.

Cederholm: In a very specific way, it means even more of my attention is paid to fluid layouts. While a majority of desktops might be able to handle a 960px wide layout, all these new devices and screen widths mean that all bets are off. We're going to see much more adjusting over the coming years.

Jordan: WordPress, Blogger, Drupal, Joomla, and other frameworks have become very popular. What impact is that having on websites in general? Do you think it's affecting things like validity, accessibility, or overall quality?

Allsopp: There's a lot that could be said on this issue. In theory, frameworks can do a lot of the heavy lifting, so the likelihood of clean, well structured, valid code increases. But developers do have a habit of taking nicely structured, well-developed themes and mangling them, rather than extending them sensibly via plugins. All in all, I'm not sure there's been a significant impact on these things. The developers concerned with best practice will continue to use them, those ignorant of best practice will continue to avoid them.

Cederholm: The downside to frameworks is that homogenizing of design. Two-column blog layouts have become the norm. While frameworks are wonderful, there's a danger of becoming too reliant on them for the visuals. I'm always impressed by well-made frameworks or those developers who take the time to customize a framework beyond recognition.

Jordan: The Internet grows and changes every day. What current trends or activities do you hope to see growing stronger over the next decade?

Allsopp: I think the standards based, open, interoperable web is here to stay. Now and then, walled gardens and proprietary technologies seem to get a foot hold, but time and again "the web wins." Over the coming five to ten years, I have little doubt that the vast majority of screen-based interfaces will be developed using CSS, HTML, and JavaScript. That will affect in-flight entertainment systems, car dashboards, ATMs, you name it.

Tools and technologies for web based applications need improvement. The rise of JavaScript frameworks is definitely addressing some of the need here, but I hope to see an improvement in tools for developing web applications using these technologies.

Clarke: There is still plenty left to do as new techniques, technologies and languages such as HTML5 become widespread.

Cederholm: As Andy Clarke mentioned earlier, it feels like some of the excitement has returned with the CSS3 stuff that's become useable in modern browsers. It's fueled a new opportunity for front-end designers and developers to get involved with the experience layer. Previously that was only possible with JavaScript or Flash.

Jordan: What are the current challenges you see for CSS?

Allsopp: Internet Explorer and developer attitudes. Sadly, it will be some time before we see IE really support a lot of the current exciting CSS development like transitions and transforms. This is particularly a problem because so many developers still have the attitude that pages should look the same in every browser, so until IE supports these features, they are unusable.

Clarke: The most important thing is that CSS3 was designed as a series of modules, rather than a single specification. Browser makers and others can choose what to implement and when.

Cederholm: Yep, Internet Explorer. Webkit, Mozilla, and Opera are leading the charge with rapid adoption of advanced CSS. It's Internet Explorer that's held back the use of this stuff for the real masses. Not to mention the bug fixing that’s required.

The sad part is that possibly most of the IE6 user base is likely forced to use the browser by in-house IT departments, or intranet software that depends on it. These people don't have a choice, and frankly it's part of the hold back problem.

Jordan: Is there anything else you'd like to say?

Allsopp: CSS3 really is very exciting, and usable. I do encourage developers and designers to get out there and start exploring these features now!

Clarke: If you are making a cup of tea, I’ll have two sugars.

Cederholm: CSS3 is where things are headed, and portions of it are here now. It's not all or nothing, either. Sprinkle CSS3 in. Don't tell your boss or client. Have fun with it, prototype with it, embrace it. Don't be afraid to start using CSS3 right now.

Jordan: Thanks John, Andy, and Dan, for sharing your thoughts.

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus