Description
This issue is automatically created based on existing pull request: #30454: Remove incorrect use important in swatches option text
Preconditions (*)
Magrento 2.4-develop
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 magento
Steps to reproduce:
Scenario 1
1 .Create custom style less file for reproduce approach add style to swatch option text;
2. Path file can be app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_extend.less
3. In file _extend.less add style like description
ex:
body .swatch-attribute .swatch-option.text.selected { background-color: black; }
- Run cache clean and deploy static content
- Go to a category with a product on Storefront;
Actual Result: ✖️ Background color is still white
Expected Result: ✔️ Background color is black
Scenario 2
No customise styles
Swatch text option should show like before change
Expected Result:
Selected swatch option have background-color white
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status