close
Skip to content

Ensure danger buttons have red hover state#2742

Merged
nickcharlton merged 1 commit into
thoughtbot:mainfrom
edwardloveall:el-fix-danger-hover
Feb 18, 2025
Merged

Ensure danger buttons have red hover state#2742
nickcharlton merged 1 commit into
thoughtbot:mainfrom
edwardloveall:el-fix-danger-hover

Conversation

@edwardloveall
Copy link
Copy Markdown
Contributor

074cb1a converted links that submit forms to buttons. To keep these now-buttons looking like links it uses the link class. CSS looks for buttons that are not(.link) to continue to style them appropriately.

However any .button--danger buttons did not get all the style overrides. In particular, :hover and :disabled:hover states fell back to the normal button background colors (blue).

This fixes those buttons to have the appropriate red hover states.

In addition, .link--danger elements also had a blue hover state. I'm not sure when this was broken, or if it was always supposed to be like that. Either way, I changed it so they now also appear slightly darker when hovered to match the buttons.

@nickcharlton
Copy link
Copy Markdown
Member

+3,250 −3,342

lol

Could you rebase this when you get a chance? Otherwise it looks good!

074cb1a converted links that submit forms to buttons. To keep these
now-buttons looking like links it uses the `link` class. CSS looks for
buttons that are `not(.link)` to continue to style them appropriately.

However any `.button--danger` buttons did not get all the style
overrides. In particular, `:hover` and `:disabled:hover` states fell
back to the normal button background colors (blue).

This fixes those buttons to have the appropriate red hover states.

In addition, `.link--danger` elements also had a blue hover state. I'm
not sure when this was broken, or if it was always supposed to be like
that. Either way, I changed it so they now also appear slightly darker
when hovered to match the buttons.
@edwardloveall
Copy link
Copy Markdown
Contributor Author

Look, I just love removing 3.3k lines

@nickcharlton nickcharlton merged commit 808cdfa into thoughtbot:main Feb 18, 2025
@edwardloveall edwardloveall deleted the el-fix-danger-hover branch February 22, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants