AEM Forms basicTheme.css overwriting my own style | Community
Skip to main content
Level 3
Jul 14, 2017 11:35 AM UTC
Solved

AEM Forms basicTheme.css overwriting my own style

Hi,

I am currently having a problem where the basicTheme.css, that comes with the Forms package, is overwriting other parts of my site. Is it possible to make the Form styles only effect elements within that form?

Or am I going to have to use !important in my own styles?

Thanks,

Karl

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
zeeshanKhan0786
zeeshanKhan0786Accepted solution
Level 5
Jul 14, 2017 1:04 PM UTC

No using !important is not a best way.You can go for make seperate clientLib for overriding the css having all you required css which you want to override and load at the end of Form loading or at the end of Page.

4 replies

Level 3
Jul 14, 2017 1:21 PM UTC

Thanks Zee.

Translate
zeeshanKhan0786
zeeshanKhan0786Accepted solution
Level 5
Jul 14, 2017 1:04 PM UTC

No using !important is not a best way.You can go for make seperate clientLib for overriding the css having all you required css which you want to override and load at the end of Form loading or at the end of Page.

Translate
Level 3
Jul 14, 2017 12:53 PM UTC

Is this really the best way?

Thanks,

Karl

Translate
zeeshanKhan0786
Level 5
Jul 14, 2017 11:58 AM UTC

Hi

Use !important is good to put because if you use Form anywhere in your Page by default basicTheme,css will applied.To take your css as priority use !important.

Translate