Ni Hao Jelle,
I'm open for more ideas once I've been able to push me first contribution.
The USE element don't ring any bell for me. Any pointer ?
I'll have to read again your idea when I'm done with this.
My original requirement of external stylesheet was to allow to visualize and work on svg files under different configurations. As I say that I realize I don't know if Inkscape allows css media queries.
As far as performance is concerned my change has little impact. I'm just creating a SPStyleElem before the root from the PI and apply it before. If there is no style in PI nothing is changed. As mentioned in some comments in the code 2 traversals would be desirable to be sure all styles fragments are available before the display traversal or as some browsers are doing is to restart the traversal whenever styles are affecting the traversal.
I need to refresh my knowledge on svg.
-Bruno
Bruno Winck Email: bwinck@...2632... Blog: http://www.kneaver.com/blog
Kneaver Corp http://www.kneaver.com/ Twitter:http://twitter.com/kneaver PH: +(415) 335-6932
-----Original Message----- From: Jelle Mulder [mailto:pjmulder@...353...] Sent: Monday, January 13, 2014 1:55 PM To: inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] External CSS support
Hello Bruno,
Having been in China for quite a while I understand the situation you're in using low bandwidth.
It would be way cool to have external style sheet support in Inkscape and something that has been on my wish list for quite a while, so please continue. Even if it's ugly coding and creates a performance hit when loading Inkscape, I think it would be worthwhile to have it. Maybe using a switch in the prefs to turn it on or off, for performance improvement.
Added to that is another question.
How feasible would it be to use the external style sheet support code you're currently making to do the same for external <USE xlink:href="file.svg#objectID"/> ? I have the idea that it would be pretty similar in scope, reading data from file and changing style attributes for CSS and reading and adding SVG code to the SVG code in memory (leaving the file code alone).
If it isn't too much work, could you experiment with it a little to see how feasible it is? It would kill two BIG flies in one go if it would work and greatly increase the productivity of Inkscape as an authoring tool. You'd certainly be one of my hero's if you can make this work in Inkscape.
I can also imagine Tav's Symbol tool to increase usability by using external links to symbol files rather than embedding them into the code like it currently does, but that would be food for 0.92 I guess.
Last but not least would be an option to save all linked content into a single whopper of a file and an option to export all style info and <use> objects to external files. Hmm,.. you cannot prevent me from dreaming now can you?
Cheers,
Jelle Mulder
------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.cl... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel