AEM forms basic theme overriding other parts of site | Community
Skip to main content
Level 2
Aug 11, 2017 6:51 PM UTC

AEM forms basic theme overriding other parts of site

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.

4 replies

smacdonald2008
Level 10
Aug 11, 2017 9:41 PM UTC

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

Translate
Hina29Author
Level 2
Aug 11, 2017 10:05 PM UTC

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.

Translate
smacdonald2008
Level 10
Aug 14, 2017 11:07 PM UTC

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.

Translate