Commit c4777f8c authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Fix polish bug with custom margins radio button

Previously, the height of the custom margins error message was fixed
at 2 lines of text. However, this resulted in the message being cut off
for some languages/font sizes. Allowing a variable height error message
broke the logic setting the custom radio button's position, so this CL
updates the positioning logic so that the radio button stays centered
on the cr-input regardless of the height of the error message.

Bug: 911958
Change-Id: If9e1655e0d2bb87de46ac3c1749b5b07cd831bd7
Reviewed-on: https://chromium-review.googlesource.com/c/1369027Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615431}
parent 4860ebe6
......@@ -23,11 +23,11 @@
--cr-input-error-display: none;
}
:host([error-state_='1']) #customRadioButton,
:host([error-state_='2']) #customRadioButton {
/* Margin = -1 * error height = -1 * (16px + 2 lines * line-height) */
:host #customRadioButton {
--cr-radio-button-disc: {
margin-top: calc(-16px - 2 * .75rem);
align-self: baseline;
/* Margin = (38px row height - 16px disc size) / 2 */
margin-top: 11px;
};
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment