• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Should there be multiple CSS files?

Should there be multiple CSS files?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 1 100.0%

  • Total voters
    1
  • Poll closed .

LPH

Flight Director
Flight Instructor
XenWord options are growing and with each option comes CSS needed for the div, span, etc. Would it be easier if there were different CSS files for widgets. Currently there is one public CSS file and one admin CSS file.

Benefits: easier to find the CSS to edit
Challenges: multiple CSS files would need to be concatenated by a plugin on the WP side. Otherwise, the page load time would increase.
 

Gracie

Dogs Times Writer
I'd recommend that you keep one file but organize it with clear headings for different sections.
 

Adam H

Young Flying Bird
The less CSS files the better, unless of course a certain page only needs a certain part of CSS and therefore it would be a waste to call the entire CSS load for the sake of one thing. The likelihood of being able to do that for widgets though is slim.

You could use smaller CSS files if you was to combine and minifiy I suppose which effectively creates one CSS file in the order it should be executed ( good for reducing code bloat and pageload times ) but it depends if you want to go down that route and retain compatibility
 

DPF

Teen Bird
I'll have to figure out a good way to separate things out.

If you haven't put any more work in to this, simply creating the CSS file and then creating sections using comments works great.

Code:
/* CSS Index
1. Main Plugin
2. Widget A
3. Widget B
4. Widget C
5. Widget D
*/

/****************
Main CSS
****************/
#mainStuff {};
/****************
Widget A
****************/
#widgetA{};
/****************
Widget B
****************/
#widgetBP{};
/****************
Widget C
****************/
#SoOnandOn{};
 
Top