Fix textarea styling for firefox

` --iron-autogrow-textarea_-_white-space` needs to be
explicitly set to `pre-wrap` for textareas in firefox, without it,
the multi-line will render incorrectly.

This affects all `iron-autogrow-textarea`, so move it to
shared-styles as most of components are not using gr-textarea.

A todo might be moving to use `gr-textarea` in those components.

Bug: Issue 12551
Change-Id: Ie42d24ee88c5dc7ce9973d1dc5cf1e3164415580
(cherry picked from commit 927d8bb1da)
This commit is contained in:
Tao Zhou
2020-05-18 10:55:52 +02:00
committed by Paladox none
parent 34a3f262ec
commit 5c8a7b76a3
2 changed files with 6 additions and 4 deletions

View File

@@ -50,9 +50,6 @@ export const htmlTemplate = html`
}
iron-autogrow-textarea {
position: relative;
/** This is needed for firefox */
--iron-autogrow-textarea_-_white-space: pre-wrap;
}
#textarea.noBorder {
border: none;

View File

@@ -160,7 +160,12 @@ $_documentContainer.innerHTML = `<dom-module id="shared-styles">
/* paper-tabs uses 0.8 here, but we want to control the color directly */
opacity: 1;
color: var(--deemphasized-text-color);
}; }
};
}
iron-autogrow-textarea {
/** This is needed for firefox */
--iron-autogrow-textarea_-_white-space: pre-wrap;
}
strong {
font-weight: var(--font-weight-bold);
}