0

Am building a chrome extension. Where i defined styles for a element textarea like this

<textarea class='text-area'></textarea>

.text-area {
   padding: 15px;
   border: 2px solid red;
 }

But it's looking diffrent on one site to another. Consider a site www.somesite.com where they have their own styles for textarea like this.

textarea {
 background-color: something;
 font: something;
}

Browser applying both styles for this textarea, But i don't want. This is a simple case, i have similar issue with many other elements in extension. Please suggest me a better way to have my extension unique in all the website where user opens it. Thanks

seven-phases-max
  • 11,765
  • 1
  • 45
  • 57
  • Is `.text-area` the whole of your selector? Do yourself a favour and use an id. – Mr Lister Jun 30 '17 at 13:18
  • is `id` preferable to use for a reusable components like `text-area`? because i may use `text-area` twice in same form? –  Jul 13 '17 at 12:29
  • Ah, sorry, from your description I though somehow that your textarea would only appear once on the page.n that case you'd be able to give it a unique ID and never have to worry about other elements which happened to have the same class. My mistake. – Mr Lister Jul 13 '17 at 12:36

0 Answers0