MyBB Community Forums

Full Version: Combine CSS into one single file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
what about combining the CSS in 1.8, instead of making many calls to small CSS files consuming server requests?

Can there be a function to to append all the CSS and output the CSS to single flat file or cache?

no need for minify and or gzipping or anything but those would be nice too

just to combine the CSS and out to flat file or cache
This won't happen in the 1.x core as its too big of a change to make. It may be possible for 2.0 however.
I don't think this is honestly necessary, because I depend on specifying which CSS codes (files) I'd like to work on each page.
when you connect to a server the browser will make 4 requests at a time, if you load up the queue, your site will be slow as hell.


AND if MYBB wants to copy IPB, the can load a array of CSS's in the header as required

here is CSSTidy
http://csstidy.sourceforge.net/usage.php

The CSS are in a database field already aint they? SO just grab all the fields and append them together and call index css, forumdisplay.css etc
(2015-10-02, 10:44 AM)sparkks Wrote: [ -> ]I don't think this is honestly necessary, because I depend on specifying which CSS codes (files) I'd like to work on each page.

Use <style> attributes? also, if this happens it'll work on all pages (i got this on my forum).
yes there is a the default CSS and JS for the index which should be the minimum file, then you can add page specific CSS and JS but only one of each for each page......so you are cascading adding on extra CSS and JS as needed.....but each page should ONLY have one extra JS and CSS

As a matter of fact it would be nice to have both JS and CSS in the backend as data entries.....like CSS cascading as is now.....the developers just need a function to pull them out of DB, cache them as index.css, forumdisplay.css and deliver the exact named file to the correct location Toungue

for instance:

Quote:global.css
Attached to all pages
bootstrap-fixes.css
Attached to all pages
css3.css
Attached to all pages

should all be in global.css

Quote:usercp.css
Attached to usercp.php, usercp2.php and private.php

each of these pages should have an extra css for page specific: usercp.php.css, usercp2.php.css, private.php.css


EDIT: you can pretty much use Global Templates
Used by all themes

as a JS repository