An Ember JS Gauge Component


This is a gauge (well kind of) made with Ember Components and CSS3 transforms. The pointer angle is bound to those 2 inputs (see the jsbin just bellow) in which you can define either the pointer current value and the whole gauge maximum value.

The Template

The main idea of having a gauge component is that you can use and re-use it anywhere in your Ember app(s), and its main purpose is to indicate a current value relative to a maximum value. So, if it could have 2 attributes value and maxValue that would be perfect.

Well, let’s just do that.

{{my-gauge value=something maxValue=something}}
Continue reading “An Ember JS Gauge Component”

A cool CSS spinner with LESS variables

This is a quick and dirty translated post I wrote in French some time ago.

I was playing with some css 2D transforms when I kinda ended with this css spinner 🙂 I chose LESS and yes I could have used SASS, sorry for fan boys :P.

The spinner itself

The HTML code

<div class="loader rspin">
  <span class="c"></span>
  <span class="d spin"><span class="e"></span></span>
  <span class="r r1"></span>
  <span class="r r2"></span>
  <span class="r r3"></span>
  <span class="r r4"></span>
Continue reading “A cool CSS spinner with LESS variables”

Expand clickable areas for a better touch experience

expand-areaOn mobile phones / tablets, where touch gestures comes into place, it’s sometimes hard to target little links with your finger. Mostly because it was primarily designed for a desktop use. Jacob Rossi, an Internet Explorer 10 engineer who worked on the awesome Microsoft’s pointer API (yeah true story man), said at the 2013 W3Conf that every touch oriented elements should be at least 40×40 pixels wide, to ensure the best user experience.

Continue reading “Expand clickable areas for a better touch experience”

Animate png sprites with css3 animations

Here’s a demo I made on Codepen that let’s you play with Ken (from Street Fighter II). There are several moves, like jumping, walking, etc and of course there’s the famous Hadoken! 🙂 It’s made with only CSS transitions and a minimum of javascript that let’s you control Ken.

See the Pen Ken’s Street Fighter II with animated sprites by Julien Knebel (@jkneb) on CodePen.

And here’s the post I wrote for the David Walsh Blog → where I explain how it works in details.

Continue reading “Animate png sprites with css3 animations”

CSS transition from a fixed px width to an auto width

I was struggling trying to animate the width of a <div> from a fixed px width to a 100% (or auto) width. The idea was to have a completely fluid 2 columns layout. A main col taking all the space and a right col with a fixed width. Then, on a particular user action, the right col animates until taking all the remaining space (overlapping the main col). I needed to achieve the effect only with css transitions.

Here’s how I did it…

Continue reading “CSS transition from a fixed px width to an auto width”

How to target old versions of Internet Explorer in our CSS in 2013

This is how I like to do in my projects, it may be or may be not the best solution but it works just fine for me, hope you’ll find it useful.

I find myself following these 2 rules :
* Is there a better approach in order to avoid specific ie version targeting?
* If ie specific styles are required, how can I avoid code scattering at all cost?

Continue reading “How to target old versions of Internet Explorer in our CSS in 2013”

Pure CSS 3 fancy separator

I recently had to reproduce a fancy “kinda separator” and I gave it a try in pure css. The result is quite cool. It works like a charm in ie9, Chrome, Safari, Opera and Firefox.

If you’re using Firefox you’ll notice (or not) that the dashed rounded border is “solid” rather than being “dashed” (inside the white circle)… Well there’s a bug about it in Firefox opened since 2007… dashed border simply doesn’t work when a border-radius is applied to it. Too bad… Well the guys at Webkit’s have the solution, wonder why Firefox didn’t implemented it jet.

Anyway the :after shadow border works great every where I tested it so it’s a quite robust ie9+ technique. I need to apply a degraded version for ie8, maybe just a simple grey border.

Here’s the Codepen version. You can play with the tabs to see how it works underhood.

See the Pen Shadow separator by Julien Knebel (@jkneb) on CodePen.

Handle HTML includes with Jade

As a front end developer I’m sometimes confront to projects where I need to deal with only static HTML files. Being able to use inclusions in PHP makes it so much easier to maintain.

I’m a Git fan and I usually use Github as remote repository, it allows the creation of a gh-page branch. Basically it means you can have a static web page for your Github project for free. Really it’s easy here’s the Github doc.

Github pages are awesome but it’s then impossible to use php includes in them…

Continue reading “Handle HTML includes with Jade”

Vert.x logo concept

Here’s a draft I did just for fun on the logo of an open source projet I heard of called vert.x
I’ll suggest it to the community, maybe they’ll like it 🙂

For white backgrounds

For black backgrounds

Licence Creative Commons
Ce(tte) Ĺ“uvre de Julien Knebel est mise Ă  disposition selon les termes de la licence Creative Commons Attribution – Pas d’Utilisation Commerciale – Partage dans les MĂŞmes Conditions 3.0 non transposĂ©.
Fondé(e) sur une œuvre à

Put a break point on DOM elements to listen to JS interactions

Have you ever struggled to find what line of js code was the cause of a weird behavior in your page? I did.

Well there’s a super cool feature in Chrome dev tools you can try. Simply inspect the DOM (where the behavior appears to be) then do a right click and choose one of these three options:

Continue reading “Put a break point on DOM elements to listen to JS interactions”