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

Add unit to CSS zero-length variables #819

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatTheCat
Copy link

@MatTheCat MatTheCat commented Nov 28, 2024

Unitless values make CSS computations fail and return zero, which impacts ts-wrapper’s end padding if either the clear button or caret is missing.

This PR adds the same unit used when the variable is not zero.

Fixes #757

@MatTheCat MatTheCat changed the title Add unit to zero-length variables Add unit to CSS zero-length variables Nov 28, 2024
Comment on lines +84 to +85
--ts-pr-clear-button: 0em;
--ts-pr-caret: 0rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason two different units are used here? Of course, it shouldn't matter much, as 0 of anything is 0 of anything else.

Copy link
Author

Choose a reason for hiding this comment

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

This PR adds the same unit used when the variable is not zero.

As it could be whatever unit this seemed a good baseline to me.

bestpractical-mirror pushed a commit to bestpractical/rt that referenced this pull request Dec 16, 2024
Without units, the CSS max function calculates a value of
0, which results in no right margin on dropdowns. This causes
the width on col-auto to overlap the value and the dropdown
caret.

This may be fixed in future tom-select, see PR:

orchidjs/tom-select#819
bestpractical-mirror pushed a commit to bestpractical/rt that referenced this pull request Dec 17, 2024
Without units, the CSS max function calculates a value of
0, which results in no right margin on dropdowns. This causes
the width on col-auto to overlap the value and the dropdown
caret.

This may be fixed in future tom-select, see PR:

orchidjs/tom-select#819
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Caret overlaps with selected content
2 participants