title: Specify background-color as inline style for a row when there's a global style for <td>
body: <p>In a MediaWiki page, I'd like to set the background color for a specific table row. The site's global stylesheet already has a style for <code>&lt;td&gt;</code>, so the cells do not inherit the style from <code>&lt;tr&gt;</code> as they do by default:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>td {
    background-color:Salmon;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table border="1"&gt;
  &lt;tr&gt;&lt;td&gt;Salmon&lt;/td&gt;&lt;/tr&gt;
  &lt;tr style="background-color:Olive;"&gt;
  &lt;td&gt;Olive&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Salmon&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Since this is MediaWiki, <a href="https://www.mediawiki.org/wiki/Help:Tables#Attributes_on_rows" rel="nofollow noreferrer">I can only set attributes on table tags</a>. Can I somehow override <code>:td{background-color}</code> style to the default <code>inherit</code> for the table with them without having to copy it into each cell?</p>
  
  <p>Judging by <a href="https://www.w3.org/TR/css-style-attr/#syntax" rel="nofollow noreferrer">https://www.w3.org/TR/css-style-attr/#syntax</a> , this doesn't seem likely.</p>