From 49b54bbeede03a630047c07c2b205ed43878317c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?= Date: Thu, 15 Jan 2015 11:40:28 +0100 Subject: [PATCH 1/2] jquery-ui: Update theming related pages Drop the api page and link to the correct api.jqueryui.com page instead, delete the bad write-a-theme page, collapse the theming folder and fix the order of the widget-factory pages. --- order.json | 13 ++-- page/jquery-ui/{theming => }/themeroller.md | 17 +---- page/jquery-ui/theming.md | 12 ++-- page/jquery-ui/theming/api.md | 78 --------------------- page/jquery-ui/theming/write-a-theme.md | 54 -------------- 5 files changed, 13 insertions(+), 161 deletions(-) rename page/jquery-ui/{theming => }/themeroller.md (63%) delete mode 100644 page/jquery-ui/theming/api.md delete mode 100644 page/jquery-ui/theming/write-a-theme.md diff --git a/order.json b/order.json index 33678c5d..5a8527f8 100644 --- a/order.json +++ b/order.json @@ -129,17 +129,14 @@ "jquery-ui": [ "getting-started", "how-jquery-ui-works", - { - "theming": [ - "themeroller", - "api", - "write-a-theme" - ] - }, + "theming", + "themeroller", { "widget-factory": [ "why-use-the-widget-factory", - "how-to-use-the-widget-factory" + "how-to-use-the-widget-factory", + "widget-method-invocation", + "extending-widgets" ] }, { diff --git a/page/jquery-ui/theming/themeroller.md b/page/jquery-ui/themeroller.md similarity index 63% rename from page/jquery-ui/theming/themeroller.md rename to page/jquery-ui/themeroller.md index c16e9e2c..bae47368 100644 --- a/page/jquery-ui/theming/themeroller.md +++ b/page/jquery-ui/themeroller.md @@ -22,13 +22,11 @@ ThemeRoller themes can be viewed via permalink URLs, and it includes a gallery o ### Downloading Themes -When you're done designing a theme, you can download it for use in your projects. ThemeRoller has a "Download theme" button at the top which will generate a zip file containing all of the theme assets. Images included in your download will be generated to your specifications and saved as high-quality PNG files. - -Your theme will include images and CSS that make up a customized version of the jQuery UI CSS Framework including images and CSS for all of our plugins. +When you're done designing a theme, you can download it for use in your projects. ThemeRoller has a "Download theme" button at the top which will lead you to the download builder page. From there you can also pick the components to download with your theme. Finally the Download button at the bottom will generate a zip file containing the theme along with assets like images and any components you picked. Images included in your download will be generated to your specifications and saved as high-quality PNG files. ### Installing Downloaded Themes Into Your Project -Once the theme has been downloaded and unzipped, you will see a folder named `themes`. This folder contains the CSS and images needed for your theme. Copy the theme directory into your project and link to the `themes/all.css` file from your pages. +Once you've unzipped the package, you will see several `css` and `js` files, along with two folders. If you're only interested in the full theme, copy `jquery-ui.css` and the `images` folder into your project and link to the `jquery-ui.css` file from your pages. ### Building Custom "ThemeRoller-Ready" Components ![ThemeRoller Ready Banner](/resources/jquery-ui/themeroller-ready-black-200px.png) @@ -36,13 +34,4 @@ Once the theme has been downloaded and unzipped, you will see a folder named `th ThemeRoller generates a customized version of the jQuery UI CSS Framework for developing your own ThemeRoller-ready jQuery components. The classes generated by this framework are designed to accommodate common user interface design situations and include states, icons, and various helper classes as well. -For information on developing with the jQuery UI CSS Framework, visit our [Theming API documentation](/jquery-ui/theming/api). - -### ThemeRoller Links -* [Tutorial: Develop Your Own jQuery "ThemeRoller-Ready" Components, Filament Group](http://www.filamentgroup.com/lab/developer_your_own_jquery_themeroller_ready_components/) -* [Introducing ThemeRoller: Design & Download Custom Themes for jQuery UI, Filament Group](http://www.filamentgroup.com/lab/introducing_themeroller_design_download_custom_themes_for_jquery_ui/) -* [Videos about Design & Download Custom Themes for jQuery UI, Filament Group](http://vimeo.com/1113981?pg=embed&sec=1113981) - -### Credits - -ThemeRoller was designed and developed for jQuery UI by [Filament Group, Inc](http://www.filamentgroup.com), of Boston, MA. +For information on developing with the jQuery UI CSS Framework, visit our [Theming API documentation](http://api.jqueryui.com/theming/css-framework/). diff --git a/page/jquery-ui/theming.md b/page/jquery-ui/theming.md index 25cd2b35..01dc3cc4 100644 --- a/page/jquery-ui/theming.md +++ b/page/jquery-ui/theming.md @@ -3,13 +3,13 @@ "level": "intermediate" } -All jQuery UI plugins are designed to allow a developer to seamlessly integrate UI widgets into the look and feel of their site or application. Each plugin is styled with CSS and contains two layers of style information: standard [jQuery UI CSS Framework](/jquery-ui/theming/api/) styles and plugin-specific styles. +All jQuery UI plugins are designed to allow a developer to seamlessly integrate UI widgets into the look and feel of their site or application. Each plugin is styled with CSS and contains two layers of style information: standard [jQuery UI CSS Framework](http://api.jqueryui.com/theming/css-framework/) styles and plugin-specific styles. The jQuery UI CSS Framework provide semantic presentation classes to indicate the role of an element within a widget such as a header, content area, or clickable region. These are applied consistently across all widgets so a clickable tab, accordion, or button will all have the same `ui-state-default` class applied to indicate that it is clickable. When a user mouses over one of these elements, this class is changed to `ui-state-hover`, then `ui-state-active` when selected. This level of class consistency makes it easy to ensure that all elements with a similar role or interaction state will look the same across all widgets. -The CSS Framework styles are encapsulated in a single file called `ui.theme.css` and this is the file modified by the [ThemeRoller](/jquery-ui/theming/themeroller/) application. Framework styles only include attributes that affect the look and feel (primarily color, background images, and icons) so these are "safe" styles that will not affect functionality of individual plugins. This separation means that a developer can create a custom look and feel by modifying the colors and images in the `theme.css` file and know that as future plugins or bug fixes become available, these should work with the theme without modification. +The CSS Framework styles are encapsulated in a single file called `theme.css` and this is the file modified by the [ThemeRoller](/jquery-ui/theming/themeroller/) application. Framework styles only include attributes that affect the look and feel (primarily color, background images, and icons) so these are "safe" styles that will not affect functionality of individual plugins. This separation means that a developer can create a custom look and feel by modifying the colors and images in the `theme.css` file and know that as future plugins or bug fixes become available, these should work with the theme without modification. -Since the framework styles only cover look and feel, plugin specific stylesheets are included that contain all the additional structural style rules required to make the widget functional, such as dimensions, padding, margins, positioning, and floats. Stylesheets for each plugin are located in the `themes/base` folder of the download and are named to match the plugin such as "jquery.ui.accordion.css". These styles must be carefully edited because they work in conjunction with the scripting and provide overrides of framework styles as needed. +Since the framework styles only cover look and feel, plugin specific stylesheets are included that contain all the additional structural style rules required to make the widget functional, such as dimensions, padding, margins, positioning, and floats. Stylesheets for each plugin are located in the `themes/base` folder of the download and are named to match the plugin such as "accordion.css". These styles must be carefully edited because they work in conjunction with the scripting and provide overrides of framework styles as needed. We encourage all developers creating jQuery plugins to leverage the jQuery UI CSS Framework because it will make it much easier for end users to theme and use your plugin. @@ -17,8 +17,6 @@ We encourage all developers creating jQuery plugins to leverage the jQuery UI CS There are three general approaches to theming jQuery UI plugins: -* **Download a ThemeRoller theme**: The easiest way to build a theme is to use the [ThemeRoller](/jquery-ui/theming/themeroller/) to generate and download a theme. This app will create a new `ui.theme.css` file and an `images` directory containing all necessary background images and icon sprites which can simply be dropped into your project. This approach will be the easiest to create and maintain but limits customization to the options provided in ThemeRoller. -* **Modify the CSS files**: To get a bit more control over the look and feel, you may choose to start with the default theme (Smoothness) or a ThemeRoller-generated theme and then adjust the `ui.theme.css` file or any of the individual plugin stylesheets. For example, you could easily tweak the corner radius for all buttons to be different than the rest of the UI components or change the path for the icon sprite to use a custom set. With a bit of style scoping, you can even use multiple themes together in a single UI. To keep maintenance simple, restricting changes to just the `ui.theme.css` file and images is recommended. +* **Download a ThemeRoller theme**: The easiest way to build a theme is to use the [ThemeRoller](/jquery-ui/theming/themeroller/) to generate and download a theme. This app will create a new `theme.css` file and an `images` directory containing all necessary background images and icon sprites which can simply be dropped into your project. This approach will be the easiest to create and maintain but limits customization to the options provided in ThemeRoller. +* **Modify the CSS files**: To get a bit more control over the look and feel, you may choose to start with the default theme (Smoothness) or a ThemeRoller-generated theme and then adjust the `theme.css` file or any of the individual plugin stylesheets. For example, you could easily tweak the corner radius for all buttons to be different than the rest of the UI components or change the path for the icon sprite to use a custom set. With a bit of style scoping, you can even use multiple themes together in a single UI. To keep maintenance simple, restricting changes to just the `theme.css` file and images is recommended. * **Write completely custom CSS**: For the greatest amount of control, the CSS for each plugin can be written from scratch without using the framework classes or plugin-specific stylesheet. This may be necessary if the desired look and feel can't be achieved by modifying the CSS or if highly customized markup is used. This approach requires deep expertise in CSS and will require manual updates for future plugins. - -### Using ThemeRoller, the jQuery UI CSS Framework, and Writing Custom Themes diff --git a/page/jquery-ui/theming/api.md b/page/jquery-ui/theming/api.md deleted file mode 100644 index e2d693c4..00000000 --- a/page/jquery-ui/theming/api.md +++ /dev/null @@ -1,78 +0,0 @@ - - -[Back to jQuery UI Theming](/jquery-ui/theming/) - -### The jQuery UI CSS Framework - -jQuery UI includes a robust CSS Framework designed for building custom jQuery widgets. The framework includes classes that cover a wide array of common user interface needs, and can be manipulated using jQuery UI ThemeRoller. By building your UI components using the jQuery UI CSS Framework, you will be adopting shared markup conventions and allowing for ease of code integration across the plugin community at large. - -### Framework Classes - -The following CSS classes are split between `ui.core.css` and `ui.theme.css`, depending on whether styles are fixed and structural, or themeable (colors, fonts, backgrounds, etc.) respectively. These classes are designed to be applied to user interface elements to achieve visual consistency across an application and allow components to be themeable by jQuery UI ThemeRoller. - -### Layout Helpers - -* `.ui-helper-hidden`: Applies `display: none` to elements. -* `.ui-helper-hidden-accessible`: Applies accessible hiding to elements (via absolute positioning off the page.) -* `.ui-helper-reset`: A basic style reset for UI elements. Resets things such as `padding`, `margin`, `text-decoration`, `list-style, etc. -* `.ui-helper-clearfix`: Applies float wrapping properties to parent elements. -* `.ui-helper-zfix`: Applies iframe "fix" CSS to `