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: multiple borders #889

Merged
merged 69 commits into from
Sep 28, 2024
Merged

Conversation

Tropix126
Copy link
Contributor

@Tropix126 Tropix126 commented Sep 15, 2024

Depends on #836.

  • Removes the border_align attribute.
    • This was necessary to do since individual borders can have their own alignments. Also, since the border style argument can only be solid or none anyways, this seemed reasonable.
    • If more styles other than solid (dashed, dotted, etc...) are eventually added (adding these at this point would be pretty ridiculously complex) they can be added as an optional argument e.g. 1 inner dotted red.
    • Replaces the redundant <style> field with alignment intead. Syntax is now <width> <width?> <width?> <width?> <align> <fill> e.g. 1 inner red.
  • Adds support for styling multiple borders on a single rect (similar to how shadow already works).
rect {
    width: "80",
    height: "80",
    corner_radius: "2",
    background: "rgb(0, 0, 0)",
    border: "6 outer red, 5 outer orange, 4 outer yellow, 3 outer green, 2 outer blue, 1 outer purple",
    margin: "8"
}

image

@marc2332 marc2332 added the enhancement 🔥 New feature or request label Sep 15, 2024
@marc2332 marc2332 self-requested a review September 28, 2024 16:41
@marc2332 marc2332 added this to the 0.3.0 milestone Sep 28, 2024
Copy link
Owner

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely.

@marc2332 marc2332 merged commit 45b515c into marc2332:main Sep 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants