Re: having trouble with stylesheet.css
- From: "Jasper St. Pierre" <jstpierre mecheye net>
- To: Amy C <mathematical coffee gmail com>
- Cc: gnome-shell-list gnome org
- Subject: Re: having trouble with stylesheet.css
- Date: Wed, 6 Jun 2012 21:46:46 -0400
On Wed, Jun 6, 2012 at 9:36 PM, Amy C <mathematical coffee gmail com> wrote:
> Hi all,
>
> I'm trying to style some things in my extension via stylesheet.css but
> it looks like the CSS file is somehow not being added to the list of
> styles.
>
> For example, in my extension:
>
> let dummy = new PopupMenu.PopupMenuItem('dummy');
> dummy.add_style_class_name('test');
> this.menu.addMenuItem(dummy);
>
> Then in stylesheet.css which lives in my extension folder along with
> extension.js:
>
> .test {
> color: #ff0000;
> background-color: #00ff00;
> }
>
> When I load the extension, my popup menu item is the default
> background/text color that is used for all the other menu items,
> instead of red text and green background.
>
> If I instead do:
>
> dummy.set_style('color: #ff0000; background-color: #00ff00');
>
> it works.
It shouldn't. You're trying to call set_style on something that is not
a StWidget. Maybe you wrote:
dummy.actor.set_style('color: #ff0000; background-color: #00ff00');
instead? Make sure that that .actor exists.
> Also, if I edit /usr/share/gnome-shell/theme/gnome-shell.css to have
> the .test { ... } snippet in it, it works too. So the CSS is not bad.
>
> This leads me to believe that somehow my stylesheet is not in the
> "search path" for add_style_class_name, or maybe my class is being
> overridden by the system one. I know the stylesheet is being parsed
> correctly (adding some extra log lines to extensionSystem.js where it
> loads the stylesheet and it is doing so).
>
> How can I get my stylesheet.css to work? If it is relevant, I am using
> GNOME-shell 3.2 (I vaguely recall that this works on my GNOME-shell
> 3.4 computer, but I can't test that today).
>
> cheers.
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> https://mail.gnome.org/mailman/listinfo/gnome-shell-list
--
Jasper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]