Fixed plus sign position on table handle#1657
Merged
Merged
Conversation
Collaborator
|
Please add some description and/or screenshots to show the difference before and after your change? |
juliaroldi
reviewed
Mar 22, 2023
| backgroundColor: string | ||
| ): CreateElementData { | ||
| const inserterColor = isDark ? INSERTER_COLOR_DARK_MODE : INSERTER_COLOR; | ||
| const outerDivStyle = `position: fixed; width: ${INSERTER_SIDE_LENGTH}px; height: ${INSERTER_SIDE_LENGTH}px; font-size: 16px; color: ${inserterColor}; line-height: 10px; vertical-align: middle; text-align: center; cursor: pointer; border: solid ${INSERTER_BORDER_SIZE}px ${inserterColor}; border-radius: 50%; background-color: ${backgroundColor}`; |
Contributor
There was a problem hiding this comment.
is it possible to use css like align: center to style the plus sign, so we do not need to relay on hard coded number?
Contributor
Author
There was a problem hiding this comment.
The way the handle is constructed mostly uses hard coded values. We already use vertical and horizontal align to center it, however that is still too low, so we use line-height to correct it further.
JiuqingSong
approved these changes
Mar 24, 2023
This file contains hidden or 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
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.
Description:
The plus sign in the table handle used to add more rows and columns is misaligned with the circle.
Fix
Modified the value on line-height to rise by 2 pixels the position of the plus sign on the table handler. This was done to better center its position, especially when the handle is on a horizontal position.
Cases tested:
Observed the handle in vertical and horizontal position.
Before:
After:
Warnings and implications