Reputation: 15032
jQuery UI's documentation can be quite confusing when it comes to what CSS you actually need and I saw some people rather include just all.
So if I've download jQuery UI:
Upvotes: 4
Views: 1379
Reputation: 15032
Including all the CSS will work, but it is the wrong approach...
This answer relates to current last stable release of jQuery UI: 1.11.4.
It depends on how you want to structure/split your CSS logic and whether you want to use
full-package or just some parts.
Just include production version of jquery-ui
CSS
jquery-ui.min.css
This file contains both:
- structure(for jQuery UI to work properly)
- theme CSS (for jQuery UI to look better :) ).
DON'T INCLUDE jquery-ui
CSS!
Include separate (production) file for structure and for theme e.g.:
jquery-ui.structure.min.css
and jquery-ui.theme.min.css
- in this order!
If you don't want to include theme at all, just include production version of jquery-ui.structure
...
If you worry about the performance/loading you've probably chose only some parts of jQuery UI, most probably, you could have done it in one of these ways...
If you've prepared your jQuery UI files through the Download Builder the instructions are the same as for Using full-package (see above).
If you've downloaded core and components, first include production version of the core CSS, e.g.:
core.min.css
Then include other CSS in an order that dependencies are before those that depend on them.
As last, include theme's production CSS.
Upvotes: 5