core icon indicating copy to clipboard operation
core copied to clipboard

Suggestion: provide an option to disable icon's automatic margin-inline-end

Open juthilo opened this issue 1 year ago • 0 comments

At the moment, all icons receive a small amount of right margin, which is very helpful when they're placed in front of text.

However, in some situations, there is no text afterwards and the margin causes a weird look. In Core, for icononly buttons and similar (but not all) use cases, there's styling to reset the margin to 0. This isn't applied in Elements though, because icons use the shadow DOM there.

I would love an additional attribute like data-icon-margin with values default | none or similar to enable users to remove margin whenever needed.

Opening issue in Core because the general option to remove margin might be relevant to many, regardless of framework. Let me know if I should open in Elements instead.

juthilo avatar Mar 06 '23 14:03 juthilo