bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.09k stars 270 forks source link

chore(css): improvement of the readability #377

Closed YoranSys closed 2 years ago

YoranSys commented 2 years ago

Before: image

After : image

bkrem commented 2 years ago

Hi @YoranSys,

Thanks for this improvement on the SVG styling and sorry for the delayed review, I took some time off the past week.

The weird thing for me here is that when I run your changes against the demo I get a different result:

Screenshot 2022-03-04 at 15 40 11

But when I then additionally set stroke: none; explicitly for the title and attributes it looks correct/closer to your screenshots:

Screenshot 2022-03-04 at 15 41 41

Could you share a link to the implementation you grabbed the screenshots from so I can understand why it's different?

Otherwise I think if we add the explicit stroke: none; as mentioned above this should look as expected across the board hopefully, i.e.:

.rd3t-label__title {
  fill: #000;
  stroke: none;
  font-weight: bolder;
}

.rd3t-label__attributes {
  fill: #777;
  stroke: none;
  font-weight: bolder;
  font-size: smaller;
}
YoranSys commented 2 years ago

Hi @bkrem , You are right I overloaded ‘stroke: none;‘.

bkrem commented 2 years ago

Published as part of https://github.com/bkrem/react-d3-tree/releases/tag/v3.3.0

Thanks again 🙏