Themeroller re-factor for 1.6rc3 summary
The Themeroller will go through a fairly major overhaul for this release which will set the stage for a broader and more consistent use of Themeroller styles in jQuery UI. These include:
- re-vamped layout to make more room for widgets and make the left bar easily converted into a future bookmarklet tool.
- new, extended class framework with a new naming convention that is more scalable and better organized that can serve as a powerful CSS API
- re-class all the current 1.6 widgets, demos and documentation to use new, generic classes and move away from custom variablized css per widget
- re-factor icon set into a single PNG 8 sprite with anti-aliasing, extend icon set to be more comprehensive
- introduce versioning for Themeroller downloaded css and tool
- add optional (and experimental) css-based corner classes to the css framework and TR tool
- add new levers for shadow color, opacity, thickness, offset
- add an inspector style interaction so a user can click on a widget and see what TR lever it maps to or hover on a lever on the left and see all the places it is used in the widgets
Themeroller re-factor status
(updated Tuesday, Dec 29)
- CSS framework (100% complete)
Almost complete, major levers are stable and documented. Still need to add levers for overlay shadow, header offset, and re-name the corner classes to be NSEW instead of TBLR
- ThemeRoller app layout (100% complete)
New layout is roughed out on dev server, still working on cleanup on UI for pickers and need to write the inspector interaction code
- ThemeRoller theme gallery (100% complete)
Design sketch and proposed functionality posted for review
- Static demo pages for each widget in 1.6rc3 (100% complete)
We have pages for each widget that look solid with the new classes. We're now working on building our variations for every major option within a widget and writing new styles to support them. Once completed, we will then move on to browser QA. Development of new classes and markup can begin now for scripts.
Rounded Corners in ThemeRoller:
Rounded Corners will be implemented in the next version of ThemeRoller via CSS Border-Radius. This is where rounded corners are specified via CSS3's border-radius rule. Radius will default to zero and will be adjustable via a lever in the ThemeRoller interface; most likely a select menu of options that look best.
These settings will generate framework classes that can be applied to widgets to allow specific corners to be rounded. These classes look like .ui-corner-ne or .ui-corner-right or .ui-corner-all (for rounding 4 corners). Since these are now fairly compact, we are discussing using them in our own UI widgets.
We think this approach is the least obtrusive to both markup and external implementations and is most forward-looking in terms of markup best practices. IE users will not see rounded corners, which may not be acceptable for some clients, but of course a developer can always tweak the CSS to their needs. It is unclear whether IE8 will implement border-radius, but it will be easy to support it when it
does.
Note that css border-radius has some disadvantages: It's not fully cross-browser yet (works in safari and firefox, but not IE7). Corner smoothness can vary, particularly at
higher contrasts. Doesn't always look great in Firefox. Requires
browser-specific CSS at this time, but is always followed with the w3c syntax.
Spinner icons
As discussed, we do need to figure out how to let users drop in a variety of animated Ajax spinner icons like ajaxload.info. The big issue we need ot solve is that these are typically animated gifs which have only 1 level of transparency which means that we can only produce aliased loaders or need to create custom loader animations anti-alised against the correct backgroung color and texture where they appear in the interface. We've created a very small and simple transparent alias animated gif that uses straight lines and white/gray/black colors so it will look ok (but not great) on any color.
Here is an example of this simple loader on a range of colors:
The ideal situation would be to have animated spinners that are created with multiple levels of alpha transparency so one loader would work on any background automatically. This would require using the PNG-24 format which doesn't support animation and does not work in IE6 and would require a hack. We'd need to create spinners in the form of a large sprite with each animation frame placed side-by-side, then clipped and moved on an interval to make it look like an animation. Anyone want to try a proof of concept for this?
High contrast mode for accessibility
We should think about addressing High Contrast Mode (where, for example, background images get turned off). The basic strategy to deal with HCM is to detect the mode in onload (and to be the first onload handler), and
dynamically load a style sheet which might for example, change a close
box background image into a letter 'x'. To try out HCM on Windows try
[Left alt]+[Left shift]+[print screen].
We could easily create a HCM theme in Themeroller and jsut use this via the mechanism described above. Maybe David Bolter can offer more details on how to detect for this mode in a browser. Should be pretty easy to do and worth the effort. Assuming that text sizes should also be bumped up quite a bit too
Comments (13)
Richard D. Worth said
at 2:13 pm on Nov 21, 2008
I love the first two themes. I think we should use UI Orange glass as the default in svn and UI website demos (call it default) and Corporate blue (maybe call it classic?) on the jQuery UI wiki docs demos. Or if you wanted to do a different one to match the jquery.com colors more closely...
Also, what about more color in the dialog and progressbar?
Todd Parker said
at 4:07 pm on Nov 21, 2008
I just added 2 more ideas. The colors in the dialog and progress bar are all based on the TR states so you'd need to use more colors on these in your theme to make them more colorful. The bar fill is mapped to % opacity of the default state (this is an oddball) and the header for the dialog is the content area class (see my idea above about using a new class for this called titlebar of something like that).
Ca-Phun Ung said
at 9:21 am on Nov 25, 2008
Should we change ".ui-component-" to ".ui-widget-" ?
Paul Bakaus said
at 10:13 am on Nov 25, 2008
+1 for changing .ui-component- to .ui-widget-
scottjehl said
at 2:11 pm on Nov 25, 2008
sounds like a good idea.
also .ui-widget-content
kbwood said
at 3:37 am on Nov 26, 2008
I think a disabled state would also be useful, such as for prev/next links in datepicker when they don't apply due to minimum/maximum date restrictions.
Todd Parker said
at 11:47 am on Jan 23, 2009
Stuardo -StR- Rodríguez commented:
Just an idea, now that ajax is so common, the need for a "loading" image is always needed. I saw ajaxload.info and thought that the themeroller could do the same, generate the same images (all of them to be included in the zip file) using the theme colors.
The themeroller should also create required icons, like the calendar for the datepicker.
Response from Todd P. : The Ajaxload functionality is a good idea and we've discussed the need for a loader image generator and wonderedif they had an API we could use for this. We'll need to look into this in more detail. On big consideration is that most spinners are animated Gifs that are anti-aliased against a specific background color. This makes it really hard in the UI widgets because we have such an open theming architecture, it's not possible to easily know what color (or texture) the spinner will be sitting on. So we either need to create a simpler, aliased spinner that would work ok on any color or develop a PNG-24 based spinner with alpha transparency that uses a sprite that is shifted to produce an animation.
Re: icons for the datepicker, the new CSS framework and ThemeRoller app has a very extensive set of dynamically colored icons in a sprite, including a calendar icon. That just needs to be added to the datepicker demo. See them here: http://jqueryui.pbwiki.com/jQuery-UI-CSS-Framework
Todd Parker said
at 11:57 am on Jan 23, 2009
Mike Robinson said:
I would second that, great idea and would be really useful. A couple of things I could do with in Themeroller are:
1) Styles for odd & even rows
2) A general background image/color
Response from Todd P. : The color for odd and even rows is tricky because it doesn't easily map to a broader purpose or state like the current TR levers which can be used across a broad range of other widgets like button hover, titlebar, and error. If there is a color or texture that only makes sense for a single widget, it may need to be set within that plugin to keep the themes from becomes too complex to configure (too many levers is overwhelming). It's a good idea though. One option would be to try and use a TR class like ui-widget-header but calculate a color value that is only 10% of the color or something like that so it is themeable. The issue with this approach is if the header is a light color, the color may not be visible and we also need to worry about text color and contrast levels. Any ideas on the topic appreciated :).
The ui-widget-content is meant to be a good general purpose background color. We use it for the main content area for accordions, tabs, menus, dialogs, etc. Give that class a try.
Stuardo -StR- Rodríguez said
at 6:51 am on Jan 24, 2009
<blockquote>The ideal situation would be to have animated spinners that are created with multiple levels of alpha transparency so one loader would work on any background automatically. This would require using the PNG-24 format which doesn't support animation and does not work in IE6 and would require a hack.
</blockquote>
Or you could set the color in the theme creation step, just like ajaxload.info does
Mike Robinson said
at 3:36 pm on Jan 25, 2009
Hi Todd, Thanks for the reply about table rows. I have actually tried to use the existing ui-widget-header class color and apply a transparency to it (eg. odd = 30%, even = 20%) this works ok for a single theme but when using the theme switcher I am struggling to get the new color from the theme. Anyway, in the longer term I would suggest having a seperate stylesheet for table styles within the theme ie. ui.tables.css. I see there is work being done on a grid widget so I guess some of this will be covered there, I will wait and see what happens with that and let you know if I can get a hack that will work.
Todd Parker said
at 9:16 pm on Aug 23, 2009
We're looking into introducing a new ThemeRoller lever eventually that is designed for secondary content situations like striped table rows. Stay tuned, might not happen for a while though.
Kartik Sehgal said
at 6:56 am on Aug 21, 2009
Hi,
Firstly, thank you for making such a great themeroller that makes our job so easy for theming a site. I do have a few questions.
1. I do not see any updates to this page since about 6 months back. Can we have an idea what is going to be the upcoming strategy for the themeroller?
2. I can see a lot of plugins coming up. Will the themeroller support them and by when?
3. I tried using portlets under sortable plugin. Some classes are shown in the source code in the demo page. How can I make it compatible to the available themes? Do I have to do it manually?
4. How can I extend the themerolling capability to my custom plugins.
Any guidelines will be greatly appreciated.
Thanks in advance! :)
Todd Parker said
at 9:14 pm on Aug 23, 2009
@Kartik 1. Themeroller is pretty solid so the only changes you'll see in the next few months is maybe some new icons, textures and gallery themes. As we continue to refine and grow the CSS framework, we may have to make adjustments to the ThemeRoller app. For example, if we add a new lever (like content-secondary), we'll add that.
2. Every plugin we build will be ThemeRoller-ready when released. Some plugins (like StackFix) may not have any visual appearance so these won't use the CSS framework but those are exceptions. Since ThemeRoller manipulates a set of semantic css classes, we can actually add new widgets without needing to change the ThemeRoller UI.
3/4. As long as a plugin (or even static html) uses our CSS framework classes and you've linked to a ThemeRoller theme, it will pick up the theme. It's that simple.
Learn about the CSS framework here:
http://jqueryui.pbworks.com/jQuery-UI-CSS-Framework
Tutorial:
http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/
You don't have permission to comment on this page.