Kiril Okun
Kiril Okun

Reputation: 41

How to separate Apostrophe syles from the front end template

I keep running into the conflicts between the front end CSS styles and Apostrophe's own. For example, after i added the template Apostrophe form input fields are now shown in all capitals and alignment is all off. Is there a recommended way to separate them into different scopes? Thanks in advance.

Upvotes: 0

Views: 99

Answers (1)

VadimG
VadimG

Reputation: 559

This is a very common issue to CMSes, not only to Apostrophe. Personally, I've developed a habit of limiting the scope of all my CSS and JS files to that of the modules they refer to and since then I've never had any single issue with it.

I.e. I have a module called widget and I wrap it in an element that has class 'widget'. This allows me to scope my css only to that '.widget'. Luckily using BEM and less makes scoping a walk in the park.

Upvotes: 2

Related Questions