edit CSS file using .button:not(a.button--danger) so that no reset is needed on button--danger

Created on 30 October 2013, over 10 years ago
Updated 10 August 2023, 11 months ago

Follow-up from #1986074: Buttons style update → .

When restyling the buttons in the Seven theme we added a 'danger' variant that actually looks more like a link:

This required us to override all the default button styling and undo it:

.button--danger {
  display: inline;
  cursor: pointer;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  -webkit-appearance: none;
     -moz-appearance: none;
  color: #c72100;
  font-weight: 400;
  text-decoration: underline;
}

The ideal markup here would be to to remove the button classes completely and simply style it as a link, without having to undo the base styling.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom LewisNyman

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India roshni27

    Drupal Version :10.1.2
    PHP Version 8.1.16
    Seven Theme : 1.0.0-alpha1
    No patch applied.
    I have shared a screenshot in which the 'delete' button style appeared correct.

Production build 0.69.0 2024