It’s JavaScript! get the styles out.

Some programmers of UI widgets believe that appearance properties belong in the JavaScript invocation of web page widgets. Why? I don’t know. I’ve always believed in separating styles from behaviors. (Well, yes, the JavaScript is the agent which is creating the visual components on the page, going beyond what HTML and browsers can do. But does that give it a right to encompass stylistic properties in JS?) If we want to use those UI components, we have to do things their way.

Or do we? I wrote a fiddle demonstrating how you may relocate your JSON (this example is taken from the Twitter embedded timeline widget) into your CSS.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: