fix(menu): restore Add button hover state (#80)#278
Open
vaibhavis9024 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title:
fix(menu): restore Add button hover state (#80)Summary
Restores the missing hover state on the Add button across all product cards.
Fixes #80
Problem
On every product card in Today's Specials, Recently Viewed, and Explore Our Menu, hovering the Add button produced no visual feedback. The CSS hover rule was defined but never had any effect.
Root cause
createCard()injs/main.jswas rendering the button with an inlinestyle="background-color: …"attribute. Inlinestyledeclarations win over external CSS for the same property, so the inlinebackground-colorwas overriding the:hoverrule'sbackgroundchange on every hover event.The class-name mismatch called out in the issue (
btn-addin CSS vsadd-btnin JS) is real but is a separate orange-theme leftover — the maintainer has confirmed the green color is intentional, so this PR does not touch that path.Fix
Remove the inline
styleattribute (and the now-unusedbuttonColorvariable that fed it) from thecreateCard()template. The existing CSS then takes over on its own:.card-footer .add-btnpaints the available button green (#2e7d32).card-footer .add-btn:hoverdarkens it to#1b5e20with the shadow and 1px lift.add-btn:disabled { background-color: #cccccc !important; }keeps out-of-stock items greyTheme preserved
Per the maintainer's note that the off-theme green is intentional, the button color is unchanged. This PR only restores the missing hover transition.