Posts Tagged ‘math’

Math and jsFloater – dynamic drop shadow

Friday, December 4th, 2009

So, in other posts, we’ve talked about jsFloater being able to take your computed integer values and use them to create some dynamic effects based on the browser resizing.

Here is a really simple example: it’s a drop shadow that changes its distance based on the size of the window, and as you resize the window the distance changes as well.  Of course, it’s up to your imagination to come up with other uses, but this is a simple example that gets to the point.

(more…)

A Call for CSS Math

Wednesday, November 25th, 2009

Not talking about MathML here, but the addition of simple addition, subtraction, multiplication and division in CSS values.

By this time, I’ve worked my head around the idea that, to many developers (and clients) out there, CSS is the one true way and tables are only good for displaying data – that is, data that they consider data and not data that someone else might consider data.  See my previous post on semantic html for more carping on this topic.  But enough negativity – I would hereby like to add my voice to the growing number of developers calling for a new future in CSS: [paraphrase] “If CSS is the golden chalice of front-end web development, how come it can interpret between pixels, point sizes, and em sizes, but it can’t add 1 + 1?”

Now, I know, purists will say that Javascript is for math, and CSS is for styling.  Just simply get a good Javascript library and do your math there.  The problem is that other purists will say that using Javascript to generate your CSS positions is pure hackery.  And yet other purists will say “everyone come to my website to check out my awesome CSS hacks!”

(more…)