Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions paper-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
white-space: normal;
line-height: normal;
color: var(--paper-checkbox-label-color, var(--primary-text-color));
width: calc(100% - var(--paper-checkbox-size) - var(--paper-checkbox-label-spacing));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

--paper-checkbox-size -> --calculated-paper-checkbox-size
var(--paper-checkbox-label-spacing) -> var(--paper-checkbox-label-spacing, 8px)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, slight hiccup here: this change prevents you from using 0 for --paper-checkbox-label-spacing if you're trying to clear the styling so you can use an external label, which I suspect is a relatively common case. Particularly, you can't add lengths (which have units) and unitless values with calc(). Also, you can't multiply two or more values having units, as the result would have units which aren't lengths; so multiplying by 1px or something to get around this is out. :/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

cc: @danbeam

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, after reading the CSS values spec, this appears to be a bug in the implementation of calc() that happens to exist in all of Chrome / Firefox / Safari. (I haven't tried out Edge yet.) Filed as https://bugs.chromium.org/p/chromium/issues/detail?id=641556

@apply(--paper-checkbox-label);
}

Expand Down