Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between jquery.ui.theme.css and jquery-ui.css?

In a project I'm working on we have a /themes/ directory with all the jQuery ui-themes in it. I get that they overwrite certain styles of the base class, but why are there two different css files (jquery.ui.theme.css and jquery-ui.css)? AND why are they seperate? Do I need to include both, or just one?

like image 295
Jazzepi Avatar asked Jun 12 '13 01:06

Jazzepi


People also ask

What is jQuery UI theme?

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

What is jQuery UI structure CSS?

The jquery-ui. structure. css file provides the structural CSS rules (such as margins and positioning), and the jquery-ui. theme. css file contains the theming rules (such as backgrounds, colors, and fonts).

What happened jQuery UI?

jQuery maintainers are continuing to modernize its overall project that still is one of the most widely deployed JavaScript libraries today. The team announced that the cross-platform jQuery Mobile project under its umbrella will be fully deprecated as of October 7, 2021.

Is jQuery UI a framework?

One of the largest and widely used frameworks is jQuery UI. It's an extended set of widgets, effects, and themes built off of jQuery, separated into its own set of components.


1 Answers

Docs say that jquery-ui.css is just jquery-ui.theme.css appended to jquery-ui.structure.css. If you download these files from ThemeRoller both jquery-ui.css and jquery-ui.theme.css will contain custom changes. jquery-ui.structure.css remains the same across customizations.

The theme file is responsible for the look and feel whereas the structure file is responsible for the layout and functionality.

Some reasons for not using jquery-ui.css

It makes sense to offer a split version of these files in order to use something like cdnjs for jquery-ui.structure.css but your own server (or CDN solution) to deliver your customized jquery-ui.theme.css.

Or if you use multiple themes on your site it allows for smaller data traffic because the browser might already have a cached version of jquery-ui.structure.css when encountering an uncached theme (jquery-ui.theme.css).

like image 128
user764754 Avatar answered Oct 18 '22 15:10

user764754