Modifying a css property from js



Hi all,

I'm trying to add a color setting for my extension:
https://extensions.gnome.org/extension/258

The actual approach I'm using is: I define a css with a
'.has-notification { color: red; }' and I call
'add_style_class_name('has-notification')' on
Main.panel._statusArea.userMenu._iconBox.
Using this approach, the only way I think I can implement the settings
is by creating some styles (red, green, yellow, blue, etc) and add the
one the user specified.

I wanted to used a ColorButton to let the user choose the color and
them add the style based on the color hex code, so the choice wouldn't
be limited by the range I choose above.
So, my question is: Is there a way for me to modify that
'has-notification' style and change it's color on my js code. Or even,
is there any way for specifying the color hex code directly without
having to create a css for that?

Sorry if this wasn't the place to send this question.

-- 
Thiago Bellini | http://hackedbellini.org

“Real knowledge is to know the extent of one's ignorance.” - Confucius


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]