Monthly Archive

Monthly Archive

After being excited about css3 and using some of its features in my web pages, I realized that I needed some simple tool (editor) for experimenting.

The CSS3 Playground is a web application for experimenting with some new css3 capabilities. Primarily those than conform to the progressive enhancement philosophy, which means that the styles can be used on all sites without severely changing/limiting the experience on browsers that does not support them (=Internet Explorer 8.0 and older). But there are also styles that may need better replacements on Internet Explorer such as rotation, and I hope I will have the time to add more in the future.

Inspiration

I’m a developer and not a web designer, but that doesn’t keep me from learning and experimenting with html5 and css3 stuff. The inspiration for this web application came from some really good talks at Future of Web Design in London 2010. I wasn’t there, but purchased the recorded videos which I can recommend to all interested in web design (and web developers too, obviously). The recorded quality isn’t perhaps the best, but the speakers and the content made up for that. Especially Dan Cederholm and Denise Jacobs.

I wasn’t aware of the philosophies “Progressive enhancement” and/or “Graceful degradation” previously so this was a bit of a late awakening for me. Now I see what has been brewing in the web design and browser world for a while and why Microsoft finally was pushed to comply a lot better to all things css3 with Internet Explorer 9.

Then, of course, it’s another story that html5 and css3 are not standardized yet.

Building

Building this simple web application was also a good opportunity for me to really use a JavaScript user interface library since the application is client side only. I was choosing between jQuery UI and Dijit (Dojo’s ui library) and what made to go for Dijit was the fact that the mouse scroll wheel can be used on slider controls. I thought that made a nice feature when moving shadows and testing other numbers based properties.

I have mostly looked at jQuery previously, but I will investigate Dojo even further now with the good experiences I’ve had buildning CSS3 Playground.

The best specification of all css3 properties and browser support that I’ve found is Where can I use. I used that specification and the linked samples and documentation to learn about the specifics of the css3 styles that I wanted to support in the web application.

Use

So I recommend you try it out. I hope it will be a better way to try out some color and shadow combinations than to type the css manually and use your ordinary tools and previews. It will of course be of most use to you who know css pretty well, but has not had the time to check out css3 yet.

Add more preview boxes with the button. When changing the styles, only the last box clicked will be affected. I didn’t want to distort the preview with a visual selection effect for the current box, so besides a small transparency animation when clicking other boxes, you won’t be able to see which box is actually the current one. Remove the current box with the button.

Below the preview, you will see two collections of styles. The left one is the one you should use (copy and paste). It contains the styles for different browsers. The right one is read live from the browser of your choice and it might be interesting to see how different browsers actually chose to store the styles, but you should not copy and paste that part in your web pages and stylesheet files.

My favorite styles that I will start to use are the easy ones such as border radius and box shadow. Considering how easy they are, the difficulty will probably be not to overuse them.

This is a great tool and I’d be glad to donate, but sorry, can you give us some clearer and more specific guidance than “Copy the styles under ‘Style as set with JavaScript’ and paste inside your own html or css files to repeat the appearance for your own objects” and “The left one is the one you should use (copy and paste). It contains the styles for different browsers”? I mean, I’m reasonably familiar with HTML, CSS and JavaScript, but I can’t figure out at all how I can incorporate the coding that’s generated here into my pages and produce results like these.

@Ed M: Sure, I’ve thought about it and might add a button that generates complete html that can be copied and/or downloaded and not just the css part. A quick sample, which should be placed inside an html file:

Thanks so much, Mike. Actually, before I came back here I was experimenting on my own, and I figured out how to do it a little different way and one that’s more practical for my purposes: as I normally do, I just created a class under my declarations with the specs generated from your Playgound, and I simply invoke the class wherever I need the styling, e.g., .

I guess what threw me was the title “Style as set with JavaScript”; that led me to think that somehow I had to incorporate the declarations within an element like but of course that’s something quite different.

Have just made a generous donation in appreciation for your help and work.

Ah, the “code” tag didn’t work in my comment as it did in yours. Let’s try again, substituting long whitespaces for angle brackets:

Thanks so much, Mike. Actually, before I came back here I was experimenting on my own, and I figured out how to do it a little different way and one that’s more practical for my purposes: as I normally do, I just created a class under my style type=”text/css” declarations with the specs generated from your Playgound, and I simply invoke the class wherever I need the styling, e.g., div class=”playground” .

I guess what threw me was the title “Style as set with JavaScript”; that led me to think that somehow I had to incorporate the declarations within an element like script language = “Javascript” but of course that’s something quite different.

Have just made a generous donation in appreciation for your help and work.

I applied css gradients to my site using your app. On the home page I have “Ipitomy – A phone designed for business” and “SL1100 Communications system”. As you can see the the drop shadow works fine. But the gradient in each one is not visible. I was aiming for a very light gradient starting gray on upper left corner to an almost white or white on lower bottom right.

the other two modules, “A powerful native ip platform ” and “Axis CCTV” where done with Colorzilla gradient generator.