<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ChrisNager.com</title>
	<atom:link href="http://chrisnager.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisnager.com</link>
	<description>Award-Winning Web Designer</description>
	<lastBuildDate>Mon, 25 Mar 2013 20:44:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Time-based media queries</title>
		<link>http://chrisnager.com/time-based-media-queries/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=time-based-media-queries</link>
		<comments>http://chrisnager.com/time-based-media-queries/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 20:40:14 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Feature request]]></category>
		<category><![CDATA[Future CSS]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=597</guid>
		<description><![CDATA[Wouldn&#8217;t it be fun to be able to target our designs based on what season, day, or hour it is using CSS media queries? Experimental code ahead. The following code doesn&#8217;t exist…yet. /* Style for summer */ @media (time: from(2013-06-21) &#8230; <a href="http://chrisnager.com/time-based-media-queries/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wouldn&#8217;t it be fun to be able to target our designs based on what season, day, or hour it is using CSS media queries?</p>
<p class="alert"><strong>Experimental code ahead.</strong> The following code doesn&#8217;t exist…yet.</p>
<p><code></p>
<pre>/* Style for summer */
@media (time: from(2013-06-21) to(2013-09-21)) {
    html {
        background: radial-gradient(yellow, white);
    }
}</pre>
<p></code></p>
<p><span id="more-597"></span></p>
<p><code></p>
<pre>/* Style for a birthday */
@media (time: 2013-09-12) {
    html {
        background: url(confetti.gif);
    }
}</pre>
<p></code></p>
<p><code></p>
<pre>/* Style for the evening */
@media (time: from(17:00:00) to(21:00:00)) {
    html {
        background: darkblue;
    }
}</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/time-based-media-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hue bump with Sass @for control directive</title>
		<link>http://chrisnager.com/hue-bump-with-sass-for-control-directive/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hue-bump-with-sass-for-control-directive</link>
		<comments>http://chrisnager.com/hue-bump-with-sass-for-control-directive/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 21:47:04 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[Sass]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=572</guid>
		<description><![CDATA[Sass has a set of powerful control directives that I find fascinating: @if, @for, @while, and @each. In my &#8220;hue bump&#8221; experiment, I used a @for loop in Sass along with the nth-of-type CSS pseudo class to bump up the &#8230; <a href="http://chrisnager.com/hue-bump-with-sass-for-control-directive/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sass has a set of powerful control directives that I find fascinating: <code>@if</code>, <code>@for</code>, <code>@while</code>, and <code>@each</code>.</p>
<p>In my &#8220;hue bump&#8221; experiment, I used a <code>@for</code> loop in Sass along with the <code>nth-of-type</code> CSS pseudo class to bump up the hue of each word.</p>
<pre>
<code>$hue-bump: 15;

@for $n from 2 through 6 {
    h1:nth-of-type(#{$n}) {
        color: hsl($n * $hue-bump, 100%, 50%);
    }
}</code>
</pre>
<p>I looped from the second header (<code>h1:nth-of-type(2)</code>) to the sixth header (<code>h1:nth-of-type(6)</code>) adding 15 (or the <code>$hue-bump</code> amount) more to the hue number in each header’s <code>hsl</code> value.</p>
<pre class="codepen" data-height="470" data-type="result" data-href="zwgJC" data-user="ChrisNager" data-safe="true"><code></code><a href="http://codepen.io/ChrisNager/pen/zwgJC">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/hue-bump-with-sass-for-control-directive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display icons with custom data-attributes</title>
		<link>http://chrisnager.com/display-icons-with-custom-data-attributes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=display-icons-with-custom-data-attributes</link>
		<comments>http://chrisnager.com/display-icons-with-custom-data-attributes/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 18:39:38 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[data-attributes]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[icons]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=555</guid>
		<description><![CDATA[Here is a way to set matching icons to your labels all without leaving your HTML. Just create a new data-icon attribute on your tag that contains your label and set it equal to the icon you would like to &#8230; <a href="http://chrisnager.com/display-icons-with-custom-data-attributes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="codepen" data-height="220" data-type="result" data-href="blips" data-user="ChrisNager" data-safe="true"><code></code></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>Here is a way to set matching icons to your labels all without leaving your HTML.</p>
<p>Just create a new <code>data-icon</code> attribute on your tag that contains your label and set it equal to the icon you would like to use.</p>
<pre>
<code>&lt;li data-icon=★&gt;Favorites&lt;/li&gt;</code>
</pre>
<p>And then set your CSS to display the <code>data-icon</code> attribute <code>before</code> the label.</p>
<pre>
<code>li:before {
    content: attr( data-icon );
}</code>
</pre>
<p>On a side note: <code>attr()</code> works in IE8+.</p>
<p>That&#8217;s it. Happy holidays.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/display-icons-with-custom-data-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circles</title>
		<link>http://chrisnager.com/circles/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=circles</link>
		<comments>http://chrisnager.com/circles/#comments</comments>
		<pubDate>Wed, 19 Dec 2012 20:01:23 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=546</guid>
		<description><![CDATA[Just having some fun with CSS animations and generated content. Happy hump day!]]></description>
			<content:encoded><![CDATA[<pre class="codepen" data-height="420" data-type="result" data-href="uenJd" data-user="ChrisNager" data-safe="true"><code></code></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>Just having some fun with CSS animations and generated content.</p>
<p><em>Happy hump day!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/circles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video and audio in CSS</title>
		<link>http://chrisnager.com/video-and-audio-in-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=video-and-audio-in-css</link>
		<comments>http://chrisnager.com/video-and-audio-in-css/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 22:11:50 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[Feature Requests]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=490</guid>
		<description><![CDATA[Video, audio, and images are all types of multimedia. Currently only images are aloud in our CSS. In many cases video and audio require controls and are a core part of the page content. Sometimes, though, they are strictly used &#8230; <a href="http://chrisnager.com/video-and-audio-in-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1 class="intro">Video, audio, and images are all types of multimedia.</h1>
<p>Currently only images are aloud in our CSS. In many cases video and audio require controls and are a core part of the page content. Sometimes, though, they are strictly used as background decoration and do not require controls.</p>
<p>Let&#8217;s say you want an infinitely-looping full screen video as your homepage background (like this one: <a href="http://marisapassos.com/">marisapassos.com</a>). Your only option is to include it in your HTML. That works, but if the video is essentially decoration or serves as a supporting style for the real content (in the HTML), then I say it belongs in the presentational layer (the CSS).</p>
<p><span id="more-490"></span></p>
<p>Take this site as another example: <a href="http://www.thecassette.fr/">thecassette.fr</a>. Their video of the dancing shoes is clearly used for decoration. It sits in the background and loops creating a nice effect, making the page much more visually pleasing and adding to their branding.</p>
<p>Their video doesn&#8217;t belong in the meat of the page as it is not content, but truly belongs in the CSS with all the other styling. The developers of this site even used a clever fallback image of the shoes for the browsers that didn&#8217;t support their video (which happens to be an .swf file in this case, but could be any type of web video format).</p>
<p class="alert"><strong>Experimental code ahead.</strong> The following code doesn&#8217;t exist…yet.</p>
<p>I would rewrite their background video in CSS something like this:</p>
<pre>
<code>.page {
    background: url(images/dots-grid.png),
                url(video/dancing-shoes.webm),

                /* Video fallback */
                url(video/dancing-shoes.mp4),

                /* Image fallback */
                url(images/dancing-shoes.jpg);
    background-size: cover;
    background-play-state: running;
    background-iteration-count: infinite;
}</code>
</pre>
<p>On this site (<a href="http://www.aboutblank.cz/">aboutblank.cz</a>), again, video is used to paint the page, but is not true content, and therefore does not belong in the HTML, but rather the CSS. When I disable all CSS styles on the page, I still see the video looping.</p>
<hr />
<p>As for audio, I feel the same way, that if the audio is not content (like album tracks on a band&#8217;s site) and belongs in the background, we should be able to send it to the CSS.</p>
<p>Chris Coyier wrote an interesting article in 2011 describing how to <a href="http://css-tricks.com/play-sound-on-hover/">play sound on <code>:hover</code></a>. This method works, but wouldn&#8217;t it be nice to be able to make this work purely with CSS without HTML or JS?</p>
<p>I think this would be quite awesome:</p>
<pre>
<code>.btn:hover {
    background-audio: src(audio/bloop.webm),

                      /* Audio fallback */
                      src(audio/bloop.mp3);
}
btn:active {
    background-audio: src(audio/tick.webm),

                      /* Audio fallback */
                      src(audio/tick.mp3);
}</code>
</pre>
<p>Presentational elements belong in the CSS. If audio or video, like images and colors, are used as presentational elements, then they should be put in the CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/video-and-audio-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Natural curves</title>
		<link>http://chrisnager.com/natural-curves/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=natural-curves</link>
		<comments>http://chrisnager.com/natural-curves/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 19:36:58 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[border-radius]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=471</guid>
		<description><![CDATA[HAML .natural-curves .natural-curves-inner … Let your bordered outer div determine the background1 and its border-radius2 will put a natural curve on the inner div. If you set the background of the inner div, you will also need to set its &#8230; <a href="http://chrisnager.com/natural-curves/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="codepen" data-height="340" data-type="result" data-href="CFjpK" data-user="ChrisNager"><code></code></pre>
<p><script async src="http://codepen.io:/assets/embed/ei.js"></script></p>
<h1>HAML</h1>
<pre>
<code>.natural-curves
    .natural-curves-inner
        …</code>
</pre>
<p>Let your bordered outer <code>div</code> determine the background<sup>1</sup> and its <code>border-radius</code><sup>2</sup> will put a natural curve on the inner <code>div</code>.</p>
<p>If you set the background of the inner <code>div</code>, you will also need to set its <code>border-radius</code><sup>3</sup> and you will lose your natural curves.</p>
<h1>CSS</h1>
<pre>
<code>
.natural-curves {
    border: 0.5em solid;
    border-radius: 1.5em; /* 2 */
    background: lightblue; /* 1 */
    …
}
.natural-curves-inner {
    overflow: hidden;

/* 3 */
/*
    border-radius: 1em;
    background: burlywood;

*/
}</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/natural-curves/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My initials</title>
		<link>http://chrisnager.com/my-initials/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-initials</link>
		<comments>http://chrisnager.com/my-initials/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 19:35:10 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[codepen]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[my initials]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=455</guid>
		<description><![CDATA[As a fun little task for myself, I marked up my initials (CBPN) in a list and styled them around an ×. The main thing to take away from this example is that everything is em-based, so that changing the &#8230; <a href="http://chrisnager.com/my-initials/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="codepen" data-height="335" data-type="result" data-href="GtmJB" data-user="ChrisNager"><code></code></pre>
<p><script async src="http://codepen.io:/assets/embed/ei.js"></script></p>
<p>As a fun little task for myself, I marked up my initials (CBPN) in a list and styled them around an ×. The main thing to take away from this example is that everything is <code>em</code>-based, so that changing the <code>html</code> <code>font-size</code> will perfectly scale the entire project.</p>
<p>I encourage you to play around in my code and come up with your own variations.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/my-initials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Touchable textures with CSS &#8211; can you feel me?</title>
		<link>http://chrisnager.com/touchable-textures-with-css-can-you-feel-me/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=touchable-textures-with-css-can-you-feel-me</link>
		<comments>http://chrisnager.com/touchable-textures-with-css-can-you-feel-me/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 19:58:08 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[Future CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[haptics]]></category>
		<category><![CDATA[textures]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=264</guid>
		<description><![CDATA[Touch is the simplest and one of the most powerful forms of communication. In this article, I will take a look into the possible future of CSS, the presentation layer of the web. I will be exploring touchable textures and &#8230; <a href="http://chrisnager.com/touchable-textures-with-css-can-you-feel-me/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="intro-img"><a href="http://chrisnager.com/assets/touch-cat-2.png"><img src="http://chrisnager.com/assets/touch-cat-2.png" alt="Touchable cat drawing" title="Touchable cat" width="600" height="223"></a></p>
<h1 class="intro">Touch is the simplest and one of the most powerful forms of communication.</h1>
<p>In this article, I will take a look into the possible future of CSS, the presentation layer of the web. I will be exploring touchable textures and how they could be applied in CSS to texture-enabled devices. By textures, I&#8217;m referring to the feeling of three dimensional surfaces like, smooth or bumpy, applied to a two dimensional surface of a device (or future 3D surfaces). Though this type of technology may not be readily available today, it&#8217;s certainly fun to imagine how texture styles may be implemented.</p>
<p class="alert"><strong>Experimental code ahead.</strong> The following code doesn&#8217;t exist…yet.</p>
<p>My (rather crude) proposal is for a <code>texture</code> property in CSS:</p>
<pre>
<code>.surface {
    texture: smooth;
}</code>
</pre>
<p><span id="more-264"></span></p>
<p>Of course, we would need to include our browser specific versions: <img src='http://chrisnager.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre style="background:#eee">
<code>.surface {
    -webkit-texture: smooth;
     -khtml-texture: smooth;
       -moz-texture: smooth;
        -ms-texture: smooth;
         -o-texture: smooth;
            texture: smooth;
}</code>
</pre>
<h1>Properties</h1>
<p>Possible <code>texture</code> properties (most ranging from 0 to 1, similar to <code>opacity</code>):</p>
<pre>
<code>.surface {
    texture-temperature: cool | warm | 77°F | 25°C;
    texture-adhesion: 0.15;
    texture-hardness: 1;
    texture-roughness: 0.3;
    texture-malleability: 0.6;
    texture-viscosity: 0.75;
    texture-density: 0.3;
}</code>
</pre>
<p>In shorthand, you&#8217;d only include the properties that are necessary (similar to <code>transform</code> values):</p>
<pre>
<code>.surface {
    texture: temperature(25°C) adhesion(0.75) roughness(0.4);
}</code>
</pre>
<p>And store your custom <code>texture</code> for reuse (similar to @keyframes):</p>
<pre>
<code>
@texture grippy {
    texture: adhesion(1) roughness(0.5);
}

::-webkit-resizer {
    texture: grippy;
}</code>
</pre>
<h1>Pre-defined values</h1>
<p>The <code>texture</code> values would have standard, pre-defined value names as strings the same way we already have color values like <code>cadetblue</code> and transition values like <code>ease-in-out</code>.</p>
<pre>
<code>texture: smooth | course | grainy | sharp | raised | bumpy | sticky | fabric | glass | metallic | rubbery | depressed | detect* | inherit;</code>
</pre>
<p>*<code>detect</code> would choose the best texture based on the look of the element.</p>
<p>Browsers may handle these defaults differently, so I assume we could end up with vendor-prefixed values like <code>-webkit-smooth</code> as well.</p>
<hr />
<p>The ability to build out the 3D surfaces of your textures would be possible through the use of technologies like <code>WebGL</code>*, <code>svg3d</code>, and possibly <code>matrix3d</code> (similar to how the CSS <code>transform</code> property works).</p>
<p>*Texture could be implemented with WebGL something like <a href="http://www.webdev20.pl/skins/default/js/demos/3d_grapher/webgl_ploter.html">this</a>. <br /><i style="font-style:italic;opacity:0.9">[Credit goes to <a href="https://plus.google.com/118328547579245186440/posts">Małgorzata Jatczyk</a> for this awesome experiment].</i></p>
<h1>Enhance</h1>
<p>These styles would work perfectly when designing with progressive enhancement in mind because browsers that couldn&#8217;t read the <code>texture</code> property, would simply ignore it (just like <code>rgba</code> colors or <code>opacity</code>). The <code>texture</code> property could be feature-detected in JavaScript with something like <a href="http://modernizr.com/">Modernizr</a> to check if the device is able to apply textures. Apps that depend on touchable textures may need to offer other ways of handling functionality on non-texture-enabled devices.</p>
<pre>
<code>if (!Modernizr.textures) {
    // Non-texture-based solution here
}

.no-textures {
    /* Non-texture-based CSS solution here */
}</code>
</pre>
<h1>Putting <code>texture</code> to use</h1>
<p>These textures may start off being implemented in a rather dull way at first or considered more novelty than practical, but over time devices would most assuredly be able to render complex 3D textures. Here are some ways developers could use textures.</p>
<h2>Accessibility</h2>
<p>Touchable textures would open up a whole new level of accessibility. Everyday smartphones and tablets could become much more powerful assistive devices.</p>
<p>We could bring Braille to mobile devices:</p>
<pre>
<code>.assistive-touch-device {
    texture: smooth;
}
.assistive-touch-device-text {
    font-family: Braille;
    texture: raised*;
}</code>
</pre>
<p>*<code>raised</code> would represent a two dimensional texture that is raised slightly off the page like an embossed business card.</p>
<hr />
<p>Typing on your on-screen tablet keyboard:</p>
<style>
.home-row {
    margin-bottom: 2.125em;
    text-align: center;
}
.home-row .key {
    box-sizing: border-box;
    width: 2.5em;
    height: 2.5em;
    margin: 0.055em;
    border-width: 1px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    font: 1em sans-serif;
    text-align: center;
    color: rgba(0, 0, 0, 0.85);
    background: #f9f9f9;
}
.home-row .key:hover {
    background: #f3f3f3;
}
.home-row .f-key:after,
.home-row .j-key:after {
    content: "·";
    position: absolute;
    bottom: -0.2em;
    left: 1.02em;
}
</style>
<div class="home-row">
<button class="key">A</button><button class="key">S</button><button class="key">D</button><button class="key f-key">F</button><button class="key">G</button><button class="key">H</button><button class="key j-key">J</button><button class="key">K</button><button class="key">L</button><button class="key">;</button>
</div>
<pre>
<code>.key {
    …
    texture: smooth;
}
.key:active {
    texture: pressed;
}
.f-key:after,
.j-key:after {
    content: "·";
    …
    texture: raised;
}</code>
</pre>
<h2>Gaming</h2>
<p>Touchable textures in games would be pretty crazy.</p>
<p>Think about a game where the player rubs a metallic, somewhat adhesive surface until it reveals a smooth plastic texture that unveils a graphic or number, similar to how someone would scratch a lottery ticket to see if they&#8217;d won.</p>
<p>Or how riding on a sidewalk in a skateboarding game might be written:</p>
<pre>
<code>@texture concrete {
    texture: temperature(85°F) hardness(1) roughness(1);
}
@keyframes riding-on-a-sidewalk-square {
    0%,
    89%,
    91%,
    99% { texture: concrete; };
    90%,
    100% { texture: bumpy; }
}

.riding .sidewalk-square {
    animation: riding-on-a-sidewalk-square 1s;
}</code>
</pre>
<h2>Usability</h2>
<p>You could engage on a deeper emotional level with your users through the textures of your buttons:</p>
<pre>
<code>.btn-success {
    texture: temperature(warm) roughness(0);
}
.btn-danger {
    texture: temperature(cold) roughness(1);
}</code>
</pre>
<h1>Onward!</h1>
<p>My examples are simple implementations of my proposed <code>texture</code> property. My hope is by this point you&#8217;ve thought of many new ways CSS textures could be used and maybe better ways it could be implemented.</p>
<p>The advancement of the web lies in our hands, but more importantly in our imagination.</p>
<hr />
<p>EDIT: <a href="http://www.youtube.com/watch?v=g7fmAxOVOmk&#038;noredirect=1">Looks like touchable texture technology is on its way!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/touchable-textures-with-css-can-you-feel-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Further simplified hexcodes</title>
		<link>http://chrisnager.com/further-simplified-hexcodes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=further-simplified-hexcodes</link>
		<comments>http://chrisnager.com/further-simplified-hexcodes/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 03:24:55 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[Feature Requests]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hexcodes]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=229</guid>
		<description><![CDATA[[class^="color"] { margin: 1px 0; border-radius: 2px; padding: 0 6px; display: inline-block; color: white; background: #2faced; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset; } .color2 { background: black; } .color3 { background: #ff1166; } .color4 { background: #161616; &#8230; <a href="http://chrisnager.com/further-simplified-hexcodes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<style>
    [class^="color"] {
        margin: 1px 0;
        border-radius: 2px;
        padding: 0 6px;
        display: inline-block;
        color: white;
        background: #2faced;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
    }
    .color2 { background: black; }
    .color3 { background: #ff1166; }
    .color4 { background: #161616; }
    .color5 { background: #333; }
    .color6 { background: #777; }
    .color7 { background: #b4b4b4; }
    .color8 { background: #5d5d5d; }
</style>
<p>Hexadecimal codes, like <code class=color1>#2faced</code>, are interpreted as colors. <a href="https://twitter.com/ChrisNager/status/83651049558253568">For a long time now</a>, I&#8217;ve wanted the ability to further shorten hexcodes.</p>
<p>Take for example the hexcode for the color black. It can be written as <code class=color2>#000000</code> or <code class=color2>#000</code>. I think we should also be able to write <code class=color2>#0</code> to represent black.</p>
<p><span id="more-229"></span></p>
<p>To take this a step further, we know <code class=color3>#f16</code> is the shorthand for <code class=color3>#ff1166</code>, so why can&#8217;t <code class=color4>#16</code> be the shorthand for <code class=color4>#161616</code>?</p>
<p>In my ideal world:<br />
<code class=color5>#3</code> would be equivalent to <code class=color5>#333333</code>,<br />
<code class=color6>#7</code> would be equivalent to <code class=color6>#777777</code>,<br />
<code class=color7>#b4</code> would be equivalent to <code class=color7>#b4b4b4</code>,<br />
<code class=color8>#5d</code> would be equivalent to <code class=color8>#5d5d5d</code>,<br />
et cetera, et cetera.</p>
<p>This technique seems like an appropriate short(er)hand for hexcodes and would save a tiny bit of time and bytes.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/further-simplified-hexcodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box sizing for pseudo elements</title>
		<link>http://chrisnager.com/box-sizing-for-pseudo-elements/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=box-sizing-for-pseudo-elements</link>
		<comments>http://chrisnager.com/box-sizing-for-pseudo-elements/#comments</comments>
		<pubDate>Sun, 09 Sep 2012 22:37:26 +0000</pubDate>
		<dc:creator>ChrisNager</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://chrisnager.com/?p=207</guid>
		<description><![CDATA[Ever since I found out about the hidden gem box-sizing:border-box, I&#8217;ve used it on most all my projects. While fiddling around with border-box, I learned the * universal selector box-sizing declaration didn&#8217;t apply to my pseudo elements. So, to apply &#8230; <a href="http://chrisnager.com/box-sizing-for-pseudo-elements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I found out about the <a href="http://paulirish.com/2012/box-sizing-border-box-ftw/">hidden gem</a> <code>box-sizing:border-box</code>, I&#8217;ve used it on most all my projects. While fiddling around with <code>border-box</code>, I learned the <code>*</code> universal selector <code>box-sizing</code> declaration didn&#8217;t apply to my pseudo elements.</p>
<p>So, to apply <code>box-sizing:border-box</code> to <em>everthing</em>, use:</p>
<pre class="codepen" data-type="css" data-href="aJlFy" data-user="ChrisNager"><code>/* Base styles
   ------------------------------ */

*,
:before,
:after {
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}

/* ☃
   ------------------------------ */

.☃ {
    margin: 0 auto;
    padding: 8px;
    font-size: 2em;
    text-align: center;
    color: indianred;
    background: lightblue;
}
.☃:before,
.☃:after {
    content: &quot;☃&quot;;
    width: 100%;
    border: 8px solid;
    padding: 8px;
    display: block;
    background: seashell;
}</code></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<pre class="codepen" data-type="result" data-href="aJlFy" data-user="ChrisNager"><code></code></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p><span id="more-207"></span></p>
<p><b>EDIT:</b><br />
I see now that this technique has been mentioned before <a href="http://paulirish.com/2012/box-sizing-border-box-ftw/#comment-116128">a</a> <a href="http://coderwall.com/p/0qti4g">few</a> <a href="http://css-tricks.com/dont-overthink-it-grids/">times</a>.</p>
<p><em>However</em>, for the sake of brevity and saving a couple bytes, my suggestion is writing out <code>:before</code> and <code>:after</code> rather than <code>*:before</code> and <code>*:after</code> shown in the other examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisnager.com/box-sizing-for-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
