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

feat: Add text-transform attribute to the style block #1118

Merged
merged 1 commit into from
Apr 8, 2023

Commits on Apr 8, 2023

  1. Add text-transform attribute to the style block

    This provides an option to override the functionality provided by the
    theme, or apply `text-transform` outside of the theme.
    
    The functionality of the `text-transform` is as below:
    
    - `text-transform: none` - will disable **any** transformation (like the uppercasing by `terminal` theme)
    - `text-transform: uppercase` (uppercase not upper as per your message) - will force all characters into uppercase.
    - `text-transform: lowercase` - will force all characters into lowercase.
    - `text-transform: capitalize` - will uppercase the first letter of every word
    
    In addition, this commit introduces:
    - helper methods on the `d2graph.Style` struct to determine the type of
      `text-transform` to be applied.
    - `ApplyTextTransform` method on the `d2graph.Attributes` which will
      transform the `Label.Value` to the correct text case.
    alexstoick committed Apr 8, 2023
    Configuration menu
    Copy the full SHA
    a260068 View commit details
    Browse the repository at this point in the history