-
Notifications
You must be signed in to change notification settings - Fork 56
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
True semitransparency during uncover
#91
Open
ntjess
wants to merge
8
commits into
andreasKroepelin:main
Choose a base branch
from
ntjess:ntjess-main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried this myself already but never got the positioning of the covering rect right! So |
For instance, if an object to be hidden spans two background colors, you can specify `(fill: "000d", stroke: (bottom: rgb("fffd) + 0.2in))` to have the cover work even in that case "width" and "height" can also be directly overridden in cases where their defaults don't work properly, e.g. with heavy strokes of slanted lines
This will more closely match the current default of `gray.lighten(50%)`
Convenient for one-time background colors that shouldn't incur a cumbersome registration to global state
This allows inline content to remain inline after being covered
Consider the case of `cover-with-rect(block(...))`. This should explicitly be in its own block, but adding a box deterministically inside `cover` will promote this to inline content. Providing an optional argument allows block-level content to stay that way if desired. "inline" is still a sensible default, since paragraph breaks around a box will allow it to be its own block anyway.
Out of curiosity, any movement on reviewing this PR? |
Not yet, sorry. I am quite busy at the moment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #17 by providing a more generalized cover function. Works with several content types (not just text) and on several background colors instead of assuming white. Sample usage:
Produces: