Do not show overflow-y in gr-editable-content
Because of the way iron-autogrow-textarea works, There will never be a need to have a vertical scroll bar, as the text area expands accordingly. In cases where a horizontal scrollbar appeared (due to long lines of text), the height of the textarea shrank just enough for a vertical scrollbar to be added as well. There also appeared to be some browser quirks in which the scroll bars jumped around when they shouldn't. In order to prevent this from happening, hide overflow-y. Additionally, add box-sizing: border-box to all iron-autogrow-textarea instances, so that scrollbars appear correctly in shadow dom. Bug: Issue 6500 Change-Id: I28f3b47d656a246decd693f637040748ec4fd3a0
This commit is contained in:
@@ -46,6 +46,7 @@ limitations under the License.
|
||||
|
||||
--iron-autogrow-textarea {
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
font-family: var(--monospace-font-family);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ limitations under the License.
|
||||
|
||||
--iron-autogrow-textarea {
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
font-family: var(--monospace-font-family);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ limitations under the License.
|
||||
|
||||
--iron-autogrow-textarea {
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
font-family: var(--monospace-font-family);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ limitations under the License.
|
||||
font-family: var(--font-family);
|
||||
padding: .7em .7em;
|
||||
--iron-autogrow-textarea: {
|
||||
box-sizing: border-box;
|
||||
padding: 2px;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ limitations under the License.
|
||||
width: 100%;
|
||||
|
||||
--iron-autogrow-textarea: {
|
||||
box-sizing: border-box;
|
||||
overflow-y: hidden;
|
||||
white-space: pre;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ limitations under the License.
|
||||
--iron-autogrow-textarea: {
|
||||
border: 1px solid #d1d2d3;
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
font-size: 1em;
|
||||
padding: .25em .15em 0 .15em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user