-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove incorrect use important in swatches option text #30454
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
Remove incorrect use important in swatches option text #30454
Conversation
Hi @mrtuvn. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
376964b
to
df5ae12
Compare
@@ -326,7 +326,6 @@ | |||
margin: 2px 0; | |||
padding: 2px; | |||
position: static; | |||
z-index: 1; | |||
} |
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.
unneccesary define z-index
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.
@mrtuvn Can you please add manual testing scenarios so QA can check if selected
styling for swatch option text works properly after the change? Looks ok, but would wait for static tests to complete.
i have updated manual testing scenarios |
@magento run Static Tests |
@magento run Database Compare, Functional Tests CE, Functional Tests EE, Functional Tests B2B, Integration Tests, Magento Health Index, Sample Data Tests CE, Sample Data Tests EE, Sample Data Tests B2B, Unit Tests, WebAPI Tests |
@magento run Semantic Version Checker |
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.
Thanks @mrtuvn. Needs manual testing to check if selected
styling for swatch option text stays the same as before change.
Hi @ptylek, thank you for the review.
|
✔️ QA Passed Manual testing scenario: 1 .Create custom style less file for reproduce approach add style to swatch option text; body .swatch-attribute .swatch-option.text.selected { background-color: black; }
Before: ✖️ Background color is still white After: ✔️ Background color is black Scenario 2No customise styles After: ✔️ Selected swatch option have background-color white Checked and on the Blank theme and everything works as expected After: ✔️ Background color is black |
@magento create issue |
Hi @mrtuvn, thank you for your contribution! |
Description (*)
Developers will not able re-define styles in swatch option text when core file defined important
Here is example
body .swatch-attribute .swatch-option.text.selected { background-color: black; }
property
background-color
will not able apply when core magento defined important. The last solution is use another important with high css specificity to get higher priority than magentoRelated Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Scenario 1
Have customise styles for blank theme
ex:
body .swatch-attribute .swatch-option.text.selected { background-color: black; }
But it's not happen because core define important override define in _extend.less
Default magento is .swatch-option.text.selected {background-color: #ffffff !important} background color white will have high priority than other declare
Before change results: Background-color: black not apply, still have background color white in swatch-option selected
After change results: Background-color: black applied
Scenario 2
No customise styles
Swatch text option should show like before change
After results: remain visual same as before
Selected swatch option have background-color white
Questions or comments
Contribution checklist (*)
Resolved issues: