Commit 7ede47e3 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Fix error messages for large fonts/languages

Error messages currently appear cut off for large fonts and languages
that cause the messages to wrap onto more than 2 lines.

Size error messages to the full height of the text content and update
styling so that the labels stay aligned with the input when error
messages appear.

Bug: 898802, 887992
Change-Id: I07036adc127cd9fa95ddede51c44790c867e31ba
Reviewed-on: https://chromium-review.googlesource.com/c/1345544Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610330}
parent 33f395ae
......@@ -35,6 +35,7 @@
.summary {
display: block;
height: 1em;
min-height: 20px;
}
......
......@@ -8,15 +8,15 @@
<dom-module id="print-preview-number-settings-section">
<template>
<style include="print-preview-shared">
:host(:not([input-valid])) #section-title {
margin-top: calc(-14px - 2 * .75rem);
}
:host {
/* Width = 3 digits + space + cr-input-padding-end/start */
--cr-input-width: calc(4em + 16px);
}
#sectionTitle {
align-self: baseline;
}
cr-input {
margin-inline-end: 16px;
min-height: 38px;
......@@ -41,7 +41,7 @@
}
</style>
<print-preview-settings-section>
<span slot="title" id="section-title">[[inputLabel]]</span>
<span slot="title" id="sectionTitle">[[inputLabel]]</span>
<div slot="controls" id="controls">
<span class="input-wrapper">
<cr-input id="userValue" type="number"
......
......@@ -37,8 +37,7 @@
}
:host #title {
justify-content: flex-start;
padding-top: 9px;
align-self: baseline;
}
</style>
<print-preview-settings-section>
......
......@@ -15,7 +15,7 @@
--md-select-width: calc(100% - 17px);
--print-preview-settings-border: 1px solid rgb(232, 234, 237);
--print-preview-dialog-margin: 34px;
--cr-form-field-label-height: 1.5rem;
--cr-form-field-label-height: initial;
--cr-form-field-label-line-height: .75rem;
--destination-item-height: 32px;
}
......
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