Skip to content

Commit

Permalink
Adds in the CSS worksshot section of the documentation an example of …
Browse files Browse the repository at this point in the history
…how to style svg markers in the CSS styling declaration
  • Loading branch information
Alessandro Cristofori authored and aaime committed Feb 26, 2024
1 parent f0b05f5 commit cf03c0f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions doc/en/user/source/styling/workshop/css/point.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,30 @@ This technique was shown with the initial file:`airport.svg` CSS example.

.. image:: ../style/img/point_graphic_2.png

#. SVG external graphics styles can also be declared in the CSS code.

Using the **symbol** function in the **mark** property.

The styles declarations have to icluded in the **:mark** pseudo-class.

.. code-block:: css
/* @title red triangle with blue stroke */
*{
mark: symbol('https://www.svgrepo.com/show/488433/triangle.svg');
mark-mime: "image/svg";
mark-size: 25;
:mark {
fill: #ff3300;
stroke: blue;
stroke-width: 5px;
}
}
#. Will result in a modified style for an external SVG graphic resource.

.. image:: ../style/img/point_graphic_3.png

Label
-----

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cf03c0f

Please sign in to comment.