Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

White border around symbol in the legend is getting cut off #53

Open
erinplourde opened this issue Mar 6, 2020 · 7 comments
Open

White border around symbol in the legend is getting cut off #53

erinplourde opened this issue Mar 6, 2020 · 7 comments
Assignees
Milestone

Comments

@erinplourde
Copy link

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.
Screen Shot 2020-03-06 at 10 26 33 AM

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)
Screen Shot 2020-03-06 at 10 30 57 AM

@jeremyfuksa
Copy link

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?

@jeremyfuksa
Copy link

jeremyfuksa commented Mar 18, 2020

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:
<svg viewBox="0 0 48 48"> <circle cx="24" cy="24" r="21.5" fill="#1c1f21"/> <path d="M24 5c10.5 0 19 8.5 19 19s-8.5 19-19 19S5 34.5 5 24 13.5 5 24 5m0-5C10.7 0 0 10.7 0 24s10.7 24 24 24 24-10.7 24-24S37.3 0 24 0z" fill="#fff"/> </svg>
cc @pranav300

@pranav300
Copy link
Contributor

pranav300 commented Mar 20, 2020

@jeremyfuksa
This is a great way of going ahead with this issue.
But with this do we want the only circle as an outer circle or shape-specific outer white border?
Something like this
Screenshot 2020-03-20 at 11 47 13 AM

@jeremyfuksa
Copy link

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.

@jeremyfuksa jeremyfuksa self-assigned this Apr 17, 2020
@jeremyfuksa
Copy link

jeremyfuksa commented Apr 22, 2020

@pranav300, what is the UX input needed?
EDIT: I found what you need on Teams. Investigating today.

@jeremyfuksa
Copy link

I found the code that defines all the shapes. I'll edit that in this branch.

jeremyfuksa referenced this issue in cerner/carbon-graphs Apr 27, 2020
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 <[email protected]>
@jeremyfuksa
Copy link

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.

@pranav300 pranav300 removed their assignment Sep 28, 2020
@mjhenkes mjhenkes transferred this issue from cerner/carbon-graphs Jan 8, 2021
@mjhenkes mjhenkes added this to the Backlog milestone Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants