button--danger background color overridden by button--primary styles in dialogs
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3588278. -->
Reported by: [charlliequadros](https://www.drupal.org/user/3789211)
Related to !780
>>>
<p>Gin 5.0.12 added rules in <code>styles/theme/dialog.scss</code> (compiled to <code>dist/css/theme/dialog.css</code>) that apply the primary color background to any <code>.button--primary</code> inside a <code>.ui-dialog</code>: </p>
<pre>.ui-dialog .button--primary { <br> background: var(--gin-color-primary);<br>}</pre><p>The Delete button in Drupal's confirmation dialogs has both the <code>button--primary</code> and <code>button--danger</code> classes. This causes the rule above to override the red background that should come from <code>var(--gin-color-danger)</code>.</p>
<p>The file <code>styles/components/dialog.scss</code> already handled .button--danger in dialogs, but only for border-color, not background-color: </p>
<pre>.button.button--danger { <br> border-color: var(--gin-color-danger) !important; // ← border only<br>}</pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add <code>background-color: var(--gin-color-danger) !important</code> to that same block to override the <code>button--primary</code> rule.</p>
<h3 id="summary-remaining-tasks">Steps to reproduce</h3>
<ol>
<li>Use Gin 5.0.12+</li>
<li>Open a node's delete confirmation dialog (via the "Delete" link in the sidebar)</li>
<li>The Delete button appears with a dark background instead of red</li>
</ol>
issue