Using Core Components and BEM CSS classes | Community
Skip to main content
Level 2
October 9, 2019
Solved

Using Core Components and BEM CSS classes

  • October 9, 2019
  • 6 replies
  • 5278 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankur_Khare

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-develop.html

6 replies

Nirmal_Jose
Adobe Employee
Adobe Employee
October 9, 2019

Below could be a great starting point.

Ankur_Khare
Community Advisor
Community Advisor
October 10, 2019

nirmaljosehere

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

ArpitVarshney
Community Advisor
Community Advisor
October 10, 2019

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 Component CSS-based Styles

Regards,

Arpit Varshney

Ankur_Khare
Community Advisor
Ankur_KhareCommunity AdvisorAccepted solution
Community Advisor
October 10, 2019

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-develop.html

Level 2
October 11, 2019

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.

arunpatidar
Community Advisor
Community Advisor
October 11, 2019

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