cant use classes to set colors

Bug #1431794 reported by Sandra Karuving
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned
inkscape (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

in inkscape, when we try to use classes to set a color (important for kde-plasma workspace theming). inkscape always writes the color of the element, written in the classdescription directly to the style of the element. we have to remove it from outside inkscape all the time.

for example:

create an svg file with the content:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   viewBox="0 0 24 24"
   id="svg"
   version="1.1"
   inkscape:version="0.91 r13725"
   width="100%"
   height="100%"
   sodipodi:docname="tmp0.svg">
  <defs
     id="defs1">
    <style
       id="current-color-scheme"
       type="text/css">.ColorScheme-Background {
 color:#333333;
}</style>
  </defs>
  <metadata
     id="metadata1">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <sodipodi:namedview
     pagecolor="#808080"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1920"
     inkscape:window-height="1016"
     id="namedview1"
     showgrid="true"
     inkscape:zoom="11.313708"
     inkscape:cx="5.1845261"
     inkscape:cy="25.241479"
     inkscape:window-x="0"
     inkscape:window-y="0"
     inkscape:window-maximized="1"
     inkscape:current-layer="svg"
     borderlayer="true"
     showguides="true"
     inkscape:guide-bbox="true">
    <inkscape:grid
       type="xygrid"
       id="grid1"
       empspacing="5"
       visible="true"
       enabled="true"
       snapvisiblegridlinesonly="true" />
  </sodipodi:namedview>
</svg>

as you can se we embedded the css alreads. so save it as "test.svg", and open it with inkscape.

now create an element like a circle, open the xml editor and navigate to the circle element.

in your xml editor you can write now a new attribute "class" with the value of "ColorScheme-Background" and click on 'set'

next go to the style part and set the value only to "fill:currentColor".

now it *should* change the color to what is giver by the css (that part works).
BUT alongside to the "fill:currentColor" there will now be a "color:#333333". and that should not happen, because it breaks the funktionality of the css.

when you try to remove that part "color:#333333" from xml editor, its not possible. but you can remove it from outside inkscape. inkscape can still read the file.

so please make it possible that it wont write the color from css to the style element, but uses what we write in.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: inkscape 0.91-3ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu3
Architecture: amd64
CurrentDesktop: KDE
Date: Fri Mar 13 11:09:06 2015
InstallationDate: Installed on 2015-02-01 (39 days ago)
InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150130)
SourcePackage: inkscape
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sandra Karuving (lumks) wrote :
Nathan Lee (nathan.lee)
tags: added: bug-migration
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/452
Closed by: https://gitlab.com/nathanal

Changed in inkscape:
status: New → Invalid
Changed in inkscape (Ubuntu):
status: New → Invalid
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

Thank you, but please don't close the ubuntu bugs, those will be closed once the upload fixing them is done to ubuntu :)

(in that regard, now that the bugs are being migrated, it will be a lot harder to check… but well, I'll cope somehow)

Changed in inkscape (Ubuntu):
status: Invalid → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.