#122 ✓resolved

PATCH: default value for CSS property "background-color"

Reported by nickg | March 20th, 2010 @ 03:54 AM

I bumped into this testing with a large website. It did (I forget the exact mechanism) (getComputedStyle" or something ...).backgroundColor.toLower() == ...

It didn't matter what backgroundColor was, as long as it was a string.

Commit http://github.com/client9/env-js/commit/a5e28767cac052aaa51165c19fc... did this to src/css/properties.js

@ - backgroundColor: null, + backgroundColor: 'rgb(0,0,0)', @

You may not like my choice of default. Modern browsers seem to use rbga(0,0,0,0) or transparent.
I'm happy with any string, including ''

And if you this default should be null (that's cool), see my next ticket.



Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket