Skip to content

Instantly share code, notes, and snippets.

@sverweij
Last active June 5, 2022 09:44
Show Gist options
  • Save sverweij/93e324f67310f66a8f5da5c2abe94682 to your computer and use it in GitHub Desktop.
Save sverweij/93e324f67310f66a8f5da5c2abe94682 to your computer and use it in GitHub Desktop.
Highlight an edge in a graphviz generated svg
<!-- slap this somewhere at the top -->
<style>
/* the lines within the edges */
.edge:active path,
.edge:hover path {
stroke: fuchsia;
stroke-width: 3;
stroke-opacity: 1;
}
/* arrows are typically drawn with a polygon */
.edge:active polygon,
.edge:hover polygon {
stroke: fuchsia;
stroke-width: 3;
fill: fuchsia;
stroke-opacity: 1;
fill-opacity: 1;
}
/* If you happen to have text and want to color that as well... */
.edge:active text,
.edge:hover text {
fill: fuchsia;
}
</style>
@yijunwu
Copy link

yijunwu commented Jul 5, 2020

@sverweij It works, thank you for sharing that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment