To the question: how to add border / outline / stroke to SVG elements in CSS web pages?
You can do in CSS:
path { outline: 3px solid green; }
Please note that since 2018 it is supported by chrome and safari, but may not be available in all modern browsers. See the example below:
I applied the scheme through CSS to the <g> group with paths inside. In statics, it looks good. In dynamic (drag and drop), I periodically see these artifacts (left)

UPDATE:
- if the contour is “solid” - there are no artifacts
- Safari mobile does not support the outline of
<g> elements ...
source share