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
 | 
					        display: inline-block
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      #textarea {
 | 
					      #textarea {
 | 
				
			||||||
        background-color: var(--background-color, none);
 | 
					 | 
				
			||||||
        width: 100%;
 | 
					        width: 100%;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      #hiddenText #emojiSuggestions {
 | 
					      #hiddenText #emojiSuggestions {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,10 +70,6 @@
 | 
				
			|||||||
        notify: true,
 | 
					        notify: true,
 | 
				
			||||||
        observer: '_handleTextChanged',
 | 
					        observer: '_handleTextChanged',
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      backgroundColor: {
 | 
					 | 
				
			||||||
        type: String,
 | 
					 | 
				
			||||||
        value: '#fff',
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      hideBorder: {
 | 
					      hideBorder: {
 | 
				
			||||||
        type: Boolean,
 | 
					        type: Boolean,
 | 
				
			||||||
        value: false,
 | 
					        value: false,
 | 
				
			||||||
@@ -123,9 +119,6 @@
 | 
				
			|||||||
      if (this.hideBorder) {
 | 
					      if (this.hideBorder) {
 | 
				
			||||||
        this.$.textarea.classList.add('noBorder');
 | 
					        this.$.textarea.classList.add('noBorder');
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (this.backgroundColor) {
 | 
					 | 
				
			||||||
        this.updateStyles({'--background-color': this.backgroundColor});
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    closeDropdown() {
 | 
					    closeDropdown() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,6 @@ limitations under the License.
 | 
				
			|||||||
<link rel="import" href="gr-textarea.html">
 | 
					<link rel="import" href="gr-textarea.html">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>void(0);</script>
 | 
					<script>void(0);</script>
 | 
				
			||||||
 | 
					 | 
				
			||||||
<test-fixture id="basic">
 | 
					<test-fixture id="basic">
 | 
				
			||||||
  <template>
 | 
					  <template>
 | 
				
			||||||
    <gr-textarea></gr-textarea>
 | 
					    <gr-textarea></gr-textarea>
 | 
				
			||||||
@@ -60,15 +59,6 @@ limitations under the License.
 | 
				
			|||||||
      assert.isTrue(element.$.textarea.classList.contains('noBorder'));
 | 
					      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', () => {
 | 
					    test('emoji selector is not open with the textarea lacks focus', () => {
 | 
				
			||||||
      element.$.textarea.selectionStart = 1;
 | 
					      element.$.textarea.selectionStart = 1;
 | 
				
			||||||
      element.$.textarea.selectionEnd = 1;
 | 
					      element.$.textarea.selectionEnd = 1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,7 @@ limitations under the License.
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      input,
 | 
					      input,
 | 
				
			||||||
      iron-autogrow-textarea {
 | 
					      iron-autogrow-textarea {
 | 
				
			||||||
 | 
					        background-color: inherit;
 | 
				
			||||||
        box-sizing: border-box;
 | 
					        box-sizing: border-box;
 | 
				
			||||||
        margin: 0;
 | 
					        margin: 0;
 | 
				
			||||||
        padding: 0;
 | 
					        padding: 0;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user