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.

Hina29Author
Level 2
August 11, 2017

I am using the default theme.css for the form component. When this component is dragged on a page that contains other components having button. It overrides there styles.

smacdonald2008
Level 10
August 14, 2017

Try putting the CSS into a  separate clientlib that will not impact other parts of the site. That is only used in the form where you want that specific style.