This is a script I've made per Akaya's request that helps you manage your stylesheet: most importantly, it allows you to change specific parts of a stylesheet without having to keep track of the overall thing yourself.
The script is basic and does just one thing: if you'd like to improve upon it, feel free to do so! Please attach your work here after.
-- note that CSSMan.new has a period, all others have : for access
mycssobject = CSSMan.new([[<your CSS here - one property per line>]])
-- if you haven't got any CSS properties to begin with, create it like so:
mycssobject = CSSMan.new([[]])
-- or:
mycssobject = CSSMan.new("")
This script is really useful. I use it very heavily and do hope to see it integrated into Geyser.
I do have a request though. If a qt property is not set when CSSMan.new() is run and you try to set it later on, it doesn't work.
The way I've worked around this is to set every property I possibly can when running CSSMan.new() but it would be really nice if each property could be set w/o having it in the original stylesheet.
If this is still confusing... say I create a label with a background-color of red. Further down the road, I want to set the font-family to something besides the default. I am unable to do so unless I set some value for font-family when creating the label. This is an inconvience when you're unsure what the label will contain in its stylesheet. Like in the GUI Creator.
My 2 cents. This is still a fantastic script. Thank you!
Thanks. I have a whole bunch of icons that have identical properties, except for a different background, so I thought it would be cleaner to split it. I will find a workaround.