Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to Style Components in AEM, css is not getting compiled - AEM version 6.5

Avatar

Avatar
Applaud 5
Level 1
Heena91
Level 1

Likes

0 likes

Total Posts

35 posts

Correct Reply

0 solutions
Top badges earned
Applaud 5
View profile

Avatar
Applaud 5
Level 1
Heena91
Level 1

Likes

0 likes

Total Posts

35 posts

Correct Reply

0 solutions
Top badges earned
Applaud 5
View profile
Heena91
Level 1

19-04-2021

Hi All,

 

I have created Maven Project, When I try to add styles to the components I was not able to see the styles on the components, css is not even getting compiled. 

 

Please Advise what is the correct structure to follow for ClientLib in AEM and how to apply these clientLib/styles to the components. 

 

Heena91_1-1618835227280.png

 

 

Thanks

Heena

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

373 likes

Total Posts

480 posts

Correct Reply

133 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

373 likes

Total Posts

480 posts

Correct Reply

133 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

19-04-2021

Hi @Heena91 

 

Please see the structure below:

asutosh_jena_0-1618835656947.png

 

This is how the index.less will look like:

@import 'variables/index.less';
@import 'mixins/index.less';

@import 'base/index.less';
@import 'structure/index.less';
@import 'vendor/bootstrap.less';
@import 'components/index.less';

 

css.txt will have the index entry only.

#base=styles
index.less

 We need to ensure the clientlib category is loading on the page.

 

Thanks!

Answers (0)