[Issue] Remove incorrect use important in swatches option text #30496
Labels
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Priority: P4
No current plan to fix. Fixing can be deferred as a logical part of more important work.
Progress: done
Reported on 2.4.0
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S4
Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
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 magentoSteps 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:
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 (*)
The text was updated successfully, but these errors were encountered: