问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/46313346/how-to-separate-apostrophe-syles-from-the-front-end-template