Expand my Community achievements bar.

SOLVED

Using Core Components and BEM CSS classes

Avatar

Level 3

If I want to develop a site using only core components with no customized components, do I need to ask the design and css teams to develop the css classes with BEM notation same as in core components? How do the coordination between AEM teams and design teams work and what are the best practices?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi  Santhi ,

I think what you need to do is-

1. Identify what all components you will be using from core components.

2. Create a page using these components

3. Identify the classes used there

4. Share the same with design team

Summit2018/chapters/chapter-4 at L725 · Adobe-Marketing-Cloud/Summit2018 · GitHub

Refer below chapters for better understanding-

Summit2018/chapters at L725 · Adobe-Marketing-Cloud/Summit2018 · GitHub

https://helpx.adobe.com/experience-manager/kt/sites/using/style-system-core-components-tutorial-deve...

View solution in original post

6 Replies

Avatar

Employee Advisor

Below could be a great starting point.

Screenshot 2019-05-30 at 22.41.31.png

Avatar

Community Advisor

nirmaljosehere

This doesn't answer original question whether ui team need to follow BEM NOTATION?

Avatar

Community Advisor

Hi Santhi

Core Component has been created using adobe's best practices and recommended by Adobe for component development as a reference.

  • For core component, Adobe uses BEM methodology which is highly useful, powerful, and simple naming convention that makes your front-end code easier to read and understand, easier to work with, easier to scale, more robust and explicit, and a lot more strict.
  • Component development best practices outline that CSS rules should target BEM (Block Element Modifier) CSS class names, and these BEM CSS classes are considered the stable HTML API of the component.

It will be good if you follow the same approach.

Reference: Getting Started with Core Components and the AEM Style System - Part 6 - Applying the Teaser Compone...

Regards,

Arpit Varshney

Avatar

Correct answer by
Community Advisor

Hi  Santhi ,

I think what you need to do is-

1. Identify what all components you will be using from core components.

2. Create a page using these components

3. Identify the classes used there

4. Share the same with design team

Summit2018/chapters/chapter-4 at L725 · Adobe-Marketing-Cloud/Summit2018 · GitHub

Refer below chapters for better understanding-

Summit2018/chapters at L725 · Adobe-Marketing-Cloud/Summit2018 · GitHub

https://helpx.adobe.com/experience-manager/kt/sites/using/style-system-core-components-tutorial-deve...

Avatar

Level 3

Thanks guys. In addition, I think the component wrapper div element plays a key role here and must be configured via style system for all components. Say if there are two different lists to be displayed o the page, the wrapper div element would be different fro two lists. Use the same core proxy component for both but with style system handling the wrapper divs.

Avatar

Community Advisor

You can use container components well to combine 2 or more components and apply style on both together.

Style can also be added to the container component.

We are also working with Core components heavily.

Layout mode, Experience Fragments also play a big role if you are going to rely on core components only.



Arun Patidar