AEM forms basic theme overriding other parts of site | Community
Skip to main content
Level 2
August 11, 2017

AEM forms basic theme overriding other parts of site

  • August 11, 2017
  • 1 reply
  • 3593 views

When i include a form on a page its button:not()  theme.css is overriding  styles defined by classes on other button components on the page

theme.css

button:not(.af-icon-button)input[type='button']{

//styles here

}

custom.css

.xyz{

}

What should i do to get the style on button class xyz

Thanks

Hina

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

smacdonald2008
Level 10
August 11, 2017

WHy not put your CSS applicable to the Form in its own ClientLib - then it will not impact other parts of the site.

Level 2
April 17, 2020

This is still a relevant topic for AEM Forms. I'm guessing not that many people use it because its pretty evident. When the guideContainer is loaded, the common clientlib gets loaded, adding reset and overrides for things like inputs, buttons and containers, which is ok, if you only have AEM forms on your page, but usually there are things like headers and megamenus and container, which will get affected. 

 

I'm still yet to find a way to NOT include this clientlibrary but haven't been able to, and a solution such as "Add more styles in another separate clientlib (?)" its not feasible and a waste of developers time.

 

Any other suggestions?