ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 23 - AD0-E720 discussion

Report
Export

An Adobe Commerce developer is extending a theme from Magento\blank and wants to override parent styles. Which file does the developer need to change to override the parent theme styles?

A.
web/css/source/_extends.less
Answers
A.
web/css/source/_extends.less
B.
web/css/source/_extend.less
Answers
B.
web/css/source/_extend.less
C.
web/css/source/_theme. less
Answers
C.
web/css/source/_theme. less
Suggested answer: B

Explanation:

To override the parent theme styles, the developer needs to change the web/css/source/_extend.less file in the child theme. This file is used to import and extend the parent theme styles without modifying the original files. The developer can use the @import directive to import the parent theme styles and then use the .lib-css() mixin to override the CSS properties. For example:

@import 'source/_extend.less'; // Import parent theme styles .lib-css(color, red); // Override color property

The web/css/source/_extends.less and web/css/source/_theme.less files are not valid and will not work, as they do not follow the theme structure or the naming convention.

Reference: [Theme inheritance], [Extend parent theme styles]

asked 02/10/2024
Daniel Bucknor-Ankrah
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first