-
-
Notifications
You must be signed in to change notification settings - Fork 1
[#4] Implement styles composition #6
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
[#4] Implement styles composition #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
Personally I would move the last inner function to be a method of Option in Util. Let me know your thoughts!
You're welcome! It's a pleasure to contribute to this library 🥰 As for Should I rename it to Otherwise, it conflicts with the standard |
Usually I use module Module = struct
include Module
...
endBut if you think this is overkill for this function I'm fine with keeping it as an inner function! |
|
@qexat That's totally fine, I do that as well sometimes 😌 Just pushed the commit with the update! |
qexat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, thank you a lot!
# 0.2.0 ## Features - Add color functions `luminance` and `best_for_contrast`. (by @chshersh in #5) - Add styling functions `fg`, `bg`, `bold`, `dim`, `italic`, `underlined`. (by @chshersh in #6) - Add styling composition with `&`. (by @chshersh in #6) - Add function `make_rgb_hex` to parse hexadecimal codes into RGB colors. (by @chshersh in #7) ## Breaking Changes - `Color.t` and `Color.Ground.t` are now polymorphic variants. (by @chshersh in #5) ## Removed - `Util.parenthesize_if` which is deemed unuseful and is kind of a duplicate of `Tree.parenthesize_if` in `Formatting`.
CHANGES: ## Features - Add color functions `luminance` and `best_for_contrast`. (by @chshersh in qexat/ansifmt#5) - Add styling functions `fg`, `bg`, `bold`, `dim`, `italic`, `underlined`. (by @chshersh in qexat/ansifmt#6) - Add styling composition with `&`. (by @chshersh in qexat/ansifmt#6) - Add function `make_rgb_hex` to parse hexadecimal codes into RGB colors. (by @chshersh in qexat/ansifmt#7) ## Breaking Changes - `Color.t` and `Color.Ground.t` are now polymorphic variants. (by @chshersh in qexat/ansifmt#5) ## Removed - `Util.parenthesize_if` which is deemed unuseful and is kind of a duplicate of `Tree.parenthesize_if` in `Formatting`.
Closes #4
Implemented utilities for composable styles as per the discussed design in
I verified in
utopthat it works!Let me know if you want any adjustments!