<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Impressive Webs</title>
	
	<link>http://www.impressivewebs.com</link>
	<description>Web Design Articles &amp; Tutorials. To make the web impressive.</description>
	<lastBuildDate>Mon, 20 May 2013 11:39:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ImpressiveWebs" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="impressivewebs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">ImpressiveWebs</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Using tabindex with :focus</title>
		<link>http://www.impressivewebs.com/using-tabindex-with-focus/</link>
		<comments>http://www.impressivewebs.com/using-tabindex-with-focus/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 22:38:52 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9323</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-04/focus-kitten.jpg" alt="Tabindex with :focus" width="184" height="184" class="article_image">For those who have studied web site accessibility, this is probably old hat. Admittedly, I haven't spent enough time thinking about accessibility, so this is one of those things I didn't even realize until recently. So shame on me. :)

Let's say you have the following page, with various elements, starting with maybe a form field:]]></description>
				<content:encoded><![CDATA[<p>For those who have studied web site accessibility, this is probably old hat. Admittedly, I haven&#8217;t spent enough time thinking about accessibility, so this is one of those things I didn&#8217;t even realize until recently. So shame on me. :)</p>
<p>Let&#8217;s say you have the following page, with various elements, starting with maybe a form field:</p>
<pre class="codepen" data-height="350" data-type="result" data-href="ynvut" data-user="impressivewebs" data-safe="true"><code></code><a href="http://codepen.io/impressivewebs/pen/ynvut">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>If you start with keyboard focus on the search input, then use the tab key to cycle through the elements, you&#8217;ll notice that the &#8220;focus&#8221; of the cursor goes from search field, to &#8220;Dummy link 1” (skipping the heading and paragraphs), to &#8220;Dummy link 2”, etc. To make it clear what&#8217;s focused, I&#8217;ve added a background color using the <code>:focus</code> pseudo-class.</p>
<p>Okay, simple enough. But what if you want to cycle through <em>all</em> the elements on the page? Easy, you just add <code>tabindex</code> attributes in the HTML to any element you want to receive focus:</p>
<pre class="codepen" data-height="350" data-type="result" data-href="cltdG" data-user="impressivewebs" data-safe="true"><code></code><a href="http://codepen.io/impressivewebs/pen/cltdG">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>Now when you cycle through the elements with the tab key, all the elements receive focus, including all the paragraphs, with the background color added for each.</p>
<p>But notice another thing that happens: Any of those elements will receive focus styles <strong>even if you click on them with the mouse</strong>.</p>
<p>This means you can do something like the following demo. This is as a pure CSS game called &#8220;Find the Kitten&#8221;:</p>
<pre class="codepen" data-height="1150" data-type="result" data-href="qnBlJ" data-user="impressivewebs" data-safe="true"><code></code><a href="http://codepen.io/impressivewebs/pen/qnBlJ">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>This uses the same technique as the previous demo, changing styles on focus, but with the <code>tabindex</code> values added to all the elements, the boxes are clickable.</p>
<p>With a little more creativity, and combining this with <a href="http://css3clickchart.com/">other new CSS features</a>, this could make for some interesting effects.</p>
<h2>Accessibility Concerns?</h2>
<p>I should stress that the techniques I&#8217;m using here are experimental and you should do some research on <code>tabindex</code> and <code>:focus</code> before you go crazy adding all sorts of elements on your pages that change styles when clicked/focused.</p>
<p>Again, this concept is probably not new to most experienced developers who have studied accessibility, but I thought it was interesting enough to write about.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9323" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/css3-transitions-without-hover/' rel='bookmark' title='CSS3 Transitions Without Using :hover'>CSS3 Transitions Without Using :hover</a></li>
<li><a href='http://www.impressivewebs.com/text-links-hover-states/' rel='bookmark' title='Options for Styling Text Links and Hover States'>Options for Styling Text Links and Hover States</a></li>
<li><a href='http://www.impressivewebs.com/backspace-back-button-autofocus/' rel='bookmark' title='Fixing Backspace Back Button Functionality When Using Autofocus'>Fixing Backspace Back Button Functionality When Using Autofocus</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=Jpl_TwHeMH8:bxF-_muZAlE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=Jpl_TwHeMH8:bxF-_muZAlE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=Jpl_TwHeMH8:bxF-_muZAlE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/Jpl_TwHeMH8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/using-tabindex-with-focus/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Fixing Backspace Back Button Functionality When Using Autofocus</title>
		<link>http://www.impressivewebs.com/backspace-back-button-autofocus/</link>
		<comments>http://www.impressivewebs.com/backspace-back-button-autofocus/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 10:27:13 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript & jQuery]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9263</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-04/google-autofocus.jpg" alt="Google Autofocus" width="184" height="184" class="article_image">Let's say you're viewing different pages in your browser, and in the midst of your browsing you decide to visit a Google's home page.

The cursor is blinking in the search field. This means the cursor has been automatically focused into the search field, either via JavaScript or using HTML5's <code>autofocus</code> attribute.]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s say you&#8217;re viewing different pages in your browser, and in the midst of your browsing you decide to visit Google&#8217;s home page. So you see this:</p>
<p><img src="http://cdn.impressivewebs.com/2013-04/google-homepage.gif" alt="Google home page" title="Google home page" width="680" height="303" class="wide_image wi_new"></p>
<p>Notice the blinking cursor. This means the cursor has been automatically focused into the search field, either via JavaScript or using HTML5&#8242;s <code>autofocus</code> attribute.</p>
<p>If you happen to change your mind about typing a search, and you want to go &#8220;back&#8221;, you can do one of two things. You can (1) use the back button in the browser, or (2) you can use the backspace key on your keyboard (on a Mac it&#8217;s the &#8220;delete&#8221; key).</p>
<p>If you decide to use the keyboard method, your experience will be broken, because when you&#8217;re inside a text field, the &#8220;backspace&#8221; key means &#8220;delete text&#8221;. So the browser will not go back in its history, as you would expect. And naturally, shift-backspace (which is forward in history) would likewise fail.</p>
<p>Personally, I&#8217;ve always found this annoying, and I&#8217;m glad <a href="http://www.sitepoint.com/dont-hijack-my-browser/">a person with a disability mentioned it</a>, because I decided to try to create a simple fix for this problem using JavaScript:</p>
<pre class="codepen" data-height="300" data-type="js" data-href="zkpjL" data-user="impressivewebs" data-safe="true"><code>var input = document.getElementById('field'),
    key;

input.onkeydown = function(e) {

  if (!input.value) {

    key = e.keyCode || e.charCode;

    if (key === 8 || key === 46) {

      if (!e.shiftKey) {
        history.back();
      } else {
        history.forward();
      }

    }

  }
 };</code><a href="http://codepen.io/impressivewebs/pen/zkpjL">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>The script does the following:</p>
<ul class="body_list">
<li>Look for keystrokes in the text field</li>
<li>Make sure the field is empty after the keystroke</li>
<li>Check if the key pressed is the backspace (8) or delete key (46)</li>
<li>If it is, check if the shift key is being pushed</li>
<li>Go back or forward in the browser history</li>
</ul>
<p>The script seems to work in every browser except IE8. And oddly, although I&#8217;ve added the ability to use shift-backspace (shift-delete on Mac) to go forward in browser history, IE10 doesn&#8217;t seem to recognize this shortcut like previous versions of IE seemed to do (if I remember correctly).</p>
<h2>Flaws</h2>
<p>Besides the IE flaws just mentioned, one of the flaws in this script is the fact that the keystroke that it looks for can be either backspace or delete (which ensures it works on PC and Mac). So the result of this is that if you push &#8220;delete&#8221; on a PC keyboard (which is a different button than &#8220;backspace&#8221;), it too will cause the history-back functionality to occur. But I don&#8217;t think that&#8217;s such a big deal, really.</p>
<p>Finally, the other flaw in this is that if someone deletes what they were typing in the search box and they hit backspace/delete one too many times, it will cause the history-back fuctionality to trigger. I started to try to figure out how to cancel the event once the user begins to type actual visible text, but couldn&#8217;t figure out how to do it. Maybe someone can <a href="http://codepen.io/impressivewebs/pen/zkpjL">fork the CodePen</a> and add that to it.</p>
<p>The demo seems to work fine on CodePen, but because because CodePen embeds <a href="http://codepen.io/impressivewebs/full/zkpjL">the full-page view</a> in an iframe, it seems a little unnatural, so I&#8217;ve provided a bare-bones demo to test instead, using the button below.</p>
<p>And obviously, if you click the demo button below, stay in the same tab, so you&#8217;ll have something to go &#8220;back&#8221; to.</p>
<div class="button_holder">
<ul class="button">
<li><a href="http://www.impressivewebs.com/google.com.html" title="View Demo">View Demo</a></li>
</ul>
</div>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9263" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/fixing-parent-child-opacity/' rel='bookmark' title='thatsNotYoChild.js &#8212; Fixing Parent-Child Opacity'>thatsNotYoChild.js &#8212; Fixing Parent-Child Opacity</a></li>
<li><a href='http://www.impressivewebs.com/html-single-link-button/' rel='bookmark' title='How Do You Mark Up A Single Link or Button?'>How Do You Mark Up A Single Link or Button?</a></li>
<li><a href='http://www.impressivewebs.com/gray-area-comment-spam/' rel='bookmark' title='Dealing With Gray-area Comment Spam'>Dealing With Gray-area Comment Spam</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=r1RNQ_Ynlak:IoXzkMpYWkM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=r1RNQ_Ynlak:IoXzkMpYWkM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=r1RNQ_Ynlak:IoXzkMpYWkM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/r1RNQ_Ynlak" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/backspace-back-button-autofocus/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Use HTML Comments to Indicate Pseudo-elements</title>
		<link>http://www.impressivewebs.com/html-comments-indicate-pseudo-elements/</link>
		<comments>http://www.impressivewebs.com/html-comments-indicate-pseudo-elements/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 10:00:52 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9247</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-03/pseudo-comments.jpg" alt="Use HTML Comments to Indicate Pseudo-Elements" width="184" height="184" class="article_image">At the recent W3Conf Nicolas Gallagher explained that although pseudo-elements have helped us add decorative content to our pages while keeping our HTML clean, this has led to some maintainability issues.

Developer tools can help to some degree, but oftentimes dynamically added content like pseudo-elements or extra elements added via JavaScript are initially harder to track down.

As Nicolas pointed out, the far-future improvement in this area is the Web Components spec, but I think this is something we can improve on right now.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-03/pseudo-comments.jpg" alt="Use HTML Comments to Indicate Pseudo-Elements" width="184" height="184" class="article_image">At the recent <a href="http://www.w3.org/conf/2013sf/">W3Conf</a> Nicolas Gallagher <a href="http://www.youtube.com/watch?v=XQWOKBBJ114#t=19m13s">explained</a> that although pseudo-elements have helped us add decorative content to our pages while keeping our HTML clean, this has led to some maintainability issues.</p>
<p>Developer tools can help to some degree, but oftentimes dynamically added content like pseudo-elements or extra elements added via JavaScript are initially harder to track down.</p>
<p>As Nicolas pointed out, the far-future improvement in this area is <a href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html">the Web Components spec</a>, but I think this is something we can improve on right now.</p>
<p>Let&#8217;s say we have the following CSS, using pseudo-elements:</p>
<pre name="code" class="php">
.exampleModule {
  float: left;
  border: solid 2px #ccc;
  position: relative;
}

.exampleModule:before {
  content: url(icon.png);
  float: left;
}

.exampleModule:after {
  content: url(corner.png);
  position: absolute;
  bottom: 0;
  right: 0;
}
</pre>
<p>The CSS is just illustrative, and really doesn&#8217;t matter for this example; it could be anything that uses one or more pseudo-elements. The main takeaway here is what you would see in the HTML:</p>
<pre name="code" class="html">
&lt;div class="exampleModule"&gt;
&lt;!-- pseudo: icon.png --&gt;
&lt;p&gt;content...&lt;/p&gt;
&lt;!-- pseudo: corner.png --&gt;
&lt;/div&gt;
</pre>
<p>Now you don&#8217;t have to view the CSS or inspect the element with your dev tools; as soon as you look at the HTML, you know that the decorative content (in this case the two images) is added via pseudo-elements.</p>
<p>The same principle can be applied to content that is injected via JavaScript, and I suppose you could also include HTML comments in modules to list the different states that the module could be in, as represented by classes in the CSS. But that&#8217;s a little more complicated, and could probably be a topic for another post.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9247" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/default-css-display-values-html-elements/' rel='bookmark' title='Default CSS Display Values for Different HTML Elements'>Default CSS Display Values for Different HTML Elements</a></li>
<li><a href='http://www.impressivewebs.com/css3-pseudo-class-expressions/' rel='bookmark' title='CSS3 Structural Pseudo-class Expressions Explained'>CSS3 Structural Pseudo-class Expressions Explained</a></li>
<li><a href='http://www.impressivewebs.com/empty-elements-css3-animation/' rel='bookmark' title='Dealing with Empty Elements in CSS3 Animations'>Dealing with Empty Elements in CSS3 Animations</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=hl-w1m6G0Is:lFbENQFa8mI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=hl-w1m6G0Is:lFbENQFa8mI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=hl-w1m6G0Is:lFbENQFa8mI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/hl-w1m6G0Is" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/html-comments-indicate-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>thatsNotYoChild.js — Fixing Parent-Child Opacity</title>
		<link>http://www.impressivewebs.com/fixing-parent-child-opacity/</link>
		<comments>http://www.impressivewebs.com/fixing-parent-child-opacity/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 23:08:51 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript & jQuery]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9201</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-03/parent-child.jpg" alt="Parent/Child sign" width="184" height="184" class="article_image">One of the posts on this website that consistently gets a significant amount of traffic (5000+ page views this month alone) is a ridiculous article I wrote that discusses how to make a child element not inherit the opacity setting of its parent.

As we all know, opacity property can be annoying in this area.

Basically, if a parent element has an opacity value set at, say, 0.5, all of its children will inherit that opacity setting, and there's no way to reverse that opacity on the child elements.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-03/parent-child.jpg" alt="Parent/Child sign" width="184" height="184" class="article_image">One of the posts on this website that consistently gets a significant amount of traffic (5000+ page views this month alone) is <a href="http://www.impressivewebs.com/css-opacity-that-doesnt-affect-child-elements/">a ridiculous article</a> I wrote that discusses how to make a child element not inherit the opacity setting of its parent.</p>
<p>As we all know, <a href="http://www.impressivewebs.com/css-opacity-reference/">CSS transparency</a> that uses the <a href="http://cssvalues.com/#opacity">opacity property</a> can be annoying in this area.</p>
<p>Basically, if a parent element has an opacity value set at, say, 0.5, all of its children will inherit that opacity setting, and there&#8217;s no way to reverse that opacity on the child elements.</p>
<p>That post I wrote discussed a hacky workaround where you actually remove the element from its parent, position it absolutely, then move it so it still appears in the same place it did when it was a child.</p>
<p>If you know anything about <a href="http://blog.teamtreehouse.com/css-positioning">CSS positioning</a>, then you know why this is not a great solution.</p>
<p>Nonetheless, I still get lots of traffic coming to that article not only from Google searches, but also from <a href="http://stackoverflow.com/questions/4997493/set-opacity-of-background-image-without-affecting-child-elements">various</a> <a href="http://stackoverflow.com/questions/5135019/css-opacity-only-to-background-color-not-the-text-on-it">Stack Overflow</a> <a href="http://stackoverflow.com/questions/5770341/i-do-not-want-to-inherit-the-child-opacity-from-the-parent-in-css">threads</a> that link to it.</p>
<p>So I decided to write a script that fixes this issue. But first, let&#8217;s settle a few things.</p>
<h2>The Best Way to Resolve This Issue</h2>
<p>I&#8217;m guessing that in more than 90% of cases, this is pretty much a non-issue. If you need transparency on a parent element, you can do it using a few different methods that avoid this parent-child opacity issue:</p>
<ul class="body_list">
<li>If it&#8217;s only a background color on the parent, use <a href="http://css3clickchart.com/?prop=rgba">RGBA</a> or <a href="http://css3clickchart.com/?prop=rgba">HSLA</a></li>
<li>If it&#8217;s a background image, use a transparent PNG</li>
<li>If you&#8217;re just desiring a &#8220;washed out&#8221; look for a color or background image or pattern, do it in your image editor, or sample the washed-out color you want and insert it with Hex or RGB in your CSS</li>
</ul>
<p>But hey, it&#8217;s fun to write polyfills and workarounds for these types of problems, and it does seem like this sort of thing is in demand, even if most developers are approaching the problem in the wrong way to begin with.</p>
<h2>Introducing thatsNotYoChild.js</h2>
<p>I realized that the workaround to get the child elements out of their parent and repositioned is not that crazy. So I wrote a script that does this exact thing automatically, but it&#8217;s much more effective than that original solution.</p>
<p>Here&#8217;s an embedded pen demonstrating thatsNotYoChild.js in action:</p>
<pre class="codepen" data-height="300" data-type="result" data-href="CyfED" data-user="impressivewebs" data-safe="true"><code></code><a href="http://codepen.io/impressivewebs/pen/CyfED">Check out this Pen!</a></pre>
<p><script async src="http://codepen.io/assets/embed/ei.js"></script></p>
<p>Go ahead, change the markup to anything you want inside the <code>#parent</code> element; it should work for anything you put in there.</p>
<p>You can view the code in the embedded CodePen, and here&#8217;s a step by step description of what it does:</p>
<ul class"body_list">
<li>Grab all child elements of the element that has the opacity setting, wrap them in a <code>&lt;div&gt;</code></li>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/DOM/Node.cloneNode">cloneNode</a> to clone the newly-wrapped child group</li>
<li>Place the new clone outside the parent element</li>
<li>Change the ID of the original group</li>
<li>Set the opacity of the original group to 0 (you can reduce the opacity of the children but you can&#8217;t raise it)</li>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/DOM/element.getBoundingClientRect">getBoundingRect()</a> (which works everywhere that&#8217;s relevant) to find the exact position and width of the original child group</li>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/DOM/element.style">element.style</a> to absolutely position and size the clone group using the values obtained from <code>getBoundingRect()</code></li>
<li>Use <a href="https://developer.mozilla.org/en-US/docs/DOM/window.onresize">window.onresize</a> to run the previous two steps every time the window is resized.</li>
</ul>
<p>Compared to the old article I wrote that fixed this issue with a CSS-only solution, this solution has a few advantages. First, although the child elements are absolutely positioned, taking them <a href="http://www.impressivewebs.com/css-things-that-dont-occupy-space/">out of the normal flow</a>, the space the child elements occupy is still occupied by the original child group, which isn&#8217;t visible due to having its opacity set to 0. The cloned group overlays the same space, making it appear as if it never moves, and the other elements on the page don&#8217;t reposition themselves since they are subject to the positioning of the original, now invisible, child group.</p>
<p>The other advantage is that this solution doesn&#8217;t require any changes to the markup, whereas that other CSS-only solution required that you change the markup.</p>
<p>To use the script, just call the function like this, passing in the ID of the parent element that has opacity set:</p>
<pre name="code" class="js">
thatsNotYoChild('parent');
</pre>
<h2>Feedback?</h2>
<p>I don&#8217;t know too much about the different DOM methods I used in this script. I&#8217;m guessing for example that <code>window.onresize</code> is not great for performance and repaints.</p>
<p>This was, more or less, a fun little hacky script that&#8217;s not too heavy so maybe someone will find it useful, assuming there are no major performance issues with it.</p>
<p>If you have any feedback on improvements to the code, or see any potential bugs or drawbacks, feel free to comment and/or fork it.</p>
<div class="button_holder">
<ul class="button">
<li><a href="http://codepen.io/impressivewebs/pen/CyfED" title="View Demo">View Demo</a></li>
</ul>
</div>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9201" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/textarea-auto-resize/' rel='bookmark' title='Textarea Auto Resize'>Textarea Auto Resize</a></li>
<li><a href='http://www.impressivewebs.com/image-tint-blend-css/' rel='bookmark' title='Image Tint With CSS'>Image Tint With CSS</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=bVQ5TOawtb8:_ey8ad15d2Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=bVQ5TOawtb8:_ey8ad15d2Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=bVQ5TOawtb8:_ey8ad15d2Y:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/bVQ5TOawtb8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/fixing-parent-child-opacity/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My Talk and Slides from jQueryTO</title>
		<link>http://www.impressivewebs.com/jquery-toronto-slides-video/</link>
		<comments>http://www.impressivewebs.com/jquery-toronto-slides-video/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 10:00:37 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[Roundups & Resources]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9162</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-03/jquery-toronto.jpg" alt="jQueryTO" title="jQueryTO" width="184" height="184" class="article_image">On March 2nd and 3rd, I attended and had the privilege of speaking at <a href="http://jqueryto.com/">jQueryTO</a>, Canada's first ever jQuery conference. It was a really cool experience, and was especially cool because I finally got to meet in person certain developers that I've respected from afar for some time, including Darcy Clarke (who organized it), Paul Irish, Addy Osmani, Alex Sexton, and Adam J. Sontag.

If you've been reading this blog for awhile now, then you know that I have little, if any, business speaking at a JavaScript conference. So I tried to keep things fairly simple for myself and proposed a talk where I could focus largely on CSS.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-03/jquery-toronto.jpg" alt="jQueryTO" title="jQueryTO" width="184" height="184" class="article_image">On March 2nd and 3rd, I attended and had the privilege of speaking at <a href="http://jqueryto.com/">jQueryTO</a>, Canada&#8217;s first ever jQuery conference. It was a really cool experience, and was especially cool because I finally got to meet in person certain developers that I&#8217;ve respected from afar for some time, including Darcy Clarke (who organized it), Paul Irish, Addy Osmani, Alex Sexton, and Adam J. Sontag.</p>
<p>If you&#8217;ve been reading this blog for awhile now, then you know that I have little, if any, business speaking at a JavaScript conference. So I tried to keep things fairly simple for myself and proposed a talk where I could focus largely on CSS.</p>
<p>The conference didn&#8217;t have any official recording going on, thus any footage of the talks is rare and not great quality. So for archival purposes, I&#8217;ve recorded my own talk with slides as a screencast, embedded below. I did the screencast from memory, and my actual talk probably went a lot smoother than this screencast, so forgive some of the stutter-filled moments in this one. :)</p>
<p>A lot of what&#8217;s in this talk is stuff I&#8217;ve blogged about here and elsewhere, meaning it&#8217;s nothing ground-breaking for most of my readers. But it was a nice way to get my feet wet in the conference speaking arena.</p>
<p>In addition to the screencast, I&#8217;ve also embedded the <a href="https://speakerdeck.com/impressivewebs/when-jquery-and-css3-collide">slides from Speaker Deck</a> and included all the links referenced in the slides.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/bwo2Dtq5eGQ" frameborder="0" allowfullscreen></iframe></p>
<p><script async class="speakerdeck-embed" data-id="b6e1ed20640d01301b1e12313b100525" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script></p>
<p>These links start after the intro where I briefly cover who I am, etc:</p>
<ul class="body_list">
<li><a href="http://api.jquery.com/animate/">jQuery .animate()</a></li>
<li><a href="http://modernizr.com/docs/#prefixed">Modernizr.prefixed()</a></li>
<li><a href="http://www.andismith.com/blog/2012/02/modernizr-prefixed/">Modernizr Prefixed by Andi Smith</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/transitionend">transitionend on MDN</a></li>
<li><a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/web-anim/index.html">Web Animations 1.0</a></li>
<li><a href="http://people.mozilla.org/~bbirtles/web-animations/presentation/web-animations.html#(1)">Web Animations (slide deck)</a></li>
<li><a href="http://softwareas.com/classy-html-a-speculative-design-pattern-about-classes-and-composition">&#8220;Classy HTML&#8221;: A Speculative Design Pattern about Classes and Composition</a></li>
<li><a href="http://daneden.me/animate/">Animate.css</a></li>
<li><a href="https://github.com/daneden/animate.css">Animate.css on GitHub</a></li>
<li><a href="http://daneden.me/animate/build/">Animate.css custom build page</a></li>
<li><a href="http://dev.w3.org/csswg/css3-transitions/">CSS Transitions specification on W3C</a></li>
<li><a href="http://www.impressivewebs.com/css3-transitions-without-hover/">CSS Transitions Without Using :hover</a></li>
<li><a href="http://css-tricks.com/different-transitions-for-hover-on-hover-off/">Different Transitions for Hover On / Hover Off</a></li>
<li><a href="http://blog.alexmaccaw.com/css-transitions">All you need to know about CSS Transitions</a></li>
<li><a href="http://www.impressivewebs.com/css-things-that-dont-occupy-space/">CSS Things That Don&#8217;t Occupy Space</a></li>
<li><a href="http://www.jankfree.com/">Jank-free</a></li>
<li><a href="http://www.jankfree.com/jank-busters-io/index.html#1">Jank Busters (slides)</a></li>
<li><a href="http://www.youtube.com/watch?v=hAzhayTnhEI">Jank Busters: Building Performant Web Apps (Video)</a></li>
<li><a href="http://dl.dropbox.com/u/70775642/talks/performance/jqueryto/slides/index.html#1">Gone in 60 Frames Per Second (Addy&#8217;s slides)</a></li>
<li><a href="https://speakerdeck.com/ariya/fluid-user-interface-with-hardware-acceleration">Fluid User Interface with Hardware Acceleration (slides)</a></li>
<li><a href="http://www.youtube.com/watch?v=gTHAn-nkQnI">Fluid User Interface with Hardware Acceleration (video)</a></li>
</ul>
<p>Links from the start of the presentation (&#8220;Who is This Guy?&#8221;):</p>
<ul class="body_list">
<li><a href="http://www.sitepoint.com/books/htmlcss1/">HTML5 and CSS3 for the Real World</a></li>
<li><a href="http://www.sitepoint.com/books/cssant4/">The CSS3 Anthology</a></li>
<li><a href="http://www.amazon.com/Learning-CSS3-Animations-Transitions-Hands/dp/0321839609/">Learning CSS3 Animations and Transitions</a></li>
<li><a href="http://www.smashingmagazine.com/author/louis-lazaris/">My author page on Smashing Magazine</a></li>
<li><a href="http://www.sitepoint.com/author/louis-lazaris1/">My author page on SitePoint</a></li>
<li><a href="http://blog.teamtreehouse.com/author/lazaris">My author page on Treehouse Blog</a></li>
<li><a href="http://cssvalues.com/">CSS Values</a></li>
<li><a href="http://css3clickchart.com/" title="CSS3 Click Chart">CSS3 Click Chart</a></li>
</ul>
<p>Image credits:</p>
<ul class="body_list">
<li>Screen grab of <a href="http://www.youtube.com/watch?v=N9oxmRT2YWw">Baby Emerson</a></li>
<li><a href="http://wendysathome.blogspot.ca/2012/07/sour-cream-and-chives-potato.html">Baked potato</a></li>
<li><a href="http://daisybrand.com/products/sour-cream.aspx">Daisy brand sour cream</a></li>
<li><a href="http://www.savoryspiceshop.com/spices/chivescal.html">Chives</a></li>
</ul>
<p>If you want footage, slides, or notes from any of the other talks:</p>
<ul class="body_list">
<li><a href="http://svinkle.github.com/jqueryto-2013-speaker-notes/">jQueryTO 2013 Speaker Notes</a></li>
<li><a href="https://jqueryto.hackpad.com/jQueryTO-Notes-Index-cfLWHWWSWPh">jQueryTO Notes Index</a></li>
<p></u></p>
<p>Here&#8217;s a photo of the t-shirt every attendee got, along with some promotional stuff:</p>
<p><img src="http://cdn.impressivewebs.com/2013-03/jquery-to-swag.jpg" alt="jQueryTO Swag and promo stuff" title="jQueryTO Swag and promo stuff" width="680" height="453" class="wide_image wi_new"></p>
<p>Finally, for more links to slides and notes from the conference, <a href="http://svinkle.github.com/jqueryto-2013-speaker-notes/">Scott Vinkle has put a list together</a>. Enjoy.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9162" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/css3-transitions-javascript/' rel='bookmark' title='Triggering CSS3 Transitions With JavaScript'>Triggering CSS3 Transitions With JavaScript</a></li>
<li><a href='http://www.impressivewebs.com/new-book-css3-animations/' rel='bookmark' title='New Book: Learning CSS3 Animations'>New Book: Learning CSS3 Animations</a></li>
<li><a href='http://www.impressivewebs.com/animating-css3-gradients/' rel='bookmark' title='Animating CSS3 Gradients'>Animating CSS3 Gradients</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=sT2PD-p_uFo:4kGMSBsv9B4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=sT2PD-p_uFo:4kGMSBsv9B4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=sT2PD-p_uFo:4kGMSBsv9B4:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/sT2PD-p_uFo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/jquery-toronto-slides-video/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Modular CSS with Media Queries and Sass</title>
		<link>http://www.impressivewebs.com/modular-css-media-queries-sass/</link>
		<comments>http://www.impressivewebs.com/modular-css-media-queries-sass/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 10:00:44 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[Responsive Web Design]]></category>
		<category><![CDATA[Sass]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9152</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-03/modular-css-mq.jpg" alt="Modular blocks" width="184" height="184" class="article_image">Most developers nowadays are recognizing that if you're developing large applications that have different views and states, it is best to take a modular or object-oriented approach to your CSS development.

When you throw media queries into the mix, however, the you can lose some of the benefits of modularity -- code that's easy to read, update, and maintain.

Let's look at different ways we can write our media queries, starting with what might be the most common approach -- especially with those not yet using a preprocessor.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-03/modular-css-mq.jpg" alt="Modular blocks" width="184" height="184" class="article_image">Most developers nowadays are recognizing that if you&#8217;re developing large applications that have different views and states, it is best to take a modular or <a href="http://coding.smashingmagazine.com/2011/12/12/an-introduction-to-object-oriented-css-oocss/">object-oriented</a> approach to your CSS development.</p>
<p>When you throw media queries into the mix, however, the you can lose some of the benefits of modularity &#8212; code that&#8217;s easy to read, update, and maintain.</p>
<p>Let&#8217;s look at different ways we can write our media queries, starting with what might be the most common approach &#8212; especially with those not yet using a preprocessor.</p>
<h2>The Common Approach</h2>
<p>To demonstrate what I think the majority of developers have done with media queries up to this point, here&#8217;s a simple example:</p>
<pre name="code" class="css">
.box-module {
  float: left;
  background: #ccc;
  margin-bottom: 1.2em;
}

.some-other-module {
  border: solid 4px #222;
  padding: 1.2em;
  margin-bottom: 1.2em;
}

/* ... other non-media query styles would go here ... */

@media screen and (max-width: 720px) {
  .box-module {
    float: none;
    clear: both;
    margin-bottom: .5em;
  }

  .some-other-module {
    border: solid 2px #222;
    padding: .8em;
    margin-bottom: .5em;
  }
}

@media screen and (max-width: 320px) {
  .box-module {
    margin-bottom: .2em;
  }

  .some-other-module {
    padding: .2em;
    margin-bottom: .2em;
  }
}

/* ... other media query styles would go here ... */
</pre>
<p>In the first two rule sets in this example, we have two separate elements on the page styled without media queries. (As a side point, those first two rule sets could be our <a href="http://www.abookapart.com/products/mobile-first">mobile first</a> styles, but it really doesn&#8217;t matter for the purpose of this theoretical example.)</p>
<p>After we declare those primary styles on our two elements, we then declare our media queries, repeating the same selectors, but with altered styles to suit the <a href="http://www.w3.org/TR/css3-mediaqueries/#media1">media features</a> defined in the media queries.</p>
<p>The key part to take note of here is how this would look if we had thousands of lines of code. If that were the case, the media query styles that apply to the same modules would be significantly separated from the original styles for those same elements. Not ideal, especially when you&#8217;re trying to keep related chunks of CSS together.</p>
<h2>A More Modular Approach</h2>
<p>The purpose of modularizing our CSS is to help it become much more flexible and scalable, but also to help make it easier to read and easier to maintain. As we can see from the previous example, that approach (where you throw all your media queries at the bottom of the stylesheet) can, to some extent, hinder maintainability.</p>
<p>Let&#8217;s rewrite the example from above using a more modular approach:</p>
<pre name="code" class="css">
.box-module {
  float: left;
  background: #ccc;
  margin-bottom: 1.2em;
}

@media screen and (max-width: 720px) {
  .box-module {
    float: none;
    clear: both;
    margin-bottom: .5em;
  }
}

@media screen and (max-width: 320px) {
  .box-module {
    margin-bottom: .2em;
  }
}

.some-other-module {
  border: solid 4px #222;
  padding: 1.2em;
  margin-bottom: 1.2em;
}

@media screen and (max-width: 720px) {
  .some-other-module {
    border: solid 2px #222;
    padding: .8em;
    margin-bottom: .5em;
  }
}

@media screen and (max-width: 320px) {
  .some-other-module {
    padding: .2em;
    margin-bottom: .2em;
  }
}
</pre>
<p>This might seem a bit odd and counterproductive to those who are accustomed to putting their media queries at the bottom of their CSS file. This approach is discussed as an option in <a href="https://smacss.com/book">Jonathan Snook&#8217;s book on modular CSS</a>, where he discusses <a href="https://smacss.com/book/state#media">changing state with media queries</a>.</p>
<p>Even before I started reading Jonathan&#8217;s book, I&#8217;ve considered this approach, but pretty much immediately discarded the thought for probably the same reason that many of you are cringing at it right now: The fact that this clearly goes against the DRY (Don&#8217;t Repeat Yourself) principle.</p>
<h2>Pros and Cons</h2>
<p>As we&#8217;ll see in the following sections, if you&#8217;re using Sass, the repetition becomes less of a factor and, from what I can tell, many developers are adopting this method.</p>
<p>But first, let&#8217;s consider the pros and cons of this approach for pure CSS that&#8217;s not using Sass.</p>
<p><strong>Cons:</strong></p>
<ul class="body_list">
<li>Lots of repetition, which modular CSS discourages</li>
<li>More code, which could amount to hundreds of extra lines, thus larger files</li>
<li>Could be confusing to future maintainers, especially if not well documented</li>
<li>If you change a single media query state (e.g. &#8220;max-width: 720px&#8221;), you have to change it for all modules</li>
</ul>
<p><strong>Pros:</strong></p>
<ul class="body_list">
<li>Easier to read/understand/maintain for the original developer(s)</li>
<li>Could be much easier to read/understand for future maintainers, especially if well documented</li>
<li>Easier to write the initial code (more on this below)</li>
</ul>
<h2>Resolving Some of the Cons</h2>
<p>To purists, the cons may seem like big problems. But I don&#8217;t think they&#8217;re as big as they seem, even though they may appear to outweigh the pros.</p>
<p>First, I&#8217;m not concerned about the larger amount of code. If I&#8217;m minifying and gzip&#8217;ing, the difference in code quantity will be negligible.</p>
<p>Second, as suggested by the final “pro&#8221; point, if you&#8217;re writing your media query for a module right next to the initial styles for the module itself, I believe this will make it significantly easier when debugging that particular part of the code.  Since you have all the different styles for a particular module together &#8212; including all the different state changes via media queries &#8212; you&#8217;ll quickly be able to make any changes and won&#8217;t have to put off debugging the same module again at smaller breakpoints.</p>
<h2>Modular Media Queries with Sass</h2>
<p>When you factor in a preprocessor like Sass, this sort of thing becomes exponentially easier. If you&#8217;re not familiar with some of Sass&#8217;s media query-specific capabilities, it&#8217;s worth checking out <a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#media">that part of their documentation</a>, which talks about doing this exact thing.</p>
<p>So let&#8217;s rewrite our example from above using Sass with nesting and variables:</p>
<pre name="code" class="css">
$media: screen;
$feature: max-width;
$value: 720px;
$value2: 320px;

.box-module {
  float: left;
  background: #ccc;
  margin-bottom: 1.2em;

  @media #{$media} and ($feature: $value) {
    float: none;
    clear: both;
    margin-bottom: .5em;
  }

  @media #{$media} and ($feature: $value2) {
    margin-bottom: .2em;
  }

}

.some-other-module {
  border: solid 4px #222;
  padding: 1.2em;
  margin-bottom: 1.2em;

  @media #{$media} and ($feature: $value) {
    border: solid 2px #222;
    padding: .8em;
    margin-bottom: .5em;
  }

  @media #{$media} and ($feature: $value2) {
    padding: .2em;
    margin-bottom: .2em;
  }

}
</pre>
<p>Here, in addition to variables, we&#8217;re using Sass&#8217;s nesting capabilities, which don&#8217;t require repeating the selector inside the media query block. This will compile to basically what we did in the Sass-less modular example above.</p>
<p>But we&#8217;re not finished yet. Let&#8217;s make one final improvement to this code, using a <a href="http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html#320_10_august_2012">fairly new Sass feature</a>.</p>
<h2>Modular Media Queries Using Sass with @content</h2>
<p>We&#8217;re going to improve on this even more by using Sass&#8217;s ability to <a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content">pass content blocks to a mixin</a>.</p>
<p>And I should point out that this is nothing new; the official Sass blog <a href="http://thesassway.com/intermediate/responsive-web-design-in-sass-using-media-queries-in-sass-32">discussed this</a> shortly before Sass 3.2 was released, and a few other blogs <a href="http://css-tricks.com/media-queries-sass-3-2-and-codekit/">have</a> <a href="http://jeffcroft.com/blog/2012/mar/02/implementing-responsive-design/">discussed</a> the benefits of using Sass to keep media query styles near the styles they override.</p>
<p>Here&#8217;s our updated code using Sass&#8217;s <code>@content</code> directive:</p>
<pre name="code" class="css">
$media: screen;
$feature: max-width;
$value: 720px;
$value2: 320px;

@mixin modular-mq($breakpoint) {
  @if $breakpoint == medium {
    @media (#{$media} and $feature: $value) { @content; }
  }
  @else if $breakpoint == small {
    @media (#{$media} and $feature: $value2) { @content; }
  }
}

.box-module {
  float: left;
  background: #ccc;
  margin-bottom: 1.2em;

  @include modular-mq(medium) {
    float: none;
    clear: both;
    margin-bottom: .5em;
  }

  @include modular-mq(small) {
    margin-bottom: .2em;
  }

}

.some-other-module {
  border: solid 4px #222;
  padding: 1.2em;
  margin-bottom: 1.2em;

  @include modular-mq(medium) {
    border: solid 2px #222;
    padding: .8em;
    margin-bottom: .5em;
  }
 
  @include modular-mq(small) {
    padding: .2em;
    margin-bottom: .2em;
  }
}
</pre>
<p>The examples with the variables and whatnot are not necessarily going to be done like that. You can hardcode the values right into the mixin, or you could have some <a href="http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#control_directives">conditional logic</a> that decides what the values will be. This is more or less a theoretical example.</p>
<h2>Conclusion</h2>
<p>Even with the two Sass examples, you&#8217;re still, to some extent, repeating your media query breakpoints for every selector that needs an override. So I can understand if many developers don&#8217;t like this approach.</p>
<p>Overall, I think the concept of keeping related styles near each other is much more in line with what we like to see in CSS and especially in modular or OOCSS. I always find it annoying when I have to sift through two different parts of a stylesheet to make a change to a single element on the page &#8212; a problem that has occurred much more often with the advent of media queries. I think this approach would resolve this type of thing.</p>
<p>I should also mention that there are some projects that aim to help in this area including <a href="https://github.com/jeremyworboys/Sassy-Media/">Sassy Media</a>, <a href="http://susy.oddbird.net/">Susy</a>, <a href="http://paranoida.github.com/sass-mediaqueries/">sass-mediaqueries</a> and probably others that I haven&#8217;t yet seen. (Update: <a href="https://twitter.com/ScottKellum/status/311491569104596993">Scott Kellum</a> tweeted to me about <a href="http://breakpoint-sass.com/">Breakpoint</a>, which is worth checking out just for the <cite>Point Break</cite> movie homage.)</p>
<p>So how has everyone been doing this sort of thing? Do you mind having your media queries scattered throughout your code, repeating the same queries for different selectors?</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9152" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/sass-on-windows/' rel='bookmark' title='Setting Up Sass on Windows'>Setting Up Sass on Windows</a></li>
<li><a href='http://www.impressivewebs.com/sass-on-windows-with-scout-app/' rel='bookmark' title='Sass on Windows with Scout App'>Sass on Windows with Scout App</a></li>
<li><a href='http://www.impressivewebs.com/when-to-avoid-descendant-selector/' rel='bookmark' title='When to Avoid the Descendant Selector'>When to Avoid the Descendant Selector</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=MtdVsp8Fs2U:OibrN20QD0k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=MtdVsp8Fs2U:OibrN20QD0k:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=MtdVsp8Fs2U:OibrN20QD0k:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/MtdVsp8Fs2U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/modular-css-media-queries-sass/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>When to Avoid the Descendant Selector</title>
		<link>http://www.impressivewebs.com/when-to-avoid-descendant-selector/</link>
		<comments>http://www.impressivewebs.com/when-to-avoid-descendant-selector/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 11:00:16 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9054</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-02/descendant-selector.jpg" alt="Descendant Ducks crossing" title="Descendant Ducks crossing" width="184" height="184" class="article_image">Those of us who have started using modular or object-oriented CSS principles have learned to avoid, as much as possible, the use of the descendant selector (or, more accurately, the descendant combinator).

A selector that uses the descendant combinator looks like this:]]></description>
				<content:encoded><![CDATA[<p>Those of us who have started using modular or object-oriented CSS principles have learned to avoid, as much as possible, the use of the descendant selector (or, more accurately, the <a href="http://dev.w3.org/csswg/selectors3/#descendant-combinators">descendant combinator</a>).</p>
<p>A selector that uses the descendant combinator looks like this:</p>
<pre name="code" class="css">
.sidebar p  {
    color: hotpink;
    font-size: 3em;
}
</pre>
<p>Everything you see before the opening curly brace is the selector. The combinator in this case is the space character. <a href="http://dev.w3.org/csswg/selectors3/#combinators">There are other combinators</a>, too. But in this case, the selector uses the descendant combinator.</p>
<p>Now that we have a technical understanding of the selector itself, let&#8217;s discuss what to keep in mind when deciding to use this selector.</p>
<h2>Why is the Descendant Selector Restrictive?</h2>
<p>To understand why the descendant selector can cause problems, look at the example I used above. Those styles are limited not only to paragraph elements, but on paragraph elements that are children of an element with a class of &#8220;sidebar&#8221;.</p>
<p>That&#8217;s pretty strict. This limits what you can do with those styles. You can&#8217;t reuse those styles, so they&#8217;re basically stuck in that context.</p>
<p>This is outlined in the <a href="https://github.com/stubbornella/oocss/wiki">OOCSS wiki</a>, when discussing the separation of &#8220;container and content&#8221;.</p>
<h2>Does OOCSS Discourage Use of the Descendant Selector?</h2>
<p>This question is covered in the <a href="https://github.com/stubbornella/oocss/wiki/faq#wiki-descendentSelectors">OOCSS FAQ</a>. Part of the answer there reads:</p>
<blockquote><p>
No&#8211;descendant selectors are not discouraged, but putting them too high in the DOM tree is.
</p></blockquote>
<p>So the idea here is that you avoid the descendant selector where it will cause unnecessary restrictions, specifically &#8220;high in the DOM tree&#8221;. But you shouldn&#8217;t avoid it altogether (as I&#8217;m sure many of us have discovered, since it&#8217;s impractical not to use it at all).</p>
<p>Nicole Sullivan&#8217;s <a href="http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/">media object</a> is a good example of an OOCSS module that uses the descendant selector abundantly, but not in a restrictive manner.</p>
<p>So, by all means, use the descendant combinator in your selectors. But avoid examples like the following:</p>
<pre name="code" class="css">
.header p { }
.container div { }
.sidebar h2 { }
</pre>
<p>In these examples, which are using elements high up on the DOM tree, these styles are not reusable, so they could unnecessarily bloat your code.</p>
<h2>No Dogma Here</h2>
<p>These are suggestions, not dogma. I realize that not every project and circumstance is the same. So do whatever you need to do to solve your current coding problems.</p>
<p>If that means using some of the principles of modular CSS, then go for it. Even if you&#8217;re not too strict about these rules, I think keeping in mind the spirit behind them will make you a better CSS developer in the long run.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9054" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/css-specificity-irrelevant/' rel='bookmark' title='CSS Specificity Should Be (Mostly) Irrelevant'>CSS Specificity Should Be (Mostly) Irrelevant</a></li>
<li><a href='http://www.impressivewebs.com/avoid-nonsemantic-classes/' rel='bookmark' title='Why Avoid Non-semantic Classes? Because They&#8217;re Non-semantic!'>Why Avoid Non-semantic Classes? Because They&#8217;re Non-semantic!</a></li>
<li><a href='http://www.impressivewebs.com/centered-heading-horizontal-line/' rel='bookmark' title='Centered Heading Overlaying a Horizontal Line with CSS'>Centered Heading Overlaying a Horizontal Line with CSS</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=aPsmNu0rLsU:QWoDhTAIg54:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=aPsmNu0rLsU:QWoDhTAIg54:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=aPsmNu0rLsU:QWoDhTAIg54:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/aPsmNu0rLsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/when-to-avoid-descendant-selector/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>JavaScript ‘this’ in Different Contexts</title>
		<link>http://www.impressivewebs.com/javascript-this-different-contexts/</link>
		<comments>http://www.impressivewebs.com/javascript-this-different-contexts/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 11:00:35 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[JavaScript & jQuery]]></category>
		<category><![CDATA[Web Design Tutorials]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=9003</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-01/javascript-this.jpg" alt="JavaScript this" title="JavaScript this" width="184" height="184" class="article_image">JavaScript has a reserved keyword called <code>this</code> that references something different depending on where you are in a JavaScript program.

In this post I'm going to summarize, by example, some different contexts and discuss what "this" would represent in each case. Note that all of these examples assume you're developing client-side JavaScript in a browser.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-01/javascript-this.jpg" alt="JavaScript this" title="JavaScript this" width="184" height="184" class="article_image">JavaScript has a reserved keyword called <code>this</code> that references something different depending on where you are in a JavaScript program.</p>
<p>In this post I&#8217;m going to summarize, by example, some different contexts and discuss what &#8220;this&#8221; would represent in each case. Note that all of these examples assume you&#8217;re developing client-side JavaScript in a browser.</p>
<h2>In the Global Context</h2>
<p>What happens if you reference <code>this</code> in the global context (i.e., not inside any function)?</p>
<pre name="code" class="js">
console.log(this === window); // true
</pre>
<p>You can test this on any page in your dev tools by typing that line into the console.</p>
<p>As that code demonstrates, <code>this</code> in the global context refers to the <code>window</code> object. Look at the following code and the subsequent outputs:</p>
<pre name="code" class="js">
this.message = "Check this out.";
window.message = "Check this out.";

console.log(this.message); // "Check this out."
console.log(window.message); // "Check this out."
console.log(message); // "Check this out."
</pre>
<p>You can view this code in action <a href="http://jsbin.com/ofuvox/1/edit">using this JS Bin</a>.</p>
<p>So what&#8217;s going on here? The first two lines are doing the exact same thing &#8212; creating a global variable called &#8220;message&#8221; and setting its value to &#8220;Check this out.&#8221; This fact is demonstrated by the three console messages that follow, all showing the same result.</p>
<h2>In Function Context</h2>
<p>So what happens when you refer to <code>this</code> in the context of a function, or closure?</p>
<p>In a simple example with no futher nesting of functions, it will depend on whether you&#8217;re using strict mode:</p>
<pre name="code" class="js">
function checkThisOut () {
  console.log(this === window); // true
  console.log(this); // object global
}

checkThisOut();
</pre>
<p><a href="http://jsbin.com/erehus/1/edit">JS Bin example</a></p>
<p>As you can see, nothing&#8217;s changed from the global context (i.e. <code>this</code> still references the window object). Now let&#8217;s try in strict mode:</p>
<pre name="code" class="js">
function checkThisOut () {
  "use strict";
  console.log(this === window); // false
  console.log(this); // undefined
}

checkThisOut();
</pre>
<p><a href="http://jsbin.com/ayibuv/1/edit">JS Bin demo</a></p>
<p>If I understand correctly,  <a href="http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/">as Nicholas Zakas points out</a>, the behaviour shown in the &#8220;use strict&#8221; example is in order to prevent accidental globals. There could be more to it that I&#8217;m not fully understanding, but it seems that&#8217;s the main reason for the difference here.</p>
<h2>In a Module Pattern</h2>
<p>Recently I discussed <a href="http://www.impressivewebs.com/my-current-javascript-design-pattern/">the module pattern I&#8217;m currently using</a> when writing JavaScript.</p>
<p>Let&#8217;s look at what <code>this</code> references in the context of such a pattern:</p>
<pre name="code" class="js">
var s,
    PrimaryNameSpace = {

        settings : {
            first: true,
            second: false,
            foo: 'bar'
        },

        init: function () {
            console.log(this); // references PrimaryNameSpace
        },

        nextMethod: function () {
        },

        anotherMethod: function () {
        }

    };

PrimaryNameSpace.init();
</pre>
<p><a href="http://jsbin.com/ifomiq/1/edit">JS Bin demo</a></p>
<p>In the module pattern context, inside any of the individual methods (that is, the functions), <code>this</code> will reference the entire module. In fact, if you view the console message created inside the <code>init()</code> method in your developer tools, you&#8217;ll see something like the following:</p>
<p><img src="http://cdn.impressivewebs.com/2013-01/module-this.jpg" alt="JavaScript this inside the module pattern" title="JavaScript this inside the module pattern" width="680" height="179" class="wide_image wi_new"></p>
<p>The console shows you an object (the namespace, or module), then you can drill down into the object to view the different methods, as well as all the values defined in the <code>settings</code> object.</p>
<p>Thus, inside the <code>init()</code> method, you can reference the modules and settings using <code>this</code> in the following manner:</p>
<pre name="code" class="js">
/* ... other code here ...*/

        init: function () {
            s = this.settings;
            this.nextMethod();
            this.anotherMethod();
            console.log(s);            
        },

/* ... other code here ...*/

PrimaryNameSpace.init();
</pre>
<p><a href="http://jsbin.com/acubar/1/edit">JS Bin demo</a></p>
<p>Using <code>this</code> to reference the other methods and the settings prevents us from having to write the references in long form. The following would be equivalent to what is written above:</p>
<pre name="code" class="js">
/* ... other code here ...*/

        init: function () {
            s = PrimaryNameSpace.settings;
            PrimaryNameSpace.nextMethod();
            PrimaryNameSpace.anotherMethod();
            console.log(s);
        },

/* ... other code here ...*/
</pre>
<p><a href="http://jsbin.com/arebux/1/edit">JS Bin demo</a></p>
<p>And in both cases, the console message would show:</p>
<p><img src="http://cdn.impressivewebs.com/2013-01/module-settings.jpg" alt="The settings object in the module pattern" title="The settings object in the module pattern" width="680" height="366" class="wide_image wi_new"></p>
<h2>What About a Nested Function?</h2>
<p>If however, you have an anonymous function inside one of the methods, then the value of <code>this</code> changes, and the module object is no longer accessible via <code>this</code>. So the long form syntax would be necessary, as shown here:</p>
<pre name="code" class="js">
/* ... other code here ...*/

        init: function () {
            s = this.settings;
            (function () {
              this.nextMethod();
              // [object Window] has no method 'nextMethod'
            })();
        },

/* ... other code here ...*/
</pre>
<p><a href="http://jsbin.com/ejihan/1/edit">JS Bin demo</a></p>
<p>The comment I&#8217;ve inserted in the code above displays the message from the console, which demonstrates that inside the anonymous function, <code>this</code> is a reference to the global &#8220;window&#8221; object, rather than being a reference to the <code>PrimaryNameSpace</code> object.</p>
<p>And, as we saw earlier, using strict mode would make <code>this</code> undefined, rather than a reference to the global object.</p>
<h2>Summing Up</h2>
<p>If nothing else, this post should demonstrate that using <code>this</code> can be a useful shortcut. But all the while, keep in mind how the context can change the value of <code>this</code> as well how it behaves in strict mode.</p>
<p>I&#8217;ve only scratched the surface of this topic, so here are some further posts discussing the <code>this</code> keyword:</p>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/this">&#8216;this&#8217; keyword on MDN</a></li>
<li><a href="http://net.tutsplus.com/tutorials/javascript-ajax/fully-understanding-the-this-keyword/">Fully understanding the &#8216;this&#8217; keyword</a></li>
<li><a href="http://www.sitepoint.com/javascript-this-gotchas/">JavaScript &#8216;this&#8217; Gotchas</a></li>
</ul>
<p>And if you have any corrections to what I&#8217;ve said, please add them to the comments and I&#8217;ll update accordingly.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=9003" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/my-current-javascript-design-pattern/' rel='bookmark' title='My Current JavaScript Design Pattern'>My Current JavaScript Design Pattern</a></li>
<li><a href='http://www.impressivewebs.com/why-use-triple-equals-javascipt/' rel='bookmark' title='Why Use the Triple-Equals Operator in JavaScript?'>Why Use the Triple-Equals Operator in JavaScript?</a></li>
<li><a href='http://www.impressivewebs.com/javascript-array-methods-reference/' rel='bookmark' title='JavaScript Array Methods Reference'>JavaScript Array Methods Reference</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=vqq5fsLF2S4:oG1T3NswWes:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=vqq5fsLF2S4:oG1T3NswWes:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=vqq5fsLF2S4:oG1T3NswWes:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/vqq5fsLF2S4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/javascript-this-different-contexts/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Browsing Twitter Favorites From Talented Developers</title>
		<link>http://www.impressivewebs.com/browsing-twitter-favorites-developers/</link>
		<comments>http://www.impressivewebs.com/browsing-twitter-favorites-developers/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 11:00:54 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[Roundups & Resources]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=8984</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-01/twitter-favorites.jpg" alt="Browsing Twitter Favorites From Talented Developers" title="Browsing Twitter Favorites From Talented Developers" width="184" height="184" class="article_image">If you're like me, then you probably find that your "home" Twitter stream (that is, the tweets of people you follow) is okay, but often contains a lot of noise and not-so-useful info.

What if you were able to see only the tweets that respected web professionals found to be exceptional? Well, you can do that quite easily by viewing a user's Twitter favorites.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-01/twitter-favorites.jpg" alt="Browsing Twitter Favorites From Talented Developers" title="Browsing Twitter Favorites From Talented Developers" width="184" height="184" class="article_image">If you&#8217;re like me, then you probably find that your &#8220;home&#8221; Twitter stream (that is, the tweets of people you follow) is okay, but often contains a lot of noise and not-so-useful info.</p>
<p>What if you were able to see only the tweets that respected web professionals found to be exceptional? Well, you can do that quite easily by viewing a user&#8217;s Twitter favorites.</p>
<p>For example, here are a few developers on Twitter that will likely have tons of cool stuff saved in their Twitter favorites:</p>
<ul class="body_list">
<li><a href="https://twitter.com/paul_irish/favorites">Paul Irish</a></li>
<li><a href="https://twitter.com/chriscoyier/favorites">Chris Coyier</a></li>
<li><a href="https://twitter.com/elijahmanor/favorites">Elijah Manor</a></li>
<li><a href="https://twitter.com/estellevw/favorites">Estelle Weyl</a></li>
<li><a href="https://twitter.com/smashingmag/favorites">Smashing Magazine</a></li>
<li><a href="https://twitter.com/stubbornella/favorites">Nicole Sullivan</a></li>
<li><a href="https://twitter.com/zoranjambor/favorites">Zoran Jambor</a></li>
<li><a href="https://twitter.com/csswizardry/favorites">Harry Roberts</a></li>
<li><a href="https://twitter.com/reybango/favorites">Rey Bango</a></li>
</ul>
<p>Of those above, I can vouch for Estelle&#8217;s favorites stream. She&#8217;s always got cool stuff in there that I&#8217;ve been checking out lately. And although Zoran is not as high-profile as the other&#8217;s in that list, he&#8217;s got some cool stuff in his favorites stream probably to help his research for <a href="http://css-weekly.com/">CSS Weekly</a>.</p>
<p>So that&#8217;s just an example list. I&#8217;m sure others could come up with a similar bunch of names whose Twitter favorites might be worth a peek.</p>
<h2>How Do You Follow Favorites?</h2>
<p>Here&#8217;s a solution that, unfortunately, will only work until March 2013. </p>
<p>Apparently, you can subscribe to a Twitter user&#8217;s favorites via RSS using the following URL syntax:</p>
<p><a href="https://api.twitter.com/1/favorites.rss?screen_name=ImpressiveWebs">https://api.twitter.com/1/favorites.rss?screen_name=ImpressiveWebs</a></p>
<p>That example uses <a href="http://twitter.com/ImpressiveWebs/favorites">my Twitter favorites</a>. To change the stream, just change the last part of the URL to match the user whose favorites you want to subscribe to.</p>
<p>But, as mentioned, <a href="https://dev.twitter.com/docs/api/1/get/favorites">according to Twitter&#8217;s API docs</a>, that API call is now deprecated and those RSS feed links will fail in March 2013.</p>
<p>Kind of a bummer, especially since there doesn&#8217;t seem to be an updated method for subscribing to someone&#8217;s favorites via RSS. If anyone knows of a simple way to do this, please share.</p>
<p>Is there an app I don&#8217;t know about that does this? Or maybe this post can serve as a motivator for someone to build such a tool. <a href="https://dev.twitter.com/docs/api/1.1/get/favorites/list">Here&#8217;s the relevant part</a> of Twitter&#8217;s API that you&#8217;d need to look into, if you&#8217;re interested in this.</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=8984" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/books-podcasts-front-end-developers/' rel='bookmark' title='Books, Podcasts, and More for Front-End Developers'>Books, Podcasts, and More for Front-End Developers</a></li>
<li><a href='http://www.impressivewebs.com/web-design-tech-newsletters/' rel='bookmark' title='Web Development and Tech Email Newsletters I Subscribe to'>Web Development and Tech Email Newsletters I Subscribe to</a></li>
<li><a href='http://www.impressivewebs.com/simple-tools-front-end-developers/' rel='bookmark' title='Simple Tools for Front-End Developers'>Simple Tools for Front-End Developers</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=GOI1hRWSJOk:p5U3QD__wd0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=GOI1hRWSJOk:p5U3QD__wd0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=GOI1hRWSJOk:p5U3QD__wd0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/GOI1hRWSJOk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/browsing-twitter-favorites-developers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Development and Tech Email Newsletters I Subscribe to</title>
		<link>http://www.impressivewebs.com/web-design-tech-newsletters/</link>
		<comments>http://www.impressivewebs.com/web-design-tech-newsletters/#comments</comments>
		<pubDate>Tue, 15 Jan 2013 11:00:50 +0000</pubDate>
		<dc:creator>Louis Lazaris</dc:creator>
				<category><![CDATA[Roundups & Resources]]></category>

		<guid isPermaLink="false">http://www.impressivewebs.com/?p=8961</guid>
		<description><![CDATA[<img src="http://cdn.impressivewebs.com/2013-01/tech-news.jpg" alt="Industry Email Newsletters I Subcribe to" title="Industry Email Newsletters I Subcribe to" width="184" height="184" class="article_image">To keep up with the latest news in tech, design, and development, I have a subscription-only email address that I use to subscribe to various industry newsletters.

I obviously can't read everything in all these sources, but I skim all of them regularly, and read many of the links they refer to.]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.impressivewebs.com/2013-01/tech-news.jpg" alt="Industry Email Newsletters I Subcribe to" title="Industry Email Newsletters I Subcribe to" width="184" height="184" class="article_image">To keep up with the latest news in tech, design, and development, I have a subscription-only email address that I use to subscribe to various industry newsletters.</p>
<p>I obviously can&#8217;t read everything in all these sources, but I skim all of them regularly, and read many of the links they refer to.</p>
<p class="cl">Here&#8217;s a list, in no particular order:</p>
<ul class="body_list">
<li><a href="http://javascriptweekly.com/">JavaScript Weekly</a></li>
<li><a href="http://www.maxdesign.com.au/category/news/">Links for Light Reading by Russ Weakley</a></li>
<li><a href="http://responsivedesignweekly.com/">Responsive Design Weekly</a></li>
<li><a href="http://www.sitepoint.com/newsletter/">SitePoint&#8217;s Newsletter</a></li>
<li><a href="http://www.codeproject.com/script/Mailouts/Archive.aspx">CodeProject Newsletter</a></li>
<li><a href="http://sidebar.io/">Sidebar</a></li>
<li><a href="http://www.webdesignerdepot.com/newsletter/">Webdesigner Depot Newsletter</a></li>
<li><a href="http://html5weekly.com/">HTML5 Weekly</a></li>
<li><a href="http://css-weekly.com/">CSS Weekly</a></li>
<li><a href="http://www.nngroup.com/articles/subscribe/">Alertbox Email Newsletter</a></li>
<li><a href="http://net.tutsplus.com/">Nettuts+ Email Updates</a></li>
<li><a href="http://www.netmagazine.com/user/register">The Week in Web Design (.net Magazine)</a></li>
<li><a href="http://www.hackernewsletter.com/">Hacker Newsletter</a></li>
<li><a href="http://www.smashingmagazine.com/the-smashing-newsletter/">The Smashing Email Newsletter</a></li>
<li><a href="http://www.webpronews.com/signup">WebProNews</a></li>
<li><a href="http://smacss.com/">SMACCS Newsletter</a></li>
</ul>
<p>I also get regular product-related emails from Packt Publishing, MightyDeals, AppSumo, JSMag, Adobe, O&#8217;Reilly, iStockphoto, A Book Apart, Dribbble, and some others not related to tech/dev/design.</p>
<p>A few of the above newsletters are a bit spammy, but even the spammy ones occasionally yield an interesting link.</p>
<p>And don&#8217;t even get me started on my ridiculously-impossible-to-keep-up-with RSS subscriptions! :)</p>
<h2>What Are Yours?</h2>
<p>Got any cool design/dev newsletters that you subscribe to? Share.</p>
<p class="metacredit">Photo credit: <a href="http://www.bigstockphoto.com/image-16860575/stock-vector-vector-newspaper-icon">Vector Newspaper Icon</a> from Bigstock</p>
 <img src="http://www.impressivewebs.com/?feed-stats-post-id=8961" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.impressivewebs.com/books-podcasts-front-end-developers/' rel='bookmark' title='Books, Podcasts, and More for Front-End Developers'>Books, Podcasts, and More for Front-End Developers</a></li>
<li><a href='http://www.impressivewebs.com/defining-click-area/' rel='bookmark' title='Defining the Click Area'>Defining the Click Area</a></li>
<li><a href='http://www.impressivewebs.com/web-development-for-beginners/' rel='bookmark' title='Web Development for Beginners (Resources)'>Web Development for Beginners (Resources)</a></li>
</ol></p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=K2WCOsUo4fo:JEJZTZ8e4EY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ImpressiveWebs?a=K2WCOsUo4fo:JEJZTZ8e4EY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ImpressiveWebs?i=K2WCOsUo4fo:JEJZTZ8e4EY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ImpressiveWebs/~4/K2WCOsUo4fo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.impressivewebs.com/web-design-tech-newsletters/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk: enhanced (Requested URI contains query)

 Served from: www.impressivewebs.com @ 2013-05-20 17:18:05 by W3 Total Cache -->
