wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz styles in Magento 2

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the correct way to define a mixin in LESS?

a)

.my-mixin(@arguments) {

...

}

b)

@my-mixin($arguments) {

...

}

c)

=my-mixin(@arguments) {

...

}

d)

@mixin my-mixin($arguments) {

...

}

2.

What does the special variable @arguments do in a LESS mixin?

a)

Takes the arguments that were passed into the mixin an renders them in that order

b)

Contains default arguments that are passed into the mixin an renders them in that order.

c)

Defines additional arguments to be used in the mixin.

d)

Contains default arguments that are passed to all mixins by the framework

3.

Which of the main css files included in the default_head_blocks.xml file in a Magento theme? Select all that apply.

a)

styles-m.css

b)

styles-l.css

c)

print.css

d)

screen.css

4.

Where should overrides of existing LESS variables be added?

a)

<theme_dir>/web/css/source/_layout.less

b)

<theme_dir>/web/css/source/_variables.less

c)

<theme_dir>/web/css/source/lib/_variables.less

d)

<theme_dir>/web/css/source/_theme.less

5.

What command would you use to create symlinks to LESS files for the Magento/luma theme in the fr_FR locale?

a)

bin/magento setup:static-content:deploy -f

b)

bin/magento setup:static-content:deploy --area frontend --theme Magento/luma

c)

bin/magento dev:source-theme:deploy --theme Magento/luma

d)

bin/magento dev:source-theme:deploy --locale fr_FR --theme Magento/luma

6.

What is the main difference between client-side and server-side compilation in Magento 2?

a)

Client-side compilation is faster than server-side compilation

b)

Server-side compilation is faster than client-side compilation

c)

Client-side compilation is performed in the browser, while server-side compilation is performed on the server

d)

Server-side compilation is performed in the browser, while client-side compilation is performed on the server

7.

How would you create an override for the core Magento UI library dropdowns in your theme?

a)

theme_dir>/web/css/source/_dropdowns.less

b)

<theme_dir>/Magento_Ui/web/css/source/lib/_dropdowns.less

c)

<theme_dir>/lib/web/css/source/_dropdowns.less

d)

<theme_dir>/web/css/source/lib/_dropdowns.less

8.

What command do you need to run when you create a new LESS file?

a)

bin/magento setup:perf:generate-fixtures

b)

bin/magento setup:static-content:deploy

c)

bin/magento dev:source-theme:deploy

d)

bin/magento setup:di:compile

9.

Where are the CSS merging and minification options found?

a)

In the Admin panel, in Stores > Configuration > Advanced > Developer > CSS Settings

b)

In app/env.php

c)

In dev/tools/grunt/configs/themes.js

d)

In app/config.php

10.

How are the Magento UI Library mixins imported in a LESS file?

a)

@import '../../css/source/lib/[name_of_module]';

b)

@import 'lib/[name_of_module]'

c)

@import (reference) '../../css/source/lib/lib';

d)

@magento_import 'lib/[name_of_module]'

11.

What is the difference between overriding and extending Magento 2 LESS?

a)

There is no difference between overriding and extending in Magento 2 LESS

b)

Overriding and extending have the same meaning in Magento 2 LESS

c)

Overriding adds new styles, while extending replaces existing styles

d)

Overriding replaces existing styles, while extending adds new styles

12.

Which file is used to extend or override Magento 2 LESS?

a)

app/design/frontend/{Vendor}/{Theme}/web/css/styles.css

b)

app/design/frontend/{Vendor}/{Theme}/web/css/_extend.less

c)

app/code/{Vendor}/{Module}/view/frontend/web/css/styles.css

d)

app/code/{Vendor}/{Module}/view/frontend/web/css/_module.less

13.

What is the difference between a mixin and an extend in Magento 2?

a)

Mixins and extends have the same meaning in Magento 2

b)

There is no difference between mixins and extends in Magento 2

c)

A mixin combines styles, while extending adds new styles

d)

A mixin replaces styles, while an extend combines styles

14.

What is the purpose of using mixins in Magento 2?

a)

To reuse common styles across multiple CSS rules

b)

To add new functionality to Magento 2

c)

To optimize the performance of Magento 2

d)

To override default styles in Magento 2

15.

Which file is used to style emails in Magento 2? Sellect all that apply.

a)

app/design/frontend/{Vendor}/{Theme}/web/css/styles.css

b)

app/design/frontend/{Vendor}/{Theme}/web/css/source/_email-variables.less

c)

app/design/frontend/{Vendor}/{Theme}/web/css/styles.css

d)

app/design/frontend/{Vendor}/{Theme}/web/css/source/_email-extend.less