-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add destroy link in the show template #2146
Conversation
@nickcharlton I'm completely a noob when it comes to css. Could you help clean it up? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! I left some comments that should fix the warning. After that, I think this is good to merge.
@@ -40,6 +40,16 @@ input[type="submit"], | |||
background-color: $action-color; | |||
} | |||
} | |||
|
|||
&--danger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved out of the nesting, same as .button--alt
and .button--nav
below.
@@ -40,6 +40,16 @@ input[type="submit"], | |||
background-color: $action-color; | |||
} | |||
} | |||
|
|||
&--danger { | |||
@extend .button; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ha. OK, the right way to solve this (if I recall correctly) is not to extend, and instead to declare both classes (button button--danger
) when wanting this effect. For a similar example see:
<%= link_to(t("administrate.navigation.back_to_app"), root_url, class: "button button--alt button--nav") if defined?(root_url) %> |
I know it doesn't sound very DRY, but CSS is a weird beast and this approach appears to be more manageable. Here I think we follow BEM as methodology.
@@ -40,6 +40,16 @@ input[type="submit"], | |||
background-color: $action-color; | |||
} | |||
} | |||
|
|||
&--danger { | |||
@extend .button; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go away when the above is fixed.
212146e
to
f61d0cb
Compare
@pablobm Thank you for the help! The hound check is green now ✔️ |
Thank you! |
Close #2143.