<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Bite-sized CSS &amp; HTML nuggets</description><title>Bricss</title><generator>Tumblr (3.0; @bricss)</generator><link>http://bricss.net/</link><item><title>caniuse.com redesign - feedback wanted</title><description>&lt;p&gt;&lt;em&gt;I&amp;#8217;ve posted the following earlier this week on &lt;a href="http://dribbble.com/shots/904376-caniuse-com-redesign"&gt;Dribbble&lt;/a&gt;, and we&amp;#8217;ve got some great feedback so far. But we can use as much input as possible, so I&amp;#8217;m posting this here as well.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Over the course of the past few months, I’ve been working on a redesign of &lt;a href="http://caniuse.com"&gt;caniuse.com&lt;/a&gt; together with Alexis Deveria aka &lt;a href="http://twitter.com/Fyrd"&gt;@Fyrd&lt;/a&gt;, author of the site. If you don’t know caniuse.com yet, it’s an essential resource with compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers. Its current design is in need of a refresh, and while we’re at it we’re improving the usability, clearing up some clutter and making it responsive. The goal was to make a really clear and simple design so you can get to the information you’re after as easy and fast as possible.&lt;/p&gt;

&lt;p&gt;&lt;img class="full" style="margin: 0 auto;" src="http://dribbble.s3.amazonaws.com/users/9208/screenshots/904376/caniuse-redesign-dark-_2x_1x.png" alt="image"/&gt;&lt;/p&gt;

&lt;p&gt;This is just a screenshot of a work-in-progress prototype I’ve built, you can see it in action at &lt;a href="http://caniuse.lensco.be"&gt;&lt;a href="http://caniuse.lensco.be"&gt;http://caniuse.lensco.be&lt;/a&gt;&lt;/a&gt;. Some notes:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;A lot of things don’t work yet – it is just a static prototype. You can already click the ‘settings’ and ‘index’ links however to get a feel how those will look like.&lt;/li&gt;
&lt;li&gt;I originally made &lt;a href="http://dribbble.com/shots/904390-caniuse-com-redesign-light-theme"&gt;the light theme&lt;/a&gt; first, but Alexis suggested a dark theme close to the colors of the current design, as to not alienate regular visitors too much. We’re thinking of keeping the light theme as a user preference, accessible from the footer.&lt;/li&gt;
&lt;li&gt;Most of it is already responsive, except the table itself and the tabs on the bottom. I’m not sure however if we really need to come up with a complex responsive table – I guess it works ok with a bit of horizontal scrolling?&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;It is our intention to gather feedback from this prototype and continue improving the design, out in the open, on Dribbble/Twitter/etc. So, do you see something that needs improvement? Is the responsive design not working on your device? Does this design make sense for color-blind people? Let us know on &lt;a href="http://dribbble.com/shots/904376-caniuse-com-redesign"&gt;Dribbble&lt;/a&gt; or &lt;a href="http://twitter.com/bricss"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;</description><link>http://bricss.net/post/41519682988</link><guid>http://bricss.net/post/41519682988</guid><pubDate>Sat, 26 Jan 2013 08:58:00 -0500</pubDate><category>feedback</category><category>caniuse</category><category>redesign</category></item><item><title>Using Sass source maps in WebKit Inspector</title><description>&lt;p&gt;Here&amp;#8217;s a second topic I talked about in my &lt;a href="http://fronteers.nl/congres/2012/jam-session"&gt;Fronteers 2012 jam session presentation&lt;/a&gt;. If you&amp;#8217;ve been using a CSS preprocessor in your workflow, you&amp;#8217;ve no doubt encountered this issue: you&amp;#8217;re inspecting some element and want to edit the CSS, but finding that selector proves to be difficult as the inspector shows you file names and line numbers for your &lt;em&gt;compiled&lt;/em&gt; CSS.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://f.cl.ly/items/233K0g1D3t0x092e0R0U/source-maps-off.png" class="full"/&gt;&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re using Firefox and Sass you might have heard about &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug/"&gt;FireSass&lt;/a&gt;, but Chrome users have been out of luck until recently. This is where source maps come into play. &lt;a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/"&gt;&lt;strong&gt;Source maps&lt;/strong&gt;&lt;/a&gt; are a language-agnostic way of pointing your inspector to the right location in your unminified and uncombined files. Originally devised for JavaScript, they can equally be applied to CSS preprocessors.&lt;/p&gt;

&lt;p&gt;A &lt;a href="http://trac.webkit.org/changeset/123768"&gt;fairly recent commit&lt;/a&gt; enabled experimental support for Sass source maps in Chrome, so make sure you&amp;#8217;re running at least Chrome 24. You&amp;#8217;ll want to turn on &lt;a href="http://f.cl.ly/items/1t3G383K3n0U1Z0G3i3L/settings.png"&gt;Enable source maps&lt;/a&gt; in the settings, and &lt;a href="http://f.cl.ly/items/0a2I0z3g0Z1O0P403C0M/settings-experimental.png"&gt;Support for Sass&lt;/a&gt; in the experimental settings tab. &lt;strong&gt;Update:&lt;/strong&gt; If the &amp;#8220;Experimental&amp;#8221; tab is not visible yet, visit chrome://flags first and turn on “Enable Developer Tools experiments”.&lt;/p&gt;

&lt;p&gt;Next, make sure the output style of Sass is anything but &amp;#8216;compressed&amp;#8217;. Finally you&amp;#8217;ll have to enable debug info – if you&amp;#8217;re compiling from the command line, pass the &lt;code&gt;--debug-info&lt;/code&gt; flag. If you&amp;#8217;re using Compass, add this line to your config.rb:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sass_options = { :debug_info =&amp;gt; true }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now when you compile your CSS you should see lines like these preceding every selector in your compiled CSS:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/lensco\/Sites\/lensco\/sass\/style\.scss}line{font-family:\0000336}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The WebKit Inspector will turn all this into exactly what we need: original file names and line numbers!&lt;/p&gt;

&lt;p&gt;&lt;img src="http://f.cl.ly/items/1p3F0W280d080O1M460G/source-maps-on.png" class="full"/&gt;&lt;/p&gt;

&lt;p&gt;Don&amp;#8217;t forget to turn off the debug info in your production environment afterwards – you don&amp;#8217;t want all these lines littering your final CSS.&lt;/p&gt;</description><link>http://bricss.net/post/33788072565</link><guid>http://bricss.net/post/33788072565</guid><pubDate>Wed, 17 Oct 2012 16:07:00 -0400</pubDate><category>CSS</category><category>Sass</category><category>preprocessors</category><category>Chrome</category><category>WebKit</category><category>tricks</category><category>source maps</category></item><item><title>box-shadow vs filter: drop-shadow</title><description>&lt;p&gt;This post is the first topic I discussed in &lt;a href="http://fronteers.nl/congres/2012/jam-session"&gt;my jam session presentation at Fronteers 2012&lt;/a&gt;. It&amp;#8217;s about the drop-shadow filter. You may have looked at it and thought &amp;#8220;this is pretty much the same thing as a box-shadow&amp;#8221; right? Well, not exactly. The big advantage of the drop-shadow filter is that &lt;strong&gt;it acknowledges the outline and transparency&lt;/strong&gt; of an element.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dabblet.com/gist/3820382"&gt;&lt;img src="http://f.cl.ly/items/0G1c2v0I2Y0X3k2Z3L2W/box-shadow.png" class="full"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever wanted a box-shadow that followed the shape of an element, including generated content, like a tooltip with an arrow? Or you wanted a box-shadow to take transparent parts of a .png into account? That&amp;#8217;s exactly what &lt;code&gt;filter: drop-shadow()&lt;/code&gt; does. It has the exact same syntax as the &lt;code&gt;box-shadow&lt;/code&gt; property, except that inset drop-shadows and the spread value are not supported (yet?).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dabblet.com/gist/3820382"&gt;&lt;img src="http://f.cl.ly/items/2p3g1y1D1q3s3L1D1k35/box%20filter.png" class="full"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes, it’s an experimental property, and yes, it’s only supported in some WebKit browsers now. But &lt;a href="http://caniuse.com/#feat=css-filters"&gt;according to caniuse.com&lt;/a&gt; there’s already 32.51% of web users with support. And since it’s usually a decoration type of enhancement you can start using this today. Or even use a regular box-shadow on browsers that don&amp;#8217;t support filters yet. Keep an eye on browser performance though, as things tend to get laggy pretty quickly with these experimental filters. Here&amp;#8217;s &lt;a href="http://dabblet.com/gist/3852573"&gt;a final example&lt;/a&gt; with a transparent PNG:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dabblet.com/gist/3852573"&gt;&lt;img src="http://f.cl.ly/items/0n1Q0V0W3v252q3n002w/example2.png" class="full"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://bricss.net/post/33158273857</link><guid>http://bricss.net/post/33158273857</guid><pubDate>Mon, 08 Oct 2012 09:54:00 -0400</pubDate><category>Tricks</category><category>CSS</category><category>box-shadow</category><category>filters</category></item><item><title>Unprefix express in full swing</title><description>&lt;p&gt;The big vendor prefix discussion comes and goes in waves, but one conclusion that always pops up is that these prefixes should have a shorter lifespan. Of course browser makers may shift the responsability to specification writers, arguing that specs take too long to reach Candidate Recommendation (CR) status. Well, it seems the unprefix express is finally picking up steam.&lt;/p&gt;

&lt;p&gt;A few weeks ago we heard about unprefixed transitions, transforms, animations, gradients, IndexedDB (and more) in the next &lt;a href="http://blogs.msdn.com/b/ie/archive/2012/05/31/windows-release-preview-the-sixth-ie10-platform-preview.aspx"&gt;Internet Explorer&lt;/a&gt;, and this week the &lt;a href="http://paulrouget.com/e/unprefixing-in-firefox-16/"&gt;Firefox&lt;/a&gt; team anounced exactly the same.&lt;/p&gt;

&lt;p&gt;This is all great news. Even better, &lt;a href="http://www.netmagazine.com/features/hot-web-standards-june-2012"&gt;as Lea Verou noticed&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Keep in mind that this means you don’t have to use the -ms- prefix at all for transitions, animations and gradients, since no stable build of IE was ever released that requires it.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://bricss.net/post/26994922080</link><guid>http://bricss.net/post/26994922080</guid><pubDate>Wed, 11 Jul 2012 15:41:19 -0400</pubDate><category>prefixes</category><category>browsers</category><category>Firefox</category><category>IE</category><category>spec</category></item><item><title>box-decoration-break finally coming to more browsers</title><description>&lt;p&gt;One of the lesser known CSS properties I&amp;#8217;m really excited about is &lt;code&gt;box-decoration-break&lt;/code&gt;. From &lt;a href="http://www.w3.org/TR/css3-background/#box-decoration-break"&gt;the official spec&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;When a box is broken at a page break, column break, or, for inline elements, at a line break, the ‘box-decoration-break’ property specifies whether box fragments are treated as broken fragments of one continuous box, or whether each fragment is individually wrapped with the border and padding.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This will finally give us a simple solution for &lt;a href="http://jsfiddle.net/lensco/A7ZFt/"&gt;this problem&lt;/a&gt; for example, and for cut off box-shadows and the like. It would have been great to fully control which properties should be &lt;em&gt;sliced&lt;/em&gt; and which ones not, but currently the poperty only has two possible values, &lt;code&gt;slice&lt;/code&gt; (the default) and &lt;code&gt;clone&lt;/code&gt;. This image – also from the spec – says it all:
&lt;img src="http://www.w3.org/TR/css3-background/box-break.png" class="full" style="margin: 0 auto;"/&gt;&lt;/p&gt;

&lt;p&gt;So far, only Opera supports &lt;code&gt;box-decoration-break&lt;/code&gt;, &lt;a href="http://dev.opera.com/articles/view/css3-border-background-boxshadow/#box-decoration-break"&gt;since 2009&lt;/a&gt; (Opera 10.60). Firefox does have the &lt;a href="https://developer.mozilla.org/en/CSS/-moz-background-inline-policy"&gt;&lt;code&gt;-moz-background-inline-policy&lt;/code&gt; property&lt;/a&gt; that specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines, but that&amp;#8217;s just a part of what &lt;code&gt;box-decoration-break&lt;/code&gt; does. Here&amp;#8217;s the &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659"&gt;corresponding Bugzilla bug&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Last week &lt;a href="http://trac.webkit.org/changeset/118853"&gt;support for parsing the property landed in WebKit&lt;/a&gt;, with the rendering part still to be implemented. Let&amp;#8217;s hope &lt;code&gt;box-decoration-break&lt;/code&gt; will be available in all browsers soon!&lt;/p&gt;</description><link>http://bricss.net/post/24672339016</link><guid>http://bricss.net/post/24672339016</guid><pubDate>Fri, 08 Jun 2012 06:48:29 -0400</pubDate><category>layout</category><category>spec</category><category>WebKit</category><category>Opera</category><category>Firefox</category><category>CSS</category></item><item><title>Prevent background-color bleed on touch screens</title><description>&lt;p&gt;Here&amp;#8217;s an issue I&amp;#8217;ve ran into a couple of times related to &lt;a href="http://bricss.net/post/22718920352/subpixel-layout-coming-to-webkit"&gt;subpixel rounding&lt;/a&gt; on touch screens: while zooming in, I was seeing background colors bleeding through on the edges of an element that also had a background image applied. Open &lt;a href="http://jsfiddle.net/lensco/VsbK9/"&gt;this fiddle&lt;/a&gt; on your smartphone or tablet and zoom in, you may see something like this:&lt;/p&gt;

&lt;p&gt;&lt;img class="full" style="margin: 0 auto;" src="http://f.cl.ly/items/381j1R1j1F0N3w131s1o/bleed.png"/&gt;&lt;/p&gt;

&lt;p&gt;Browsing &lt;a href="http://stackoverflow.com/questions/5832869/single-sub-pixel-misalignment-of-divs-on-ipad-and-iphone-safari"&gt;this thread on Stack Overflow&lt;/a&gt; I found a really simple workaround that may not work in every situation, but it did the trick for me:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;outline: 1px solid #fff;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Just a 1 pixel &lt;code&gt;outline&lt;/code&gt; in the same color as your page background, et voila!&lt;/p&gt;</description><link>http://bricss.net/post/23292393396</link><guid>http://bricss.net/post/23292393396</guid><pubDate>Fri, 18 May 2012 11:18:00 -0400</pubDate><category>CSS</category><category>Tricks</category><category>touch</category><category>subpixel</category></item><item><title>Subpixel layout coming to WebKit</title><description>&lt;p&gt;If you&amp;#8217;ve ever tried to get precise em-based values of &lt;code&gt;letter-spacing&lt;/code&gt; to work in a WebKit browser, you&amp;#8217;ve probably wondered why that isn&amp;#8217;t really possible, while Firefox or Internet Explorer 10 for example do allow fine-grained control. &lt;a href="http://jsfiddle.net/lensco/YjRLS/"&gt;Play around with this demo&lt;/a&gt; in various browsers and you&amp;#8217;ll see what I mean.&lt;/p&gt;

&lt;p&gt;The underlying reason is that WebKit currently uses integers to calculate pixel positions, while Firefox allows subpixel units to represent locations and sizes. This affects not only letter-spacing of course, but also things like rounding errors while zooming or applying transforms. There has been an ongoing effort to switch WebKit to use subpixel layout, and a few days ago Levi Weintraub and Emil A Eklund &lt;a href="http://trac.webkit.org/changeset/116009"&gt;landed a patch&lt;/a&gt; that should put subpixel layout on the fast track. Look forward to more precision coming soon to WebKit-based browsers.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s &lt;a href="http://trac.webkit.org/wiki/LayoutUnit"&gt;some technical background&lt;/a&gt; on this matter, and an &lt;a href="https://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx"&gt;article on subpixel rendering and the CSS Object Model&lt;/a&gt; from the IE team.&lt;/p&gt;</description><link>http://bricss.net/post/22718920352</link><guid>http://bricss.net/post/22718920352</guid><pubDate>Wed, 09 May 2012 11:58:00 -0400</pubDate><category>subpixel</category><category>WebKit</category><category>browsers</category><category>letter-spacing</category></item><item><title>Easily checking in JavaScript if a CSS media query has been executed</title><description>&lt;p&gt;For quite a while I have been looking for a way to &amp;#8220;mirror&amp;#8221; my CSS media queries in JavaScript, but without duplicating the actual queries. Of course, you can use &lt;a href="http://www.w3.org/TR/cssom-view/#extensions-to-the-window-interface"&gt;matchMedia&lt;/a&gt; to evaluate a media query in JavaScript, but then you have to maintain your breakpoints in two places – not ideal.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.paulrhayes.com/2011-11/use-css-transitions-to-link-media-queries-and-javascript/"&gt;Paul Hayes devised a clever method&lt;/a&gt; in his fork of the match­Me­dia poly­fill, using transitions on dummy elements and watching for the &lt;code&gt;tran­si­tio­nEnd&lt;/code&gt; event in JavaScript. But a truly simple solution – one that doesn&amp;#8217;t really need watching for resize events – was still lacking.&lt;/p&gt;

&lt;p&gt;Fortunately &lt;a href="http://adactio.com/journal/5429/"&gt;Jeremy Keith turned to his readers for help&lt;/a&gt;, and together they came up with a delightfully straightforward technique:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@media (min-width: 45em) {
    body:after {
        content: 'widescreen';
        display: none;
        }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Which basically doesn&amp;#8217;t do anything, except that you can check for it in Javascript:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var size = window.getComputedStyle(document.body,':after').getPropertyValue('content');
if (size == 'widescreen') {
    // go nuts
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Nice!&lt;/p&gt;</description><link>http://bricss.net/post/22198838298</link><guid>http://bricss.net/post/22198838298</guid><pubDate>Tue, 01 May 2012 12:52:32 -0400</pubDate><category>JavaScript</category><category>media queries</category><category>tricks</category></item><item><title>Say hello to the color picker in WebKit Inspector</title><description>&lt;p&gt;If you&amp;#8217;re using the Chrome dev channel or the WebKit Nightlies, you might have noticed this already: previously, when you clicked the colored square on the left of a color code in the WebKit Inspector, it used to cycle through different color formats. That&amp;#8217;s still possible when you shift-click it (alt-click on Windows), but a regular click will now spawn a color picker. It was on my &lt;a href="http://lensco.be/2010/04/15/webkit-inspector-wish-list/"&gt;WebKit Inspector wish list&lt;/a&gt; 2 years ago, and now seems to have finally made it in! No more need to switch to another app just to pick a color for an element on your page. It doesn&amp;#8217;t allow you to sample colors on screen, but I presume that&amp;#8217;s a lot harder to do.&lt;/p&gt;

&lt;p&gt;&lt;img class="full" style="margin: 0 auto;" src="http://f.cl.ly/items/332s0b0d2V0h1Q1s002t/colorpicker.png"/&gt;&lt;/p&gt;

&lt;p&gt;Since you can easily &lt;a href="http://bricss.net/post/9076968710/customize-the-webkit-inspector-chrome-dev-tools"&gt;customize the WebKit Inspector&lt;/a&gt;, I got rid of the confusing double background of the widget. &lt;a href="http://trac.webkit.org/changeset/107804/trunk/Source/WebCore/inspector/front-end/inspector.css#file0"&gt;Here are the selectors&lt;/a&gt; you can use for the color picker – though I&amp;#8217;m not sure where the original yellow background is defined?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/* color picker styles */
.spectrum-container {
    background: #ffffc2 !important;
    border: 0 !important;
    }
&lt;/code&gt;&lt;/pre&gt;</description><link>http://bricss.net/post/18791100366</link><guid>http://bricss.net/post/18791100366</guid><pubDate>Mon, 05 Mar 2012 10:00:05 -0500</pubDate><category>colors</category><category>webkit</category><category>Inspector</category><category>customize</category></item><item><title>Forget loading spinners, use a wait cursor</title><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Right after posting this I received quite a bit of feedback in defense of regular loading spinners. Some valid arguments in favor are summed up nicely in &lt;a href="http://news.ycombinator.com/item?id=3612236"&gt;this Hacker News thread&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Cursors won&amp;#8217;t work on touch devices of course.&lt;/li&gt;
&lt;li&gt;Wait cursors might be too easily associated with a frozen browser/system.&lt;/li&gt;
&lt;li&gt;A spinner may indicate more clearly which part of the interface is updating.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So think carefully before applying the following technique on a large scale. It might be suited in specific conditions though.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;There are loads of funky &amp;#8220;loading&amp;#8221; animated gifs out there, and these days I also encounter a few CSS spinners. But a technique I haven&amp;#8217;t seen a lot is simply using the &lt;code&gt;cursor&lt;/code&gt; property to convey the message.&lt;/p&gt;

&lt;p&gt;Desktop apps usually use the cursor to indicate that users have to wait. Most of the time the cursor is exactly where the user is looking, so they won&amp;#8217;t miss the message. &lt;a href="http://www.quirksmode.org/css/cursor.html"&gt;Browser support&lt;/a&gt; for &lt;code&gt;cursor&lt;/code&gt; is very good too.&lt;/p&gt;

&lt;p&gt;You shouldn&amp;#8217;t solely rely on the cursor – graying out the loading parts of the interface works well too – but for your next web app you could try slapping a &lt;code&gt;loading&lt;/code&gt; class to your body, or any other element, and using&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;body.loading { cursor: wait; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You might have to explicitly add form elements and links to the selector, so they don&amp;#8217;t trigger the default or pointer cursor. Adding &lt;code&gt;!important&lt;/code&gt; won&amp;#8217;t work. So something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;body.loading, body.loading input, body.loading a { cursor: wait; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here&amp;#8217;s &lt;a href="http://jsfiddle.net/lensco/eKUuL/"&gt;a quick demo&lt;/a&gt;. You can use &lt;a href="http://jsfiddle.net/nimbu/bGxUd/"&gt;other cursors&lt;/a&gt; as well, or even a custom one with the &lt;code&gt;url(...)&lt;/code&gt; value – although animated images won&amp;#8217;t work, and &lt;a href="https://developer.mozilla.org/en/CSS/Using_URL_values_for_the_cursor_property"&gt;other restrictions apply&lt;/a&gt;.&lt;/p&gt;</description><link>http://bricss.net/post/17941857127</link><guid>http://bricss.net/post/17941857127</guid><pubDate>Mon, 20 Feb 2012 06:35:00 -0500</pubDate><category>cursor</category><category>tricks</category><category>css</category></item><item><title>Simple responsive design test page</title><description>&lt;p&gt;There are some pretty complex testing tools for responsive designs out there. I even see people constantly resizing their browser window using on-screen rulers. The easiest approach to me is just a simple page with a bunch of iframes, like &lt;a href="http://mattkersley.com/responsive/"&gt;Matt Kersley&amp;#8217;s test page&lt;/a&gt;. Because I always ended up refreshing the whole page rather than the URL bar on that page, I saved the file locally and tweaked it a little.&lt;/p&gt;

&lt;p&gt;Somebody recently asked me to share it, so &lt;a href="https://gist.github.com/1685127"&gt;here it is.&lt;/a&gt; Just drop this HTML document in the same folder as your index page and open it – it&amp;#8217;s dead simple, really!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8"&amp;gt;
    &amp;lt;title&amp;gt;Responsive Design Testing&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
        .wrapper { width: 6000px; }
        .frame { float: left; }
        h2 { margin: 0 0 5px 0; }
        iframe { margin: 0 20px 20px 0; border: 1px solid #666; }
    &amp;lt;/style&amp;gt;    
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div class="wrapper"&amp;gt;
        &amp;lt;div class="frame"&amp;gt;
            &amp;lt;h2&amp;gt;320 &amp;amp;times; 480 &amp;lt;small&amp;gt;(mobile)&amp;lt;/small&amp;gt;&amp;lt;/h2&amp;gt;
            &amp;lt;iframe src="./" sandbox="allow-same-origin allow-forms" seamless width="320" height="480"&amp;gt;&amp;lt;/iframe&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="frame"&amp;gt;
            &amp;lt;h2&amp;gt;480 &amp;amp;times; 640 &amp;lt;small&amp;gt;(small tablet)&amp;lt;/small&amp;gt;&amp;lt;/h2&amp;gt;                   
            &amp;lt;iframe src="./" sandbox="allow-same-origin allow-forms" seamless width="480" height="640"&amp;gt;&amp;lt;/iframe&amp;gt;
        &amp;lt;/div&amp;gt;                                                                                                                        
        &amp;lt;div class="frame"&amp;gt;
            &amp;lt;h2&amp;gt;768 &amp;amp;times; 1024 &amp;lt;small&amp;gt;(tablet - portrait)&amp;lt;/small&amp;gt;&amp;lt;/h2&amp;gt;                   
            &amp;lt;iframe src="./" sandbox="allow-same-origin allow-forms" seamless width="768" height="1024"&amp;gt;&amp;lt;/iframe&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="frame"&amp;gt;
            &amp;lt;h2&amp;gt;1024 &amp;amp;times; 768 &amp;lt;small&amp;gt;(tablet - landscape)&amp;lt;/small&amp;gt;&amp;lt;/h2&amp;gt;
            &amp;lt;iframe src="./" sandbox="allow-same-origin allow-forms" seamless width="1024" height="768"&amp;gt;&amp;lt;/iframe&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="frame"&amp;gt;
            &amp;lt;h2&amp;gt;1200 &amp;amp;times; 800 &amp;lt;small&amp;gt;(desktop)&amp;lt;/small&amp;gt;&amp;lt;/h2&amp;gt;
            &amp;lt;iframe src="./" sandbox="allow-same-origin allow-forms" seamless width="1200" height="800"&amp;gt;&amp;lt;/iframe&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Ben Keen turned this into &lt;a href="http://www.benjaminkeen.com/misc/bricss/"&gt;a very handy bookmarklet&lt;/a&gt;. Reloading the page will kill the effect of course, but still very useful for quick one-shot tests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Here&amp;#8217;s &lt;a href="http://codebomber.com/jquery/resizer/"&gt;another bookmarklet&lt;/a&gt; based on this idea by William Golden.&lt;/p&gt;</description><link>http://bricss.net/post/16538278376</link><guid>http://bricss.net/post/16538278376</guid><pubDate>Thu, 26 Jan 2012 16:32:00 -0500</pubDate><category>responsive</category><category>design</category><category>testing</category></item><item><title>Small but important (and final?) change to linear gradient syntax</title><description>&lt;p&gt;After &lt;a href="http://bricss.net/post/10407494330/angles-in-gradients-subject-to-change"&gt;redefining angles in gradients&lt;/a&gt;, another small but important revision was made to the linear gradient syntax last week. It&amp;#8217;s outlined in full detail on &lt;a href="http://www.broken-links.com/2012/01/11/the-new-and-hopefully-final-linear-gradient-syntax/"&gt;Peter Gasston&amp;#8217;s blog&lt;/a&gt;, but the gist is this: If you need a direction keyword, you&amp;#8217;ll have to specify the &lt;em&gt;destination&lt;/em&gt; keyword and prepend the word &lt;code&gt;to&lt;/code&gt;. Previously you had to specify the &lt;em&gt;origin&lt;/em&gt; of the gradient.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;background: linear-gradient(left top, red, gold); /* old syntax */
background: linear-gradient(to right bottom, red, gold); /* new syntax */
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Makes it a bit more readable and logical, so it&amp;#8217;s a good adjustment. But how about the transition from old to new syntax then? Well, this will probably be the last edit to the syntax, as the CSS Image Values and Replaced Content Module Level 3 specification moved to the &lt;em&gt;Last Call&lt;/em&gt; status. Browser vendors will likely only start using this new syntax when moving to unprefixed gradients, or keep supporting the old syntax for prefixed gradients (as Firefox 10 will do).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Therefore, if you already used unprefixed gradients with direction keywords – for future compatibility – you&amp;#8217;d better edit these stylesheets.&lt;/strong&gt;&lt;/p&gt;</description><link>http://bricss.net/post/16108748575</link><guid>http://bricss.net/post/16108748575</guid><pubDate>Thu, 19 Jan 2012 03:29:16 -0500</pubDate><category>gradients</category><category>spec</category><category>syntax</category></item><item><title>On filters, -ms-filters and filters</title><description>&lt;p&gt;In CSS, there have been &lt;code&gt;filter&lt;/code&gt;s for a long time. &lt;a href="http://msdn.microsoft.com/en-us/library/ms532849(v=VS.85).aspx"&gt;Microsoft first introduced&lt;/a&gt; them for Internet Explorer 4, producing a range of visual effects and transitions. Also called DirectX filters, we still occasionally use them today, for things like fallbacks for CSS gradients. They are proprietary though, and were never picked up by other browser vendors.&lt;/p&gt;

&lt;p&gt;As a result, the Internet Explorer team decided to &lt;a href="http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx"&gt;add the &lt;code&gt;-ms-&lt;/code&gt; prefix&lt;/a&gt; in 2009. But soon after these filters were deprecated, and &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/12/07/moving-to-standards-based-web-graphics-in-ie10.aspx"&gt;in IE10 they won&amp;#8217;t even be supported&lt;/a&gt; no more. So you really never need to bother with the &lt;code&gt;-ms-filter&lt;/code&gt; syntax, just use &lt;code&gt;filter&lt;/code&gt; in those rare cases.&lt;/p&gt;

&lt;p&gt;In the meantime, the &lt;code&gt;filter&lt;/code&gt; property has been reborn however, this time for SVG filter effects applied in CSS. Partially supported in Firefox since version 3.5, they&amp;#8217;re currently being &lt;a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html"&gt;formally specified&lt;/a&gt;, and also being implemented in &lt;a href="http://blogs.msdn.com/b/ie/archive/2011/10/14/svg-filter-effects-in-ie10.aspx"&gt;Internet Explorer 10&lt;/a&gt; and &lt;a href="http://trac.webkit.org/changeset/100565"&gt;WebKit&lt;/a&gt;. These CSS filter effects will allow some very exciting Photoshop-like filters, like grayscale, sepia, blur, saturate, brightness, and much more. Coming soon!&lt;/p&gt;</description><link>http://bricss.net/post/14422295237</link><guid>http://bricss.net/post/14422295237</guid><pubDate>Sun, 18 Dec 2011 17:07:49 -0500</pubDate><category>filters</category><category>spec</category><category>IE</category><category>SVG</category><category>CSS</category></item><item><title>The CSS profilers are coming!</title><description>&lt;p&gt;Back in August I talked about &lt;a href="http://bricss.net/post/8963305337/benchmarks-for-web-technologies-like-css-and-svg"&gt;the lack of benchmarks or performance tools for CSS&lt;/a&gt;. In the meantime, the fine folk we call browser makers have been working hard on new developer tools to do just that: measure CSS performance. First the &lt;a href="http://my.opera.com/dragonfly/blog/style-profiler-preview"&gt;Opera team showed off their upcoming style profiler&lt;/a&gt;, and now the &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=74004"&gt;WebKittens are tinkering on a CSS selector profiler&lt;/a&gt; too.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://files.myopera.com/hzr/files/profiler.png"&gt;&lt;img class="full" style="margin: 0 auto;" src="http://media.tumblr.com/tumblr_lvuoaamheV1qar8us.png"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the features of these tools is to calculate how long your selectors take and then show a list of the worst offenders. But as you can see from the screenshots, and as &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=74004#c5"&gt;noted&lt;/a&gt; by Pavel Feldman:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I can see selector matching taking single digit milliseconds. I know from the timeline panel that layout takes hundres of milliseconds or even seconds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://bug-74004-attachments.webkit.org/attachment.cgi?id=118220"&gt;&lt;img class="full" style="margin: 0 auto;" src="http://media.tumblr.com/tumblr_lvuoneFt4T1qar8us.png"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So the relevance of this information may be rather marginal. Perhaps more interesting then is the fact that the Opera Dragonfly style profiler shows the exact moment and location of paint events and layout reflows. Definitely some exciting developments to keep an eye on!&lt;/p&gt;</description><link>http://bricss.net/post/13884376788</link><guid>http://bricss.net/post/13884376788</guid><pubDate>Wed, 07 Dec 2011 15:35:00 -0500</pubDate><category>opera</category><category>webkit</category><category>benchmark</category><category>profiling</category><category>css</category><category>performance</category></item><item><title>Native CSS nesting with new Hierarchies spec</title><description>&lt;p&gt;Googlers Shane Stephens and Tab Atkins Jr. recently posted &lt;a href="http://dev.w3.org/csswg/css3-hierarchies/"&gt;the first editor&amp;#8217;s draft of a new specification on CSS hierarchies&lt;/a&gt;. The CSS Working Group has been paying close attention to what&amp;#8217;s happening in the world of CSS preprocessors (like &lt;a href="http://lesscss.org"&gt;LESS&lt;/a&gt; and &lt;a href="http://sass-lang.com"&gt;SASS&lt;/a&gt;), and this is another illustration of that. Take this code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.error, .warning {
    padding: 10px;
    }
.error p, .warning p {
    font-size: 12px;
    }
.error a, .warning a {
    color: #f00;
    }
.error a:hover, .warning a:hover {
    border-bottom: 1px solid #f00;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When the spec is implemented, you will simply be able to write it like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.error, .warning {
    padding: 10px;
    &amp;amp; p { font-size: 12px; }
    &amp;amp; a {
        color: #f00;
        &amp;amp;:hover {
            border-bottom: 1px solid #f00;
            }
        }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The advantages are pretty clear: better readability and maintainability, and smaller file sizes!&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re wondering about compatibility, the spec says the following about this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So a browser that doesn&amp;#8217;t understand nested selectors will read the above example as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.error, .warning {
    padding: 10px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;While we wait for browser implementations, &lt;del&gt;it would be great if all CSS preprocessors added  support for this syntax so we can start getting used to it today&lt;/del&gt; &lt;ins&gt;you can actually start using this syntax today – it&amp;#8217;s compatible with both LESS and SASS. (Thanks &lt;a href="http://twitter.com/dariocravero"&gt;@dariocravero&lt;/a&gt;!)&lt;/ins&gt;&lt;/p&gt;</description><link>http://bricss.net/post/13583990210</link><guid>http://bricss.net/post/13583990210</guid><pubDate>Thu, 01 Dec 2011 03:35:00 -0500</pubDate><category>css</category><category>hierarchies</category><category>nesting</category><category>preprocessors</category><category>spec</category></item><item><title>Using letter-spacing breaks right-to-left text in Opera on Windows</title><description>&lt;p&gt;Granted, this might seem a pretty exotic scenario, but a very plausible one nevertheless: using &lt;code&gt;letter-spacing&lt;/code&gt; breaks right-to-left text in Opera on Windows. On Windows XP the character order seems to be reversed, and on Vista and Windows 7 the order is fine but characters are no longer joined – while scripts like Arabic, Urdu, etc. rely on this. (Thanks to &lt;a href="http://twitter.com/BifterComic"&gt;@BifterComic&lt;/a&gt; for the Vista results.)&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s a &lt;a href="http://jsfiddle.net/lensco/WCaY4/"&gt;JSFiddle to test&lt;/a&gt;, and some screenshots to get an idea. The first line is without any &lt;code&gt;letter-spacing&lt;/code&gt;, the second one has a positive value, and the third line has a negative &lt;code&gt;letter-spacing&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://f.cl.ly/items/2j23082G1Z0a3t2u2g1g/letter-spacing.png" class="full" style="margin: 20px auto;"/&gt;&lt;/p&gt;

&lt;p&gt;So if you have a page with RTL text, remember to reset any &lt;code&gt;letter-spacing&lt;/code&gt; to avoid running into this issue. I filed a bug at Opera to report it.&lt;/p&gt;

&lt;p&gt;&lt;ins&gt;&lt;strong&gt;Update:&lt;/strong&gt; Apparently the Opera team was &lt;a href="http://my.opera.com/desktopteam/blog/2011/11/28/glyphs-and-plugins"&gt;working on some issues with hardware acceleration&lt;/a&gt;, which fixed this bug. The fix is in the new development snapshot, so it shouldn&amp;#8217;t take too long for this bug to eventually disperse into thin air.&lt;/ins&gt;&lt;/p&gt;</description><link>http://bricss.net/post/13295015738</link><guid>http://bricss.net/post/13295015738</guid><pubDate>Fri, 25 Nov 2011 06:03:00 -0500</pubDate><category>RTL</category><category>opera</category><category>windows</category><category>bug</category></item><item><title>Using an icon font as a web font – introducing Fico</title><description>&lt;p&gt;A technique that hasn&amp;#8217;t been researched and used enough in my opinion, is the use of an icon font as a web font. There are many advantages to this approach, rather than using images. You can:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;infinitely scale a font, because they&amp;#8217;re just vectors&lt;/li&gt;
&lt;li&gt;use whatever color you like – even gradients in some browsers&lt;/li&gt;
&lt;li&gt;add shadows, transitions, transforms, &amp;#8230;&lt;/li&gt;
&lt;li&gt;stop messing around with loads of files or sprites&lt;/li&gt;
&lt;li&gt;rest assured it will work in most browsers – &lt;a href="http://www.caniuse.com/#feat=fontface"&gt;browser support for @font-face&lt;/a&gt; is very wide&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;One problem with icon fonts that can make them less than ideal for font embedding, is that they&amp;#8217;re often big files. That&amp;#8217;s one of the reasons I created &lt;strong&gt;&lt;a href="http://fico.lensco.be"&gt;Fico&lt;/a&gt;, a limited set of simple icons specifically tailored to use on the web&lt;/strong&gt;. The icon set might grow in the future, but it will always remain a lightweight solution for using icons on your website. Give it a spin!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://fico.lensco.be"&gt;&lt;img src="http://media.tumblr.com/tumblr_luulwf6qGK1qar8us.png" class="full" style="margin: 0 auto;"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s some more info and techniques about this on &lt;a href="http://fico.lensco.be"&gt;the Fico website&lt;/a&gt;, and coincidentally Chris Coyier from the excellent CSS-Tricks posted this today as well: &lt;a href="http://css-tricks.com/examples/IconFont/"&gt;Icon Fonts are Awesome&lt;/a&gt;.&lt;/p&gt;</description><link>http://bricss.net/post/12962812721</link><guid>http://bricss.net/post/12962812721</guid><pubDate>Fri, 18 Nov 2011 04:19:41 -0500</pubDate><category>icons</category><category>fonts</category><category>font-face</category></item><item><title>Working with 8-digit hex colors (aRGB) in Internet Explorer filters</title><description>&lt;p&gt;You&amp;#8217;ve probably come across the use of CSS filters as fallback techniques for RGBa colors or CSS gradients for example. They have their limitations and implications, but they do come in handy sometimes. They look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.awesomesauce {
    background: rgba(0,0,0,.6);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Maybe you&amp;#8217;ve noticed these weird colors that have 8 instead of the usual 6 hexadecimal digits. Well, these are &lt;strong&gt;aRGB colors&lt;/strong&gt;, used in Internet Explorer filters but also in &lt;a href="http://developer.android.com/guide/topics/resources/more-resources.html#Color"&gt;Android development&lt;/a&gt; among others.&lt;/p&gt;

&lt;p&gt;The syntax is pretty easy: first a pair of digits for the alpha channel and then 3 pairs for the RGB channels, just like regular hex colors. But instead of specifying alpha as a percentage or a floating point like for RGBa colors, it is defined in a range from 00 to FF. To calculate the hex value from a decimal number in JavaScript:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hexAlpha = Math.floor(decimalAlpha * 255).toString(16);
// so:
// rgba(255,255,255,0) = #00ffffff
// rgba(0,0,0,.5) = #7f000000
// rgba(255,255,0,1) = #ffffff00 = #ffff00 = #ff0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To make it even easier, there are &lt;a href="http://www.beijingyoung.com/articles/rgba-argb-converter/"&gt;several&lt;/a&gt; RGBa to aRGB &lt;a href="http://kilianvalkhof.com/2010/css-xhtml/how-to-use-rgba-in-ie/"&gt;convertors&lt;/a&gt; out there.&lt;/p&gt;</description><link>http://bricss.net/post/12423845540</link><guid>http://bricss.net/post/12423845540</guid><pubDate>Sun, 06 Nov 2011 12:06:00 -0500</pubDate><category>CSS</category><category>IE</category><category>RGBa</category><category>aRGB</category><category>colors</category><category>filters</category><category>hex</category></item><item><title>Complete Compass API in iOS 5</title><description>&lt;p&gt;One new feature of iOS 5&amp;#8217;s Mobile Safari that was not known back when I wrote &lt;a href="http://bricss.net/post/6291335092/whats-new-in-ios-5-for-web-developers"&gt;this post&lt;/a&gt;, is an extension to the DeviceOrientation Event API. There was already an implementation of the &lt;a href="http://dev.w3.org/geo/api/spec-source-orientation.html"&gt;official yet limited spec&lt;/a&gt; in iOS, but the Apple team &lt;a href="http://lists.w3.org/Archives/Public/public-geolocation/2011Jul/0014.html"&gt;didn&amp;#8217;t have the time to wait for a resolution&lt;/a&gt; and  implemented two new properties that allow developers to get full access to the real world orientation in Mobile Safari now!&lt;/p&gt;

&lt;p&gt;James Pearce from Sencha &lt;a href="http://tripleodeon.com/2011/10/taking-a-new-device-api-for-a-spin/"&gt;took the new API for a spin&lt;/a&gt; and created a complete web-based compass. If you&amp;#8217;re running iOS 5 and you&amp;#8217;re on an iPhone 4 or 4S, iPad or latest generation iPod Touch, just tap the image below. Now go ahead and make your web app orientation-aware!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jamesgpearce.github.com/compios5/"&gt;&lt;img src="http://media.tumblr.com/tumblr_ltrrgzPeyy1qar8us.png" class="full" style="margin: 0 auto;"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://bricss.net/post/12027129747</link><guid>http://bricss.net/post/12027129747</guid><pubDate>Fri, 28 Oct 2011 05:36:59 -0400</pubDate><category>device orientation</category><category>compass</category><category>spec</category><category>javascript</category><category>ios</category><category>mobile safari</category></item><item><title>Some notes on bouncy CSS transitions</title><description>&lt;ul&gt;&lt;li&gt;&lt;p&gt;Earlier this year the &lt;a href="http://dev.w3.org/csswg/css3-transitions/#transition-timing-function_tag"&gt;CSS transitions specification&lt;/a&gt; was rewritten so that transitions with a custom timing function (using cubic-bezier) would no longer be clamped between the start and end values, making it possible to add a &lt;strong&gt;rubber-band bounce&lt;/strong&gt; to your transitions. Opera and Firefox already implemented this, and recently the related &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=45761"&gt;WebKit bug&lt;/a&gt; was fixed, so we can start experimenting with bouncy transitions now!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This rubber-band bouncing doesn&amp;#8217;t only work for things like &lt;code&gt;position&lt;/code&gt; and &lt;code&gt;transform&lt;/code&gt;, it equally applies to animated &lt;strong&gt;colors, shadows, borders, font-sizes, etc&lt;/strong&gt;. Of course, transitions won&amp;#8217;t extend across minimum or maximum values – you can&amp;#8217;t go darker than rgb(0,0,0) for example.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you need &lt;em&gt;real&lt;/em&gt; bouncing though – with more than one bounce – you&amp;#8217;ll still have to use &lt;strong&gt;keyframe animations&lt;/strong&gt;, as cubic-bezier curves only take two user-defined control points. Dan Eden made a nice &lt;a href="http://daneden.me/animate"&gt;library of ready-made animations&lt;/a&gt; to drop into your project. &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=45761#c1"&gt;Apparently&lt;/a&gt; browser vendors and spec writers are currently looking into defining more timing functions like bounce however.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to play around with cubic-bezier curves look no further than &lt;a href="http://cubic-bezier.com"&gt;Cubic-Bezier&lt;/a&gt; or &lt;a href="http://matthewlein.com/ceaser/"&gt;Ceaser&lt;/a&gt;, two essential &lt;strong&gt;tools&lt;/strong&gt; to comprehend and play with CSS timing functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://bricss.net/post/11730888258</link><guid>http://bricss.net/post/11730888258</guid><pubDate>Fri, 21 Oct 2011 09:05:57 -0400</pubDate><category>animations</category><category>css</category><category>spec</category><category>cubic-bezier</category><category>webkit</category></item></channel></rss>
