Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds font-color and border-radius to D2Style #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmotta
Copy link

@cmotta cmotta commented Feb 9, 2025

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
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant