The Case for Re-Architecting Your CSS (with a CSS Preprocessor)

In the last few months I’ve become a pretty big fan of a particular CSS preprocessor called Stylus. Stylus is a node.js-powered preprocessor that I’ve used with some clients. Stylus has offered a huge boost in both my productivity and quality— and I’ve conjectured that it even gives me an edge performance. After seeing huge gains, I’ve wondered if existing websites can get a benefit from a CSS-to-Stylus conversion. Clients don’t ask for one, and it’s probably because no one has every done a CSS-rewrite and actually measured the gains. Well, guess what? I did a Stylus conversion on my blog, to find out if I could find any gains…
Read More

The End of !important: Using Specificity Tricks to Trump Styles

Last week I was hit with a small challenge of fixing a snippet of code that fixed a problem with a third party application called Media Manager. It  does some pretty nifty things with videos — but it also injects a <style> into the <body>. Because it does that, I had a challenge in changing the dimensions of a video on the client-side. I first worked up a fix over there. Then I worked up a fix for the fix here. It involved a lot of attribute selector shenaniganery and ultimately, revelations about !important —including ways to avoid it at all costs.
Read More

Changing Media Manager Video Sizes with Tridion: a Fullscreen problem

At my Media Manager presentation at Tridion Developer Summit a few weeks ago, I showed a trick for resizing your Media Manager videos outside of Media Manager’s outlets.

This morning, I learned that there was a bug with the approach, and this afternoon, I found a fix. Let’s discuss. Read More

Finding Prime Numbers with JavaScript

Feeling nerdier than usual last night, I was asking myself, and a math teacher (that’s Mrs. Jaye, to you), all sorts of questions about numbers, including prime numbers. Later on, I got to thinking: how would I determine what the prime numbers are in a given range? And then I thought about writing that program. And then I fell asleep — because…narcolepsy at 10:30 is called bed time. Read More

Page Visibility and Speech Synthesis: How to make web pages sound needy

I’ve been frustrated with a lot of different things this week, so I decided to take my mind off of things for a few minutes and play with something new today. In doing so, I may have created the most obnoxious use of two JavaScript APIs imaginable. Don’t do this at home. Or anywhere else, for that matter. Read More

SDL Media Manager – a Necessary jQuery Plugin

As I’ve mentioned in the past, I’ve been working with Media Manager pretty heavily these last few months. One thing that I’ve noticed is that there’s no real jQuery plugins out there to assist with embedding Media Manager videos. Well, that’s no longer the case! Read More

The Contenteditable jQuery Plugin Gets an Update

A good long while ago, I discovered that contenteditable was a pretty nifty attribute to play with, especially when you get CSS involved. Then I stumbled upon the scoped attribute which you can apply to a <style>block, which isolates styles to a specific container. And then I wrote a jQuery plugin. Well, now it’s gotten some spiffy updates.

Read More