bootstrap-icons-vue icon indicating copy to clipboard operation
bootstrap-icons-vue copied to clipboard

Add a class name to the generated svg element to target them in css

Open gubug opened this issue 3 years ago • 2 comments
trafficstars

Is it possible to add a class name, eg. "bootstrap-icon" or "bicon", to the generated svg element ? maybe also a kebab case version of the icon name

the idea is to target the icons easily with css in order to correct alignment with text for example

<svg width="1em" height="1em" class="bicon bicon-bookmark" viewBox="0 0 16 16" fill="currentColor" role="img" focusable="false">...</svg>

gubug avatar May 27 '22 17:05 gubug

Good idea!

tommyip avatar May 28 '22 03:05 tommyip

I also need this, for testing purpose. I was checking a <i> element was the expected icon. Now, with this lib, I can no longer make assertions on the icon in cypress

alcalyn avatar Jan 08 '24 08:01 alcalyn