Missing CSS .

Avatar

Avatar

AEMnewbie

Avatar

AEMnewbie

AEMnewbie

22-08-2020

I created a small component , with some CSS.

1.CSS was created at  component/clientlib/less/x.less level

2. And then this file name was added in css.txt 

3. And an x component group was added.

4. Navigated to structure page customheaderlibs.html and noticed that it is referring to clientlib-base

5. Navigated to clientlibs folder and added my component x in the embed.

 

When i deployed my code changes and navigated to my page which uses this component, in the network tab under clientlib-base.css i dont see my component less css .

 

I am using AEM 6.5 service pack 6.5.4 . Not sure what else needs to be verified .

View Entire Topic

Avatar

Avatar

Ravi_Pampana

MVP

Avatar

Ravi_Pampana

MVP

Ravi_Pampana
MVP

22-08-2020

Hi,

 

Can you provide where css.txt is added and the path how it is added to css.txt ?

 

Usually if we add like below it should work 

 

/apps/yourproject/components/yourcomponent/clientlibs/css/custom.less

/apps/yourproject/components/yourcomponent/clientlibs/css.txt - 

 

Content inside css.txt

     #base=css
      custom.less

 

clientlibs - should have jcr:primaryType "cq:ClientLibraryFolder" and should have categories added.

 

Also if less file is not formed properly (missing syntax) then the css wont generate and added to clientlib file.