Is using the jQuery theme for the whole site wrong?

I recently talked with jquery (ui), and now I want to add some jquery bits to my personal site. Well, the themes created by Theme Roller are really awesome, and I would like my whole site to look like this, and not just a few parts with jquery support. So, is it wrong to use the css classes listed in http://jqueryui.com/docs/Theming/API for your own things that don't actually use javascript? How to make <div class="ui-widget">

Is there a simpler / cleaner way to do this that I don't see? Is this a normal approach or is it too complicated?

+4
source share
3 answers

Answer: no, it is not. In general, you are on the right track. Use jQuery classes, they are for some reason! However, do not change them. If you need to improve the look, add your own custom classes or identifiers, this way you won’t create css default mess and break the jQuery Plug. See the links below for more information.

Keep in mind that if you plan on using JQuery UI as the basis, you will need to worry about backward compatibility issues if JQuery changes / updates its own CSS files, this is another reason why any custom style you make should be made using your own jQuery's support classes.

http://docs.jquery.com/UI/Theming/API - Refer to this webpage to find out where and how to apply jQuery default classes.

http://www.filamentgroup.com/lab/developer_your_own_jquery_themeroller_ready_components/ - This is a bit outdated, but contains useful information on how to compile custom classes using jQuery

http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/ - In this article you will learn more about buttons, note that it is more relevant than the previous one, but both of them are valuable for conceptualizing your idea.

+6
source

It is not, but it can confuse people if you use chaotically styles

jQueryUI is currently under development; the last beta has a new function that creates buttons for you, so you can see that all styles will ultimately have a specific purpose and script for creating elements

+2
source

No, this is not wrong to do at all. In fact, it will be considered effective code to achieve a good finished product.

In a recent jQuery conference in Boston, we saw a demonstration by the Filament group (the people who built the thematic video), and they say they use theme elements for all of their sites. They then use the bookmarklet when they meet with the client to change the whole topic on the fly. Just changing the theme, the whole site changes the style and colors.

Just remember that the dot should not be there when you use the class in HTML:

 <div class="ui-widget"> 
+1
source

Source: https://habr.com/ru/post/1299755/


All Articles