type: utility
release: 0.0
priority: high
status: in planning
documentation: url || N/A
demo: url || N/A
1 - Description:
This utility is used to create a styled, semi-transparent layer under a DOM element or widget to create the illusion of a dropshadow without the need for images. There are levers in the CSS framework and ThemeRoller tool to support the definition of the shadow's apearance: thickness, offset, texture, color, opacity.
A version of this was written for 1.7, but pulled for performance issues (need link to demo and specs from Paul). An example of the shadow can be seen int eh static mockup on the ThemeRoller page:
http://jqueryui.com/themeroller/
2 - Visual Design:
(Initial wireframe mockup, followed by more detailed designs of the various configurations, options and states.)
3 - Functional Specifications/Requirements:
- The shadow can be called on any dom element or widget
- The shadow must be automatically protected by default with the stackfix utility to avoid z-index issues
- Sized to the same dimensions as the calling element
- Positioned directly under the calling element
- The ui-widget-shadow class must be applied to the shadow
- This class will apply padding and offsets to achieve the theme's shadow style
- No colors, opacity or other attibutes that will interfere with the theming rules should be written by this plugin
4 - Markup & Style:
4.1 Initial markup examples
(Pre-enhanced HTML markup structure that will be transformed into the final widget. There may be multiple possible HTML markup options per widget: for example, for a slider, radiobuttons, inputs or selects could all be used. )
4.2 Recommended transformed HTML markup
(The HTML markup structure and classes that will be used by the scripts in the enhanced version)
4.3 Accessibility recommendation
(Detailed recommendations for ARIA, HTML markup, CSS and javascript that will contribute to universal access and full section 508 accessibility for screen readers, mobile devices and any other devices)
4.4 CSS & Theme
(Description of the CSS classes to be used for all states, how custom theming and Themeroller support will work.)
5 - Latest version of plugin:
(Link to the latest version in the jQuery UI trunk here)
6 - Open issues being discussed
(Use this area to place things that we're hashing out like features and options we're not sure we should include, questions about how this fits into UI and relates to other widgets and utilities, known problems, whether features should be broken across multiple releases, etc.)
Comments (5)
Jörn Zaefferer said
at 4:40 am on Jul 8, 2009
Why did we make this a high priority...?
Anyway, it says Paul had a prototype, but there is nothing in dev or labs. Paul, is there anything worth reusing? In any case, it would be good to know what your approach was and what the performance issue was.
Scott González said
at 7:14 am on Jul 8, 2009
The code would live in an old revision of dialog, probably somewhere between 1.6rc5 and 1.7.
Jörn Zaefferer said
at 1:02 pm on Jul 23, 2009
The shadow code was removed in revision 2013, so revisions before that, eg. 2012, still have it. Seems to boil down to calls to these three methods:
_createShadow: function() {
this.shadow = $('<div class="ui-widget-shadow"></div>').css('position', 'absolute').appendTo(document.body);
this._refreshShadow();
return this.shadow;
},
_refreshShadow: function() {
if (!this.options.shadow) { return; }
var uiDialog = this.uiDialog,
offset = uiDialog.offset();
this.shadow.css({
left: offset.left,
top: offset.top,
width: uiDialog.outerWidth(),
height: uiDialog.outerHeight()
});
},
_destroyShadow: function() {
this.shadow.remove();
this.shadow = null;
}
Jörn Zaefferer said
at 1:05 pm on Jul 23, 2009
More forensics:
The commit comment says it reopens #3681 http://dev.jqueryui.com/ticket/3681
Which links to r1814, where shadow was first implemented: http://dev.jqueryui.com/changeset/1814
MiD-AwE said
at 7:51 pm on May 28, 2010
It seems that shadow is at a stalemate. Why not allow the CSS box-shadow for now with future versions to include the under-layer?
You don't have permission to comment on this page.