Skip to content

Commit c88ec70

Browse files
committed
Theme: Add new theme called "Base"
Keep "Smoothness" and "UI Lightness" in the gallery, while the new theme will be available as "Base" and it will be the default. Ref jquery/jquery-ui#1384
1 parent d77ffff commit c88ec70

File tree

6 files changed

+87
-10
lines changed

6 files changed

+87
-10
lines changed
2.3 KB
Loading
9.63 KB
Loading

config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"label": "Stable",
77
"stable": true
88
},
9+
{
10+
"version": "1a10f10cb0a39281e91eec5a53b5bb874497c629",
11+
"dependsOn": "jQuery1.6+",
12+
"label": "Experimental"
13+
},
914
{
1015
"version": "1.10.4",
1116
"dependsOn": "jQuery1.6+",

lib/themeroller-themegallery.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,63 @@ var themeGallery,
44
ThemeRoller = require( "./themeroller" );
55

66
var themeGallery = [{
7+
thumb: "theme_base.png",
8+
cachedZThemeParams: "5d00000100ca05000000000000003d8888d844329a8dfe02723de3e5700bbb34ecf36cdef1e1654faa0015427bdb9eb45ebe89aaede0ec5f0d924190a01a32ee3c72f020c6358f8799fcf93f2d3731276f37ef0c48ada71e8147eba114a9884902236f35aa8ee90c548f44abf6a3e4556cbf4978c663a1599e4aae1cfca5180a9fe97f3e56d594e6bf581101717708b9eacf24336440252126968f2e5859ee510ed034d6e6b9b027d45ac3621c2b6b9fe40db6a9586d2a05c831986806848d89144c2cdd1f972ad3e01d85b46d582b2960f034c6f75cd8998e965f6618271d860b33f0ed0b8f2f75757ecb9baf8317f10a4b3ea06a3345681cf3aa04dcb993b68401167f10dfdaba1f185fbae800375454a223a128d818ed3c1889d3882582dc772b07c0a8edab6b94c55ddc1de59a1959d3a2e45a9631d05ef8cf9c4d01ee508155357364566760337fc295b14b848e0ee143ad3c467b1d4adf818bdf4fb36c06dfb532b0fc95bad538b4ada07d10ef880876df4933ec2c733dc5cba61fffa2af8710e735fed6162db620da8f5f38e0d75ac74428f9524aaed9b55575a3f3371a8fcbc05dfcf20a2682ddd226639509ad61f9c8a10bb5b0cfc044dbb84892d258c882e6d2d6db079c415438a5b038eb43d6fe342384",
9+
vars: {
10+
name: "Base",
11+
"ffDefault": "Arial,Helvetica,sans-serif",
12+
"fsDefault": "1em",
13+
"fwDefault": "normal",
14+
"cornerRadius": "3px",
15+
"bgColorHeader": "e9e9e9",
16+
"bgTextureHeader": "none",
17+
"borderColorHeader": "dddddd",
18+
"fcHeader": "333333",
19+
"iconColorHeader": "444444",
20+
"bgColorContent": "ffffff",
21+
"bgTextureContent": "none",
22+
"borderColorContent": "dddddd",
23+
"fcContent": "333333",
24+
"iconColorContent": "444444",
25+
"bgColorDefault": "f6f6f6",
26+
"bgTextureDefault": "none",
27+
"borderColorDefault": "c5c5c5",
28+
"fcDefault": "454545",
29+
"iconColorDefault": "777777",
30+
"bgColorHover": "ededed",
31+
"bgTextureHover": "none",
32+
"borderColorHover": "cccccc",
33+
"fcHover": "2b2b2b",
34+
"iconColorHover": "555555",
35+
"bgColorActive": "007fff",
36+
"bgTextureActive": "none",
37+
"borderColorActive": "003eff",
38+
"fcActive": "ffffff",
39+
"iconColorActive": "ffffff",
40+
"bgColorHighlight": "fffa90",
41+
"bgTextureHighlight": "none",
42+
"borderColorHighlight": "dad55e",
43+
"fcHighlight": "777620",
44+
"iconColorHighlight": "777620",
45+
"bgColorError": "fddfdf",
46+
"bgTextureError": "none",
47+
"borderColorError": "f1a899",
48+
"fcError": "5f3f3f",
49+
"iconColorError": "cc0000",
50+
"bgColorOverlay": "aaaaaa",
51+
"bgTextureOverlay": "flat",
52+
"bgImgOpacityOverlay": "0",
53+
"opacityOverlay": "30",
54+
"bgColorShadow": "aaaaaa",
55+
"bgTextureShadow": "flat",
56+
"bgImgOpacityShadow": "0",
57+
"opacityShadow": "30",
58+
"thicknessShadow": "8px",
59+
"offsetTopShadow": "-8px",
60+
"offsetLeftShadow": "-8px",
61+
"cornerRadiusShadow": "8px"
62+
}
63+
}, {
764
thumb: "theme_90_ui_light.png",
865
cachedZThemeParams: "5d000001001406000000000000003d8888d844329a8dfe02723de3e5701dc2cb2be0d98fe676bb46e85f3b85ff2d347a9c5170a6c17a4a3d926b08b9d199c4e573fcbf9cc1a2dd092a9d80b6fda5395ff84763f9e74d6cee21250c8f33243ef1589abab919cf7e8298f8769fec181781bf142e5e800e171d39cdf17e9a71fa3f781e8d76766b23c44b6d7f1e75c1abeef4410d820c31ef0620d79195b33d4cfc1e768094ce05fee304b2ad41db26904aed74c8c374ce1ff1c0a5c42f56dac08ad8961127638038b61b2703209b4091d7fb93a47a1d3e43a67c5a94b7e29c959f13c24559cb1a76b1bec1a71f1949db710f4557f3d1da2d39f90aff28f2b6ba8dd96ed5f5a0015166ef5567f70537d248d57b05c70e4fcc5845d9e1610b45d0d394c32ba0d5f992c00dca92aefe65863782767fcedea56a04e59e78457e74c5f1b23fdcd98c0b6bf4dbbe623d93fcb961477a3b6ff6f49245a0d75647ac7dcf1c860ed9882370de9a120924b3eaa4d72b858c41bd8bfbc944508a9fda3a42ff055dfa6e2ef96330dff48fe7a403db64306e0229493b498532edda2985338cbfd2dca06a59153f6300753623a533e25248b8dca8c2261083a9ebf73103a260168b2f957d138e17a4c80b5a901f1b748cff996db44f467265f09d1234456b9819fee221715dc98870f7e120db924d76acd66a3c270b2ee627140195c5c9e869d89c5acdf9330a84af5ae2c6c31792faa3aa55240bbecb844cb72dc1718194fff63506a7",
966
vars: {

lib/themeroller.js

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ themeStaticCss = {};
1919

2020
// Hard coded css Y image positioning - context accepts button or panel
2121
function cssYPos( texture, context ){
22-
var YPos = "50%";
22+
var YPos;
23+
if ( texture === "none" ) {
24+
return "";
25+
}
26+
YPos = "50%";
2327
if( context === "panel" ){
2428
if( texture === "highlight_soft" || texture === "highlight_hard" || texture === "gloss_wave" ){
2529
YPos = "top";
@@ -39,9 +43,12 @@ function cssYPos( texture, context ){
3943

4044
// Hard coded css X image positioning - context accepts button or panel
4145
function cssXPos( texture, context ){
42-
var XPos = "50%";
43-
// No conditions yet, may need some for vertical slider patterns
44-
return XPos;
46+
if ( texture === "none" ) {
47+
return "";
48+
}
49+
// No conditions yet, may need some for vertical slider patterns.
50+
// XPos = "50%";
51+
return "50%";
4552
}
4653

4754
// Add '#' in the beginning of the colors if needed
@@ -224,7 +231,11 @@ function ThemeRoller( options ) {
224231

225232
ThemeRoller.prototype = {
226233
_cssRepeat: function( textureType ) {
227-
var texture = textures[ textureType ];
234+
var texture;
235+
if ( textureType === "none" ) {
236+
return "";
237+
}
238+
texture = textures[ textureType ];
228239
if ( typeof texture === "undefined" ) {
229240
throw new Error( "Texture \"" + textureType + "\" not defined" );
230241
}
@@ -248,8 +259,11 @@ ThemeRoller.prototype = {
248259
},
249260

250261
_textureUrl: function( color, textureType, opacity ) {
251-
var image,
252-
texture = textures[ textureType ];
262+
var image, texture;
263+
if ( textureType === "none" ) {
264+
return "";
265+
}
266+
texture = textures[ textureType ];
253267
if ( typeof texture === "undefined" ) {
254268
throw new Error( "No dimensions set for texture \"" + textureType + "\"" );
255269
}
@@ -276,9 +290,9 @@ ThemeRoller.prototype = {
276290
}
277291
if ( !this._css ) {
278292
var vars = this.vars;
279-
this._css = themeStaticCss[ this.jqueryUi.pkg.version ].replace( /[\s]+[\S]+\/\*\{([^\}\*\/]+)\}\*\//g, function( match, p1 ) {
293+
this._css = themeStaticCss[ this.jqueryUi.pkg.version ].replace( /([\s]+[\S]+| )\/\*\{([^\}\*\/]+)\}\*\//g, function( match, g1, p1 ) {
280294
return " " + vars[ p1 ];
281-
});
295+
}).replace( /[\s]+;/g, ";" );
282296
if ( this.scope ) {
283297
this._css = util.scope( this._css, this.scope );
284298
}

themeroller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Frontend.prototype = {
6767
themeGallery: themeGallery
6868
})
6969
}),
70-
baseVars: themeGallery[ 2 ].serializedVars,
70+
baseVars: themeGallery[ 0 ].serializedVars,
7171
compGroupA: compGroupATemplate({
7272
production: production
7373
}),
@@ -82,6 +82,7 @@ Frontend.prototype = {
8282

8383
css: function( vars ) {
8484
var theme = new ThemeRoller({
85+
version: "1.12.0-pre",
8586
vars: _.extend({
8687
dynamicImage: true,
8788
dynamicImageHost: this.host

0 commit comments

Comments
 (0)