Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

improve svg export by using css #4432

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

improve svg export by using css #4432

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: Shmias
[Submitted to the original trac issue database at 4.45pm, Tuesday, 5th June 2012]

hi,

the exported svgs could be much more useful if it would use css. also they would be smaller, more logical and secmantic, and easier to change.

this mess:


<path style="fill-rule:nonzero;fill:rgb(73.72549%,66.27451%,66.27451%);fill-opacity:0.9;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(20%,0%,40%);stroke-opacity:1;stroke-miterlimit:4;"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(73.72549%,66.27451%,66.27451%);fill-opacity:0.7;"/>
<path style="fill:none;stroke-width:15.5;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(99.607843%,84.313725%,64.705882%);stroke-opacity:1;stroke-miterlimit:4;"/>

should be turned into this:


<style>
.building {
  stroke:none;
  fill-rule:nonzero;
  fill:rgb(73.72549%,66.27451%,66.27451%);
  fill-opacity:0.7;
}

.building.non-residentuial {
  fill-opacity:0.9;
  stroke-width:0.2;
  stroke-linecap:butt;
  stroke-linejoin:miter;
  stroke:rgb(20%,0%,40%);
  stroke-opacity:1; 
  stroke-miterlimit:4;
}

.highway.secondary {
  fill:none;
  stroke-width:15.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke:rgb(99.607843%,84.313725%,64.705882%);
  stroke-opacity:1;
  stroke-miterlimit:4;
}
<style>
<path class="building"/>
<path class="building non-residential"/>
<path class="highway secondary" />
@openstreetmap-trac
Copy link
Author

Author: Shmias
[Added to the original trac issue at 8.33pm, Wednesday, 6th June 2012]

sorry, i posted this multiple times

@openstreetmap-trac
Copy link
Author

Author: iandees
[Added to the original trac issue at 9.30pm, Monday, 9th September 2013]

Cleaning aging tickets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant