CSS files in the component | Community
Skip to main content
Level 2
October 16, 2015
Solved

CSS files in the component

  • October 16, 2015
  • 2 replies
  • 848 views

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

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 smacdonald2008

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. 

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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. 

Level 2
October 16, 2015

Thanks :)