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

replace attachStylerCallback with css variables #171669

Merged
merged 1 commit into from Jan 18, 2023

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Jan 18, 2023

No description provided.

@aeschli aeschli enabled auto-merge (squash) January 18, 2023 20:32
@aeschli aeschli self-assigned this Jan 18, 2023
@aeschli aeschli added this to the January 2023 milestone Jan 18, 2023
Comment on lines -423 to -425
this.countElement.style.borderWidth = border ? '1px' : '';
this.countElement.style.borderStyle = border ? 'solid' : '';
this.countElement.style.borderColor = border;
Copy link
Member

Choose a reason for hiding this comment

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

There are a few here that aren't equivalent, for example this might end up showing a border when contrastBorder isn't set? Not sure what happens when the shorthand used is "1px solid "

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If a css variable cannot be resolved, the full property value is ignored, and the property is set to inherit.
That's both for single values and for combined values (like border).

That why the separate borderWidth, borderStyle and borderColor are all combined into one property, to emulate the if (border) check

@aeschli aeschli merged commit 125ca4e into main Jan 18, 2023
@aeschli aeschli deleted the aeschli/ashamed-marmoset-161 branch January 18, 2023 20:51
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants