cular font. You can type your own text into the box to see what it will look like in that font. Unfortunately when you go to another font, that custom text you entered is gone. This would be a great case for localStorage. When the value in that area changes, save it to localStorage, and load that value in when the page loads. I think that would be a great timesaver, as I think jumping around to see that text in multiple fonts is a pretty common use case.


CSS Lint has a grid of checkboxes for what features you do/don't want to CSS Lint to look for when you test your CSS. It would be really nice if this used localStorage to remember what checkbox configuration you used, so if you reload the page or come back later, it's the same. So if you don't like the "Don't use IDs" checkbox, you can turn if off forever =).


Pretty much any website with a login form could use localStorage to keep the username saved. So when a user comes back, it's one less step for them to log in.


Zeldman.com has links in the footer which allow you to toggle the colors used on the site between two versions. It saves this as a cookie which is great, but is subject to the frailty of cookies. Any site like this with alternate styling choices (e.g. font-size toggle) could save that information in localStorage and have it persist better.

MOR

This is the tip of the iceberg. I'm sure people with more developer-oriented minds can think of bigger and better ideas for this. Saving your place in a game? Caching assets? What else you got?

Way more info from Mark Pilgrim.


Advertise here with BSA

Examples of Sites where localStorage should or is being used is a post from CSS-Tricks

]]> http://css-tricks.com/13392-localstorage-examples/feed/ 32 CSSFraghttp://shauninman.com/archive/2011/07/25/cssfrag http://css-tricks.com/13386-cssfrag/#comments Mon, 25 Jul 2011 18:41:27 +0000 Chris Coyier http://css-tricks.com/?p=13386

Shaun Inman with a Safari extension (and Firefox port) that impliments the (not real) fragment identifiers proposal. Essentially: same-page document links that don't need the ID/hash-tag thing. Alternatively, you target with a CSS selector:

http://example.com/lorem.html#css(.content:nth-child(2))

Direct Link to ArticlePermalink


Advertise here with BSA

CSSFrag is a post from CSS-Tricks

]]>
Shaun Inman with a Safari extension (and Firefox port) that impliments the (not real) fragment identifiers proposal. Essentially: same-page document links that don't need the ID/hash-tag thing. Alternatively, you target with a CSS selector:

http://example.com/lorem.html#css(.content:nth-child(2))

Direct Link to ArticlePermalink


Advertise here with BSA

CSSFrag is a post from CSS-Tricks

]]>
http://css-tricks.com/13386-cssfrag/feed/ 0
//AN_Xml: >
<p>Dear Emily,</p>
//AN_Xml:<p>yadda yadda yadda.</p>
//AN_Xml:<p>Love, Chris.</p>

Perhaps this "letter" is generated by dynamic content from a database, but we want to ensure the proper capitalization and style of the opening and closing lines.

.letter p:first-child::nth-word(-n+2)::nth-letter(1),
//AN_Xml:.letter p:last-child:nth-word(-n+2):nth-letter(1) {
//AN_Xml:  text-transform: uppercase;
//AN_Xml:}

The Complete Set

So if we get all of this, the complete set would be:

:first-child        :first-of-type        :only-child
//AN_Xml::last-child         :last-of-type         :only-of-type
//AN_Xml::nth-child          :nth-of-type
//AN_Xml::nth-last-child     :nth-last-of-type
//AN_Xml:
//AN_Xml:::first-letter      ::first-line          ::first-word
//AN_Xml:::last-letter       ::last-line           ::last-word
//AN_Xml:::nth-letter        ::nth-line            ::nth-word
//AN_Xml:::nth-last-letter   ::nth-last-line       ::nth-last-word 

Again, just wishful thinking. If there is anyone I can put this in front of that can do something about it, I will. And I'll also keep this updated with the feedback on it, positive or negative.

For the record, this isn't a new request. Anne van Kesteren called for it in 2003.

A Call for ::nth-everything is a post from CSS-Tricks

]]> http://css-tricks.com/14771-a-call-for-nth-everything/feed/ 67 //AN_Xml: