py-d2 icon indicating copy to clipboard operation
py-d2 copied to clipboard

Adds font-color and border-radius to D2Style

Open cmotta opened this issue 9 months ago • 0 comments

This pull request adds support for font-color and border-radius within the D2Style class. These additions allow users to further customize the appearance of their diagrams by controlling the font color and border radius of elements.

Changes:

  • Added font_color (Optional[str]) and border_radius (Optional[str]) parameters to the D2Style constructor.
  • Included tests for both attributes and added them to the all styles test

Example Usage:

from py_d2.style import D2Style

style = D2Style(
    stroke="#0000FF",
    fill="#ADD8E6",
    font_color="red",  # New
    border_radius="10" # New
)

cmotta avatar Feb 09 '25 01:02 cmotta