Re: symbolic SVG *not* as an icon?



Hi Ami,

I do not know too much detail on applying css on st widgets.
The following is a hunch and probably will not help you, I hope it is
useful anyway.


I do know that SVG is not a picture on which you can do raster
operations like filling colors, SVG is a collection of commands to
create a vector, which is then rasterized.

At some point in the library after inputting the SVG, the SVG commands
are handled to create a rasterized picture in a buffer, this buffer is
then showed to us.

So maybe you have to be able to insert a command into the svg before it
gets handled, or maybe able to manipulate the created raster buffer with
css.

Success!

-- 
(o_
//\  Regards, Groeten,
V_/_ Bas Burger.


On Thu, 26 Jul 2012 09:11:58 +1000
Amy C <mathematical coffee gmail com> wrote:

> On 26 July 2012 03:10, Mz <mengzhuo1203 gmail com> wrote:
> >
> > I think you need to rewrite it:
> >
> > .my-button {
> >     background: url('background.svg');
> >     background-size: contain;
> >     width:140px; /*(only in pixel)*/
> >     height:174px;
> > }
> >
> Thanks - why do you say the width/height are only in pixels? I've
> currently set the width/height to 2em which seems to work OK - since
> I'm displaying a character over the button I thought sizing in ems
> would make sure the button is always appropriately sized with respect
> to the text size.
> 
> >> The SVG has some white bits in it. What I'd like is to be able to
> >> do: .my-button:toggled {
> >>     color: blue;
> >> }
> >
> > you need to re-design that svg, or just change to a svg that is
> > blue.
> >
> What do you mean by redesign it? How do I tell the SVG "this colour
> should be whatever the 'colour' attribute says"? (My current
> workaround is to have two SVG files, one white and one blue and switch
> between them. But if it can be achieved with just one SVG file that
> would be better).
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> https://mail.gnome.org/mailman/listinfo/gnome-shell-list



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