I am developing a CMS and one of the design challanges is to isolate CSS to certain parts of the website-builder page
|||||||||||||||||||||||
| CMS HEADER |
|||||||||||||||||||||||
| C | |
| M | |
| S | BUILDER |
| | CANVAS |
| | |
|||||||||||||||||||||||
I need to isolate the CMS CSS of the header and the sidebars from the builder-canvas. I also need to CSS of the website you are building on the canvas to just be applied to the canvas.
I have tried..
- using CSS scoping and a jQuery plugin to do this, but because of the high amounts of CSS, this slows the already javascript-heavy builder to far down.
- iFrame is no option, because I need to use alot of JavaScript to get data from both parts at the same time.
The only other thing I can come up with is adding ID's to certain parts and prepending these ID's to every selector in the corresponding CSS files. I would use SASS to accomplish this.
This will take up huge amounts of time, mainly because I am also using plugin CSS files and Bootstrap in the CMS and I need to isolate EVERYTHING.
QUESTIONS
- Does adding these CSS ID's to every selector decrease performance much?
- Are there any other options to do this?