Archive

Posts Tagged ‘html’

m4 Macros and CSS

December 18th, 2010 5 comments

I’m certainly not the first person to consider this, but it’s a simple enough technique for managing CSS that it bears repeating.

The problem: your CSS has a bunch of constants hard-coded in it all over the place, because CSS doesn’t support the concept of variables.

Perhaps the original theme color was #1122ff, and so you have CSS like this, where the string “1122ff” appears about 8 million times in your various CSS files:

#somediv {
    background-color: #1122ff;
}

.othertext {
    color: #1122ff;
}

But then you find out that the new theme color is going to be #2211ff and can you please change it. Sure there’s search-and-replace, but there might be false positives, and it’s not easy to verify that everything replaced well.

But there is a better way!

Read more…

Share
Categories: Programmer Tags: , ,

Adobe AIR

February 17th, 2010 No comments

Adobe AIR is a cross-platform runtime. It enables you to write faux-native (if I might coin a term) apps in Flash, Flex, or HTML/Javascript/Ajax (it uses WebKit for rendering), and then distribute those apps to run on Windows, OS X, and Linux.

It’s been out for a while, but I only now just looked at it and installed it on my 64-bit Arch Linux machine… with limited success. Read below for some of the nasty details.

(I don’t have FlexBuilder, so these incredibly incomplete starter instructions are for building from the command line.)

Read more…

Share