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:
		@@ -41,7 +41,6 @@ limitations under the License.
 | 
			
		||||
        display: inline-block
 | 
			
		||||
      }
 | 
			
		||||
      #textarea {
 | 
			
		||||
        background-color: var(--background-color, none);
 | 
			
		||||
        width: 100%;
 | 
			
		||||
      }
 | 
			
		||||
      #hiddenText #emojiSuggestions {
 | 
			
		||||
 
 | 
			
		||||
@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ limitations under the License.
 | 
			
		||||
      }
 | 
			
		||||
      input,
 | 
			
		||||
      iron-autogrow-textarea {
 | 
			
		||||
        background-color: inherit;
 | 
			
		||||
        box-sizing: border-box;
 | 
			
		||||
        margin: 0;
 | 
			
		||||
        padding: 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user