ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 147 - Certified User Experience Designer discussion

Report
Export

A UX Design team is doing a review of a new Lightning Web Component (IWC). They are following the Salesforce Lightning Design System (SLDS) block, element, modifier (BEM) naming conventions.

Which class does NOT follow this convention?

A.
.slds-avatar_circle
Answers
A.
.slds-avatar_circle
B.
.slds-box
Answers
B.
.slds-box
C.
.slds--size-l-of-2
Answers
C.
.slds--size-l-of-2
Suggested answer: C

Explanation:

The SLDS BEM naming convention consists of three parts: block, element, and modifier. A block is a standalone component that can be reused across projects, such as a button, a card, or a modal. An element is a part of a block that has no standalone meaning, such as a label, an icon, or a header. A modifier is a flag that changes the appearance or behavior of a block or an element, such as size, color, or state. The modifier is separated from the block or element by two hyphens (--), and can have a value separated by a single hyphen (-), such as .slds-button--brand or .slds-button--neutral. The class .slds--size-l-of-2 does not follow this convention because it has no block or element name before the modifier. It should be something like .slds-grid--size-l-of-2 or .slds-col--size-l-of-2.Reference:

[1]: Salesforce Lightning Design System - Introduction

[2]: Salesforce Lightning Design System - Naming Con

asked 23/09/2024
Bas Vogel
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first