2

I'm writing a single-page web application, but I'm struggling with some frameworks.

It seems almost every modern framework, like Bootstrap or Framework7 uses very basic classnames like row or navbar.

Because of this I can't use both frameworks on a webpage at the same time, which is limiting my options. For some pages (like a homepage) Bootstrap is nice, but for other pages I prefer the components of Framework7.

Is there any way to solve this problem, other than using entirely different HTML-files ?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
Dylan
  • 9,129
  • 20
  • 96
  • 153
  • 3
    I think most people would discourage the use of multiple css frameworks on one page. They're pretty heavy and would require a substantial amount of work to get them to play nicely together. I would recommend using one framework customized to your liking to standardize the look and feel of your entire site. – yts May 12 '16 at 13:26

1 Answers1

0

The following options can be used to namespace CSS:

  • iframe per framework

  • Create a SASS file which namespaces each framework using the cascade by prefixing each framework rule with a selector which maps to a parent element with the specified class name.

References

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265