brianleroux / xui

A tiny javascript framework for mobile web apps.
http://github.com/xui/xui
391 stars 159 forks source link

Inconsistency between setStyle and getStyle #36

Closed filmaj closed 13 years ago

filmaj commented 13 years ago

Taken straight out of the specs:

x$('#someElement').setStyle('backgroundColor','blue'); x$('#someElement').getStyle('background-color', function(v) { // ; });

How come we use two different strings to reference the same style property? Shouldn't this be consistent?

Thoughts?

brianleroux commented 13 years ago

yeah its stupid for sure. should probably use the css selector since it wouldn't require a translation

filmaj commented 13 years ago

ok my latest push on this just ends up supporting both approaches in both functions - easy enough.

filmaj commented 13 years ago

Like I said... both functions accept both types of styles.