Remove dead code in gr-textarea

The backgroundColor prop was unused in the app. This change removes it,
and sets inputs in the app to inherit their color instead of being the
default white.

Change-Id: Iaff2ae945f6a8e65739a66ec936002d80f21bb21
This commit is contained in:
Kasper Nilsson
2018-04-17 14:36:58 +02:00
parent a649784abe
commit cc8a40a5e3
4 changed files with 1 additions and 18 deletions

View File

@@ -41,7 +41,6 @@ limitations under the License.
display: inline-block
}
#textarea {
background-color: var(--background-color, none);
width: 100%;
}
#hiddenText #emojiSuggestions {

View File

@@ -70,10 +70,6 @@
notify: true,
observer: '_handleTextChanged',
},
backgroundColor: {
type: String,
value: '#fff',
},
hideBorder: {
type: Boolean,
value: false,
@@ -123,9 +119,6 @@
if (this.hideBorder) {
this.$.textarea.classList.add('noBorder');
}
if (this.backgroundColor) {
this.updateStyles({'--background-color': this.backgroundColor});
}
},
closeDropdown() {

View File

@@ -25,7 +25,6 @@ limitations under the License.
<link rel="import" href="gr-textarea.html">
<script>void(0);</script>
<test-fixture id="basic">
<template>
<gr-textarea></gr-textarea>
@@ -60,15 +59,6 @@ limitations under the License.
assert.isTrue(element.$.textarea.classList.contains('noBorder'));
});
test('background color is set properly', () => {
assert.equal(getComputedStyle(element.$.textarea).backgroundColor,
'rgb(255, 255, 255)');
element.backgroundColor = 'pink';
element.ready();
assert.equal(getComputedStyle(element.$.textarea).backgroundColor,
'rgb(255, 192, 203)');
});
test('emoji selector is not open with the textarea lacks focus', () => {
element.$.textarea.selectionStart = 1;
element.$.textarea.selectionEnd = 1;

View File

@@ -35,6 +35,7 @@ limitations under the License.
}
input,
iron-autogrow-textarea {
background-color: inherit;
box-sizing: border-box;
margin: 0;
padding: 0;