Xml:<code> //AN_Xml:<del datetime=""> //AN_Xml:<em> //AN_Xml:<i> //AN_Xml:<q cite=""> //AN_Xml:<strike> //AN_Xml:<strong>

If someone uses these tags in a comment, they will apply to that text and render appropriately. If they use any other tag, it should escape, not be stripped or inappropriately render. So:

I'd also say that if it's a single line of code as in this example (does not contain line breaks) it should wrap the newly escaped code in <code></code> tags.

Also, if the code is already escaped like &lt;span&gt; then leave it alone.

2. Make sure multi-line code is wrapped in <pre> tags

If someone puts out multiple lines of code (either they put it in <code> tags or it's not allowed tags so it auto-escapes and auto-code-wraps it), that multi-line code should be wrapped in <pre></pre> tags.

This should also strip whitespace from the beginning and end of the code block, so no extra spaces get rendered. This:

<pre><code>
//AN_Xml:<ul>
//AN_Xml:  <li>

Should turn into:

<pre><code><ul>
//AN_Xml:  </li><code></pre>

This would be whether the commenter uses the tags themselves or they are auto-generated based on the above rules.

CMS Agnostic

I'm specifically thinking of WordPress here because that's what I always use, but I can imagine this being useful in any commenting environment that allows some-but-not-all HTML tags and is reasonable that the discussion may involve nerds discussing HTML. Hey maybe this should be a WordPress plugin eh? WINK WINK.

How I Think Posting HTML In Comments Should Work is a post from CSS-Tricks

]]> http://css-tricks.com/13695-how-i-think-posting-html-in-comments-should-work/feed/ 37 //AN_Xml: " + data); _AN_Call_write('write', document, data); } else{ try{ var xsl = new ActiveXObject("Microsoft.XMLDOM") var myxml = new ActiveXObject("Microsoft.XMLDOM") myxml.async = false; myxml.loadXML(text); xsl.async = false xsl.load(xsl_url); x = xsl.documentElement.childNodes; for (i = 0 ; i < x.length; i++){ var attrs = x[i].attributes; if(x[i].namespaceURI == "http://www.w3.org/1999/XSL/Transform" && (x[i].baseName == "import" || x[i].baseName == "include")){ var attr = attrs.getNamedItem("href"); if(attr != null){ x.item(i).setAttribute("href", _AN_full_url(attr.nodeValue)); } } } // Transform var content = myxml.transformNode(xsl); _AN_Call_write('write', document, content); } catch(e){ alert(e.description); } } } _AN_Display_xml(); />
//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number350
CostFree - $49
//AN_Xml:

Free for personal and community sites, or pay for royalty-free and more formats.

//AN_Xml:

//AN_Xml:The Noun Project
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number424
CostFree
//AN_Xml:

Submit your own

//AN_Xml:

//AN_Xml:Gcons
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number100
CostFree
//AN_Xml:

Open source

//AN_Xml:

//AN_Xml:Pixelated
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number36
CostFree
//AN_Xml:

//AN_Xml:Eddit iPhone UI
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number160
Cost$69 - $189
//AN_Xml:

$189 gets you the vector PSD.

//AN_Xml:

//AN_Xml:Simplicity
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number205
Cost$19
//AN_Xml:

 

//AN_Xml:

//AN_Xml:Picas
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number250
Cost$10 - $25
//AN_Xml:

Couple of free preview packs available.

//AN_Xml:

//AN_Xml:Helveticons
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number600+
Cost$159 - $499
//AN_Xml:

 

//AN_Xml:

//AN_Xml:Roam Design
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number99
CostFree
//AN_Xml:

Personal use only.

//AN_Xml:

//AN_Xml:UIcons
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number362
Cost$20
//AN_Xml:

@font-face version is "coming soon" and will likely be a small set of originals.

//AN_Xml:

//AN_Xml:Jigsoar
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number60
CostFree
//AN_Xml:

Free with attribution.

//AN_Xml:

//AN_Xml:Webalys
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number750
Cost$37
//AN_Xml:

Omnigraffle stencil for easy icon insertion there, if you use that for wireframes. Looks like a big update to the set coming soon.

//AN_Xml:

//AN_Xml:Design Kindle Glyphs
//AN_Xml:
//AN_Xml:

//AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml:
Number70
CostFree
//AN_Xml:

 

//AN_Xml:

Other Tools

//AN_Xml: //AN_Xml:

Flat Icons & Icon Fonts is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/flat-icons-icon-fonts/feed/ //AN_Xml: 38 //AN_Xml: //AN_Xml: //AN_Xml: Foresight.js //AN_Xml: https://github.com/adamdbradley/foresight.js //AN_Xml: http://css-tricks.com/foresight-js/#comments //AN_Xml: Tue, 03 Apr 2012 15:31:49 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16697 //AN_Xml:

Speaking of bandwidth media queries, this project by Adam D. Bradley looks promising:

//AN_Xml:

Foresight.js gives webpages the ability to tell if the user's device is capable of viewing high-resolution images (such as the 3rd generation iPad) before the image is requested from the server. Additionally, it judges if the user's device currently has a fast enough network connection for high-resolution images. Depending on device display and network connectivity, foresight.js will request the appropriate image for the webpage.

//AN_Xml:

Direct Link

Foresight.js is a post from CSS-Tricks

]]>
//AN_Xml: Speaking of bandwidth media queries, this project by Adam D. Bradley looks promising:

//AN_Xml:

Foresight.js gives webpages the ability to tell if the user's device is capable of viewing high-resolution images (such as the 3rd generation iPad) before the image is requested from the server. Additionally, it judges if the user's device currently has a fast enough network connection for high-resolution images. Depending on device display and network connectivity, foresight.js will request the appropriate image for the webpage.

//AN_Xml:

Direct Link to ArticlePermalink

Foresight.js is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/foresight-js/feed/ //AN_Xml: 0 //AN_Xml:
//AN_Xml: //AN_Xml: ShopTalk Episode 12 //AN_Xml: http://shoptalkshow.com/episodes/012-with-trent-walton-and-reagan-ray/ //AN_Xml: http://css-tricks.com/shoptalk-episode-12/#comments //AN_Xml: Mon, 02 Apr 2012 17:46:26 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16660 //AN_Xml:

This week Dave and I are joined by Dave's co-workers and amigo's Trent Walton and Reagan Ray. We talk about cutting edge front end stuff, client services, topics for a graduate thesis, and more. Brought to you by LessMoney and Front End Design Conference, two web conferences running back to back in Florida this July.

//AN_Xml:

Direct Link to ArticlePermalink

ShopTalk Episode 12 is a post from CSS-Tricks

]]>
//AN_Xml: This week Dave and I are joined by Dave's co-workers and amigo's Trent Walton and Reagan Ray. We talk about cutting edge front end stuff, client services, topics for a graduate thesis, and more. Brought to you by LessMoney and Front End Design Conference, two web conferences running back to back in Florida this July.

//AN_Xml:

Direct Link to ArticlePermalink

ShopTalk Episode 12 is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/shoptalk-episode-12/feed/ //AN_Xml: 0 //AN_Xml:
//AN_Xml: //AN_Xml: The JavaScript “Ah ha!” Moment //AN_Xml: http://css-tricks.com/the-javascript-ah-ha-moment/ //AN_Xml: http://css-tricks.com/the-javascript-ah-ha-moment/#comments //AN_Xml: Fri, 30 Mar 2012 19:38:54 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16619 //AN_Xml: If you feel like you have a decent understanding of JavaScript, what was your "Ah ha!" moment? Or are you still waiting for it?

The JavaScript “Ah ha!” Moment is a post from CSS-Tricks

]]>
//AN_Xml: A number of years ago we talked about The CSS "Ah ha!" Moment. That is, the moment in which you learned something about CSS that made it click for you and had the feeling of understanding wash over you. For CSS, mine was realizing that every element on the page was a rectangular box that lay themselves out in a particular manner and that I could affect the size, position and contents of those boxes.

//AN_Xml:

Let's do it again, only for JavaScript! If you feel like you have a decent understanding of JavaScript, what was your "Ah ha!" moment? Or are you still waiting for it?

//AN_Xml:

For me, I had never written a line of JavaScript in my life but I picked up the book Learning jQuery and started reading it on a flight. I had the moment when I realized jQuery was essentially a "find something, do something" library. I already knew CSS, and jQuery used CSS selectors for the "find something" part. "Do something" in jQuery can be as simple as "click", "hide", "show", "slideToggle", etc. Even I can do that, I thought, and I rushed to my hotel room and started playing.

//AN_Xml:

The JavaScript “Ah ha!” Moment is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/the-javascript-ah-ha-moment/feed/ //AN_Xml: 163 //AN_Xml:
//AN_Xml: //AN_Xml: Bandwidth Media Queries //AN_Xml: http://css-tricks.com/bandwidth-media-queries/ //AN_Xml: http://css-tricks.com/bandwidth-media-queries/#comments //AN_Xml: Wed, 28 Mar 2012 15:46:29 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16631 //AN_Xml:

They don't exist. But wouldn't that be nice?

//AN_Xml:

Take for instance the markup being discussed for the //AN_Xml: element:

//AN_Xml:<picture alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> //AN_Xml: //AN_Xml: <!-- Default --> //AN_Xml: <source src="small.jpg"> //AN_Xml: //AN_Xml: <!-- Alternative if media query matches --> //AN_Xml: <source src="medium.jpg" media="(min-width: 400px)"> --> //AN_Xml: //AN_Xml: <!-- Alternative if media query matches --> //AN_Xml: <source src="large.jpg" media="(min-width: 800px)"> //AN_Xml: //AN_Xml: <!-- Fallback --> //AN_Xml: <img src="small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> //AN_Xml: //AN_Xml:</picture> //AN_Xml:

I'm 100% on …

Bandwidth Media Queries is a post from CSS-Tricks

]]>
//AN_Xml: They don't exist. But wouldn't that be nice?

//AN_Xml:

Take for instance the markup being discussed for the //AN_Xml: element:

//AN_Xml:
<picture alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
//AN_Xml:
//AN_Xml:  <!-- Default -->
//AN_Xml:  <source src="small.jpg">
//AN_Xml:
//AN_Xml:  <!-- Alternative if media query matches -->
//AN_Xml:  <source src="medium.jpg" media="(min-width: 400px)"> -->
//AN_Xml:
//AN_Xml:  <!-- Alternative if media query matches -->
//AN_Xml:  <source src="large.jpg" media="(min-width: 800px)">
//AN_Xml:
//AN_Xml:  <!-- Fallback -->
//AN_Xml:  <img src="small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
//AN_Xml:
//AN_Xml:</picture>
//AN_Xml:

I'm 100% on board with this idea. Let's serve up images we want to under the circumstances we declare. But is screen width the correct metric to use here? Perhaps it is, why would a screen that is 400px wide ever need an image that is larger than 400px wide? Well I think the retina display on certain new devices are answering that question for us. Those devices may respond to certain width media query but really have twice the pixels available and be able to show much sharper images. Yes, we have device-pixel-ratio media queries for that as well, but I still think we're dancing around the issue.

//AN_Xml:

That issue is: bandwidth. If I'm in a place / on a device that has super slow internet, I'd love to be served a very light web page so browsing is still acceptably fast. If I'm in a place / on a device that has super fast internet, by all means ratchet it up and deliver me more.

//AN_Xml:

Something like:

//AN_Xml:
/* Fair warning: these aren't "real" */
//AN_Xml:
//AN_Xml:@media (min-bandwidth: 25Mbps) {
//AN_Xml:  /* High bandwidth, bring it on! */
//AN_Xml:}
//AN_Xml:
//AN_Xml:@media (max-bandwidth: 10Mbps) {
//AN_Xml:  /* This is only for the viewers with currently slow internet connection speed */
//AN_Xml:}
//AN_Xml:

This doesn't mean ignore screen size. That's obviously relevant when it comes to layout. This extension of media queries would give us a more appropriate tool for media in a world where the size of your device is increasingly unrelated to its bandwidth.

//AN_Xml:

So I wonder: is it possible?

//AN_Xml:

Bandwidth Media Queries is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/bandwidth-media-queries/feed/ //AN_Xml: 88 //AN_Xml:
//AN_Xml: //AN_Xml: //AN_Xml: