-
Notifications
You must be signed in to change notification settings - Fork 6
White border around symbol in the legend is getting cut off #53
Comments
Design Input: I noticed that the white border is being applied by CSS instead of as an SVG stroke. This is what's causing the clipping. Does anyone know the reasoning behind CSS borders over SVG? |
This SVG code would remove the need for CSS borders, should keep the circle from clipping, and still gives control over color for the fill and stroke: |
@jeremyfuksa |
Great question. And the screenshot above is a great example for illustrating why we'd want to have all shapes (even the dash in your screenshot) using SVG stroke instead of CSS borders. The viewbox for the SVG is 48x48, as it should be. But, when the shape is resized to 10x10 in the legend, the 5px stroke scales proportionally. The dash must have CSS applied, as it seems to have the unscaled 5px stroke. |
@pranav300, what is the UX input needed? |
I found the code that defines all the shapes. I'll edit that in this branch. |
Removes the need to use CSS borders on these shapes, as a possible fix for https://github.com/cerner/carbon-graphs/issues/176 Signed-off-by: jeremyfuksa <hello@orangefla.me>
I've updated all the shapes except for the chevrons. I made the assumption that the chevrons would only ever be used for navigation and are not part of this issue. |
Current Problem:
The symbol in the legend is getting cut off around the white borders. i.e. In the circle legend, the white border is getting cut off on each size instead of being even and rounded.
Resolution
The symbol should an even 1 pixel border around the entire symbol. This can be accomplished by stacking 2 symbol svg on top of one another. (i.e. place an entirely white symbol first and layer a smaller black symbol centered on top of the white symbol - this should give off the appearance of a 1 px border around the black symbol)
The text was updated successfully, but these errors were encountered: