0, Firefox 3.6 and Safari 3.0 will require some vendor prefixes. IE8 does support pseudo elements, however doesn’t support transform.

The fallback would be a colored square. Very likely not a huge problem.

There You Have It

It's a price star thing. Flexible enough to grow when you increase your font size. Made with some CSS.

View Demo   Download Files

This was a guest post by Ryan Buttrey of Sparkbox. Thanks for sharing your process Ryan! I too get a kick out of figuring out clever and efficient ways to solve bits of design.

Building a Starburst with CSS is a post from CSS-Tricks

]]> http://css-tricks.com/14475-building-a-starburst-with-css/feed/ 40 Semantic Animationhttp://css-tricks.com/14458-semantic-animation/ http://css-tricks.com/14458-semantic-animation/#comments Tue, 04 Oct 2011 08:24:21 +0000 Chris Coyier http://css-tricks.com/?p=14458 Animations are inherently visual. But can we give a similar experience to everyone by getting a bit more semantic?

Semantic Animation is a post from CSS-Tricks

]]>
I recently said this when asked about new tools (e.g. Edge) for building CSS animations:

Empty divs used for nothing but styling were non-semantic and a bad idea before CSS animations and they are a bad idea now.

I stand by that. I feel like we've come a long way as an industry getting everyone on board with semantic markup. Do this, and reap the great rewards of speed, accessibility, maintainability, and SEO.

Then a new shiny thing comes along and the first thing we do is start abandoning our own rules. "Oooo I can make a bird fly across the screen‽" Order me up a few more of them empty divs! I'm surely guilty of this. It doesn't feel like that big of a deal when you're doing it, especially in moderation.

But CSS animations are here to stay. General best practices are going to emerge regarding what types of things we should be using them for, how much is too much, how to approach them semantically, how to offer fallback content, etc. I thought I'd throw in one little idea I had.

Let's consider what animations do for a design. They can give it mood. They can give it attitude. Like other aspects of design, they affect how a user might feel about that page. But they only do these things for sighted users. The empty div does none of these things for non-sighted users. It's just useless cruft.

<div class="moon">
//AN_Xml:  <!-- I offer nothing to non-sighted users -->
//AN_Xml:</div>

What if we were to take that empty div and try to accomplish for non-sighted users all the same things we are accomplishing for our sighted users. Simply putting descriptive text into those divs might be able to get it done for us. Similar to an alt tag for images, but actual inline content meant to be read/enjoyed in same way the animation is meant to be seen/enjoyed.

Perhaps our animation is of a moon rising, and as it rises the sky and ground turn to black. We need two elements to accomplish our animation, and so perhaps they contain the lyrics to CCR's Bad Moon Rising

<div class="moon">
//AN_Xml:   I see a bad moon rising
//AN_Xml:   I see trouble on the way
//AN_Xml:</div>
//AN_Xml:
//AN_Xml:<div class="ground">
//AN_Xml:   I see earthquakes and lightnin’
//AN_Xml:   I see bad times today
//AN_Xml:</div>

The CSS hides this text from view and calls the keyframe animation:

.ground, .moon {
//AN_Xml:   text-indent: -9999px;
//AN_Xml:   overflow: hidden; /* text-indent without this can cause choppy animation */
//AN_Xml:}
//AN_Xml:
//AN_Xml:.ground {
//AN_Xml:   -webkit-animation: ground-to-black 5s ease;
//AN_Xml:   -moz-animation:    ground-to-black 5s ease;
//AN_Xml:   -ms-animation:     ground-to-black 5s ease;
//AN_Xml:}
//AN_Xml:
//AN_Xml:.moon {
//AN_Xml:   -webkit-animation: rising-moon 5s ease;
//AN_Xml:   -moz-animation:    rising-moon 5s ease;
//AN_Xml:   -ms-animation:     rising-moon 5s ease;
//AN_Xml:}
//AN_Xml:
//AN_Xml:/* Plus various keyframe declarations */

View Demo

Notice the names of those keyframe animations. That's another discussion to have in the "semantic animations" vein. Another time.

This text could be anything that relates to the animation. It could describe the animation literally. It could be a poem that elicits the same emotion as the animation. It could be an <audio> element.

Woah there, fancy designer boy.

I don't use screen readers, so I don't get to make the call if this is a good idea or not. I imagine there is already enough cruft to fight through that this, despite the good intentions, might be just another thing obstacle on the way to "real content".

I suppose it's like everything else in this world: it depends.

Semantic Animation is a post from CSS-Tricks

]]>
http://css-tricks.com/14458-semantic-animation/feed/ 35
Amazon Silkhttp://www.youtube.com/watch?v=_u7F_56WhHk http://css-tricks.com/14453-amazon-silk/#comments Wed, 28 Sep 2011 21:53:18 +0000 Chris Coyier http://css-tricks.com/?p=14453

Listen to the engineers behind Amazon's new "Silk" web browser talk about how it uses the cloud to take the load off mobile devices.

Sounds like it does all the asset-requesting for you from the cloud, optimizes it, then sends you down one file that gets rendered into a website. Sounds clever to me, as long as it's secure as hell.

Rumor has it: WebKit based.

Direct Link to ArticlePermalink

Amazon Silk is a post from CSS-Tricks

]]>
Listen to the engineers behind Amazon's new "Silk" web browser talk about how it uses the cloud to take the load off mobile devices.

Sounds like it does all the asset-requesting for you from the cloud, optimizes it, then sends you down one file that gets rendered into a website. Sounds clever to me, as long as it's secure as hell.

Rumor has it: WebKit based.

Direct Link to ArticlePermalink

Amazon Silk is a post from CSS-Tricks

]]>
http://css-tricks.com/14453-amazon-silk/feed/ 0
//AN_Xml: rp //AN_Xml:

As this article was drafting, Remy Sharp put out a video screencast about this exact topic. He's way better at explaining it than me, so please go watch that.

//AN_Xml:

Advertise here with BSA

Just One Of Those Things You Need To Understand About JavaScript is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/9738-just-one-of-those-things-you-need-to-understand-about-javascript/feed/ //AN_Xml: 26 //AN_Xml: //AN_Xml: //AN_Xml: The Stats That Matter: Your Site’s Stats //AN_Xml: http://css-tricks.com/9745-the-stats-that-matter-your-sites-stats/ //AN_Xml: http://css-tricks.com/9745-the-stats-that-matter-your-sites-stats/#comments //AN_Xml: Tue, 14 Jun 2011 20:42:56 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=9745 //AN_Xml:

Just because I thought it was interesting, I shared this on Twitter this morning:

//AN_Xml:

95% of traffic to CSS-Tricks has a screen resolution of larger than 1024x768.

//AN_Xml:

And I got all kinds of responses like: That's such a skewed statistic!!!

//AN_Xml:

How are my own stats on my own website skewed?

//AN_Xml:

OK, I know what they meant, they meant that that 95% number isn't indicative of most websites, it's only CSS-Tricks visitors. So people shouldn't quote that number out of…


Advertise here with BSA

The Stats That Matter: Your Site’s Stats is a post from CSS-Tricks

]]>
//AN_Xml: Just because I thought it was interesting, I shared this on Twitter this morning:

//AN_Xml:

95% of traffic to CSS-Tricks has a screen resolution of larger than 1024x768.

//AN_Xml:

And I got all kinds of responses like: That's such a skewed statistic!!!

//AN_Xml:

How are my own stats on my own website skewed?

//AN_Xml:

OK, I know what they meant, they meant that that 95% number isn't indicative of most websites, it's only CSS-Tricks visitors. So people shouldn't quote that number out of context or use it to inform design decisions on other websites.

//AN_Xml:

But that highlights an interesting point. Who cares what the global average of internet user screen size is? The only stats that matter are your own. Unless you are starting a new project from scratch and need a baseline, in which case I think you are better off finding a related website and kindly asking for their numbers than using a global average.

//AN_Xml:

That said, I'm not sure that particular statistic will inform my design decisions either. As I tinker with a redesign, I plan to support all screens large and small.

//AN_Xml:

Advertise here with BSA

The Stats That Matter: Your Site’s Stats is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/9745-the-stats-that-matter-your-sites-stats/feed/ //AN_Xml: 34 //AN_Xml:
//AN_Xml: //AN_Xml: New at Wufoo //AN_Xml: http://css-tricks.com/9734-new-at-wufoo/ //AN_Xml: http://css-tricks.com/9734-new-at-wufoo/#comments //AN_Xml: Tue, 14 Jun 2011 14:08:05 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=9734 //AN_Xml:

Couple of things I wanted to share from Wufoo land.

//AN_Xml:

Developers: We've released the Wufoo Form Embed Kit, which is a way you can build form embedding integration with other apps easily. As in, you don't have to learn our APIs or do custom design work. Would make for neat CMS plugins!

//AN_Xml:

Designers: If you didn't know you could apply your own custom CSS to Wufoo forms and completely transform their appearance, you can, and here's a tutorial


Advertise here with BSA

New at Wufoo is a post from CSS-Tricks

]]>
//AN_Xml: Couple of things I wanted to share from Wufoo land.

//AN_Xml:

Developers: We've released the Wufoo Form Embed Kit, which is a way you can build form embedding integration with other apps easily. As in, you don't have to learn our APIs or do custom design work. Would make for neat CMS plugins!

//AN_Xml:

Designers: If you didn't know you could apply your own custom CSS to Wufoo forms and completely transform their appearance, you can, and here's a tutorial getting you up to speed. And did you know you can customize the look of radio buttons and checkboxes with just CSS?

//AN_Xml:

Advertise here with BSA

New at Wufoo is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/9734-new-at-wufoo/feed/ //AN_Xml: 4 //AN_Xml:
//AN_Xml: //AN_Xml: //AN_Xml: es. As far as I know, it works great and hasn't been inflicted with any major downtime, but of course you always run that risk.

//AN_Xml:

You might be thinking: Wow, the Sencha.IO technique is really cool but I worry about the third-party dependency. I wish I could run that on my own server. If you want to go down that road, there is the public WURFL database and this Server Side Responsive Images technique which puts that to work locally.

//AN_Xml:

There are also third-party services like Device Atlas Cloud which does device detection for you. It's also a third-party dependency for your app. No doubt their goal and focus is staying up and fast at all times, but you have to be very careful about who and what you rely on for your business.

//AN_Xml:

Is there a specific CMS with specific CMS powers involved?

//AN_Xml:

Say your project is in WordPress. WordPress has a media uploader built in. When you upload an image with it, it can create multiple versions (scaling down) of that image for you. That's pretty cool and powerful and you could/should take advantage of that. Keir Whitaker talks about using that ability in his article Automatic Responsive Images in WordPress.

//AN_Xml:

This isn't just a WordPress thing though. I'm sure the concepts at work here could be done (or made to be done) in any Content Management System.

//AN_Xml:

Can I wait for the future?

//AN_Xml:

The release of the "new iPad" (the third one, for longevity) is what sparked a lot of these techniques and conversations. Its high pixel density is great for vectors and big photos, but actually not great for things like small icons that need to be scaled up to be the correct size and can be blurry. But serving higher resolution icons means larger file sizes and slower websites. Hence, the need to only serve them in situations/environments that need them.

//AN_Xml:

The world of web standards is aware of this problem. There is a whole group dedicated to talking about it. In time, they may solve it and then we can start using whatever way they come up with (assuming its awesome and better than what we have now).

//AN_Xml:

It may be flipping out the src of images through CSS content like Nicolas Gallagher suggested. It might be the <picture> element. It might be a srclist attribute in HTML or src property in CSS. It might be a prefix.

//AN_Xml:

 

//AN_Xml:

More resources

//AN_Xml: //AN_Xml:

Which responsive images solution should you use? is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/which-responsive-images-solution-should-you-use/feed/ //AN_Xml: 37 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: } } } // Transform var content = myxml.transformNode(xsl); _AN_Call_write('write', document, content); } catch(e){ alert(e.description); } } } _AN_Display_xml();