Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

CSS files in the component

Avatar

Level 2

Hi,

As we have created the new component in our project like /apps/{project}/components/ and inside this component we have added the client libs also having the CSS file.

So is it good to have the CSS file in component itself or we should always add CSS file in global CSS only not in component. 

I just want to know what is the best practice to add CSS file.

Thanks,

Pankaj

1 Accepted Solution

Avatar

Correct answer by
Level 10

If it's only the component that is using the CSS - place it in the clientlibs in the component. If many components use the CSS, place it in a global location. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

If it's only the component that is using the CSS - place it in the clientlibs in the component. If many components use the CSS, place it in a global location.