polythene-theme
Advanced tools
Comparing version 0.1.14 to 0.1.15
@@ -8,39 +8,38 @@ import config from 'polythene-theme/common/config'; | ||
const styles = [ | ||
{ | ||
'.button': [ | ||
mixin.userSelectNone(), | ||
buttonEffects, | ||
{ | ||
display: 'inline-block', | ||
'min-width': 8 * config.componentGridUnit + 'px', | ||
height: config.buttonTouchHeight + 'px', | ||
margin: '0 ' + marginV + 'px', | ||
padding: paddingH + 'px 0', | ||
background: 'transparent', | ||
'text-decoration': 'none', | ||
'text-align': 'center', | ||
font: 'inherit', | ||
outline: 'none', | ||
cursor: 'pointer', | ||
border: 'none', | ||
'border-radius': config.buttonBorderRadius + 'px', | ||
const styles = [{ | ||
'.button': [ | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), | ||
buttonEffects, { | ||
display: 'inline-block', | ||
'min-width': 8 * config.componentGridUnit + 'px', | ||
height: config.buttonTouchHeight + 'px', | ||
margin: '0 ' + marginV + 'px', | ||
padding: paddingH + 'px 0', | ||
background: 'transparent', | ||
'text-decoration': 'none', | ||
'text-align': 'center', | ||
font: 'inherit', | ||
outline: 'none', | ||
cursor: 'pointer', | ||
border: 'none', | ||
'border-radius': config.buttonBorderRadius + 'px', | ||
' .content': { | ||
height: config.buttonHeight + 'px', | ||
padding: '0 ' + (2 * config.gridUnit + 'px'), | ||
' .content': { | ||
height: config.buttonHeight + 'px', | ||
padding: '0 ' + (2 * config.gridUnit + 'px'), | ||
' .label': { | ||
'line-height': config.buttonHeight + 'px', | ||
'font-size': config.buttonFontSize + 'px', | ||
'font-weight': config.buttonFontWeight, | ||
'text-transform': 'uppercase', | ||
'white-space': 'pre' | ||
} | ||
} | ||
} | ||
] | ||
} | ||
]; | ||
' .label': { | ||
'line-height': config.buttonHeight + 'px', | ||
'font-size': config.buttonFontSize + 'px', | ||
'font-weight': config.buttonFontWeight, | ||
'text-transform': 'uppercase', | ||
'white-space': 'pre' | ||
} | ||
} | ||
} | ||
] | ||
}]; | ||
export default styles; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var _polytheneThemeButtonButtonStyleEffects=require("polythene-theme/button/button-style-effects");var _polytheneThemeButtonButtonStyleEffects2=_interopRequireDefault(_polytheneThemeButtonButtonStyleEffects);var marginV=_polytheneThemeCommonConfig2["default"].gridUnit;var paddingH=(_polytheneThemeCommonConfig2["default"].buttonTouchHeight-_polytheneThemeCommonConfig2["default"].buttonHeight)/2;var styles=[{".button":[_polytheneThemeCommonMixin2["default"].userSelectNone(),_polytheneThemeButtonButtonStyleEffects2["default"],{display:"inline-block","min-width":8*_polytheneThemeCommonConfig2["default"].componentGridUnit+"px",height:_polytheneThemeCommonConfig2["default"].buttonTouchHeight+"px",margin:"0 "+marginV+"px",padding:paddingH+"px 0",background:"transparent","text-decoration":"none","text-align":"center",font:"inherit",outline:"none",cursor:"pointer",border:"none","border-radius":_polytheneThemeCommonConfig2["default"].buttonBorderRadius+"px"," .content":{height:_polytheneThemeCommonConfig2["default"].buttonHeight+"px",padding:"0 "+(2*_polytheneThemeCommonConfig2["default"].gridUnit+"px")," .label":{"line-height":_polytheneThemeCommonConfig2["default"].buttonHeight+"px","font-size":_polytheneThemeCommonConfig2["default"].buttonFontSize+"px","font-weight":_polytheneThemeCommonConfig2["default"].buttonFontWeight,"text-transform":"uppercase","white-space":"pre"}}}]}];exports["default"]=styles;module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var _polytheneThemeButtonButtonStyleEffects=require("polythene-theme/button/button-style-effects");var _polytheneThemeButtonButtonStyleEffects2=_interopRequireDefault(_polytheneThemeButtonButtonStyleEffects);var marginV=_polytheneThemeCommonConfig2["default"].gridUnit;var paddingH=(_polytheneThemeCommonConfig2["default"].buttonTouchHeight-_polytheneThemeCommonConfig2["default"].buttonHeight)/2;var styles=[{".button":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),_polytheneThemeButtonButtonStyleEffects2["default"],{display:"inline-block","min-width":8*_polytheneThemeCommonConfig2["default"].componentGridUnit+"px",height:_polytheneThemeCommonConfig2["default"].buttonTouchHeight+"px",margin:"0 "+marginV+"px",padding:paddingH+"px 0",background:"transparent","text-decoration":"none","text-align":"center",font:"inherit",outline:"none",cursor:"pointer",border:"none","border-radius":_polytheneThemeCommonConfig2["default"].buttonBorderRadius+"px"," .content":{height:_polytheneThemeCommonConfig2["default"].buttonHeight+"px",padding:"0 "+(2*_polytheneThemeCommonConfig2["default"].gridUnit+"px")," .label":{"line-height":_polytheneThemeCommonConfig2["default"].buttonHeight+"px","font-size":_polytheneThemeCommonConfig2["default"].buttonFontSize+"px","font-weight":_polytheneThemeCommonConfig2["default"].buttonFontWeight,"text-transform":"uppercase","white-space":"pre"}}}]}];exports["default"]=styles;module.exports=exports["default"]; |
@@ -6,3 +6,5 @@ import config from 'polythene-theme/common/config'; | ||
return { | ||
'background-color': config.color[tint][element].main.backgroundColor, | ||
'&.card': { | ||
'background-color': config.color[tint][element].main.backgroundColor | ||
}, | ||
'&.title, .title': { | ||
@@ -9,0 +11,0 @@ 'color': config.color[tint][element].title.color |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var style=function style(tint,element){return{"background-color":_polytheneThemeCommonConfig2["default"].color[tint][element].main.backgroundColor,"&.title, .title":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].title.color},"&.subtitle, .subtitle":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].subtitle.color},"&.text, .text":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].text.color}," .actions.bordered":[_polytheneThemeCommonMixin2["default"].hairline("border-top"),{"border-top":"1px solid "+_polytheneThemeCommonConfig2["default"].color[tint][element].actions.borderColor}]}};var styles=[{".card":style("light","card")},{".card.dark-theme, .dark-theme .card, .card .dark-theme":style("dark","card")}];exports["default"]=styles;module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var style=function style(tint,element){return{"&.card":{"background-color":_polytheneThemeCommonConfig2["default"].color[tint][element].main.backgroundColor},"&.title, .title":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].title.color},"&.subtitle, .subtitle":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].subtitle.color},"&.text, .text":{color:_polytheneThemeCommonConfig2["default"].color[tint][element].text.color}," .actions.bordered":[_polytheneThemeCommonMixin2["default"].hairline("border-top"),{"border-top":"1px solid "+_polytheneThemeCommonConfig2["default"].color[tint][element].actions.borderColor}]}};var styles=[{".card":style("light","card")},{".card.dark-theme, .dark-theme .card, .card .dark-theme":style("dark","card")}];exports["default"]=styles;module.exports=exports["default"]; |
if (!Object.assign) { | ||
require('polythene-theme/common/object.assign'); | ||
} | ||
import 'polythene-theme/common/object.assign'; | ||
@@ -164,3 +162,4 @@ const rgba = (color, opacity) => ('rgba(' + color + ',' + opacity + ')'); | ||
'transform': ['o', 'moz', 'ms', 'webkit'], | ||
'transition': ['o', 'moz', 'webkit'] | ||
'transition': ['o', 'moz', 'webkit'], | ||
'user_select': ['moz', 'ms', 'webkit'] | ||
}, | ||
@@ -167,0 +166,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});if(!Object.assign){require("polythene-theme/common/object.assign")}var rgba=function rgba(color,opacity){return"rgba("+color+","+opacity+")"};var gridUnit=4;var componentGridUnit=8;var buttonSize=6*componentGridUnit;var iconSize=3*componentGridUnit;var materialColorsBlue500="#2196f3";var materialColorsBlue600="#1e88e5";var materialColorsBlue700="#1976d2";var lightBackgroundColor="#fff";var lightPrimaryTextColor=rgba("0, 0, 0",.87);var lightTextColor=rgba("0, 0, 0",.73);var lightButtonLabelColor=rgba("0, 0, 0",.69);var lightSecondaryTextAlpha=.54;var lightSecondaryTextColor=rgba("0, 0, 0",lightSecondaryTextAlpha);var lightTertiaryTextColor=rgba("0, 0, 0",.4);var lightDisabledTextColor=rgba("0, 0, 0",.26);var lightHintTextColor=lightDisabledTextColor;var lightBorderColor=rgba("0, 0, 0",.11);var lightHoverBackgroundAlpha=.08;var lightHoverBackgroundColor=rgba("0, 0, 0",lightHoverBackgroundAlpha);var lightActiveBackgroundAlpha=.14;var lightActiveBackgroundColor=rgba("0, 0, 0",lightActiveBackgroundAlpha);var darkBackgroundColor="#222";var darkPrimaryTextColor=rgba("255, 255, 255",1);var darkTextColor=darkPrimaryTextColor;var darkSecondaryTextAlpha=.7;var darkSecondaryTextColor=rgba("255, 255, 255",darkSecondaryTextAlpha);var darkButtonLabelColor=darkSecondaryTextColor;var darkTertiaryTextColor=rgba("255, 255, 255",.4);var darkDisabledTextColor=rgba("255, 255, 255",.26);var darkHintTextColor=darkDisabledTextColor;var darkBorderColor=rgba("255, 255, 255",.1);var darkHoverBackgroundAlpha=.08;var darkHoverBackgroundColor=rgba("255, 255, 255",darkHoverBackgroundAlpha);var darkActiveBackgroundAlpha=.14;var darkActiveBackgroundColor=rgba("255, 255, 255",darkActiveBackgroundAlpha);var buttonLightConfig={flat:{normal:{background:"transparent",color:lightPrimaryTextColor},hover:{background:lightHoverBackgroundColor},active:{background:lightActiveBackgroundColor},disabled:{background:"transparent",color:lightDisabledTextColor}},raised:{normal:{background:"#E0E0E0",color:lightPrimaryTextColor},hover:{background:"transparent"},active:{background:lightHoverBackgroundColor},disabled:{background:rgba("0, 0, 0",.07),color:lightDisabledTextColor}}};var buttonDarkConfig={flat:{normal:{background:"transparent",color:"#fff"},hover:{background:darkHoverBackgroundColor},active:{background:darkActiveBackgroundColor},disabled:{background:"transparent",color:rgba("255, 255, 255",.3)}},raised:{normal:{background:materialColorsBlue500,color:darkPrimaryTextColor},hover:{background:materialColorsBlue600},active:{background:materialColorsBlue700},disabled:{background:rgba("255, 255, 255",.12),color:rgba("255, 255, 255",.3)}}};var iconButtonLightConfig=JSON.parse(JSON.stringify(buttonLightConfig));iconButtonLightConfig.flat.normal.color=lightSecondaryTextColor;var iconButtonDarkConfig=JSON.parse(JSON.stringify(buttonDarkConfig));iconButtonDarkConfig.flat.normal.color=darkSecondaryTextColor;exports["default"]={gridUnit:gridUnit,componentGridUnit:componentGridUnit,screenSizeExtraLarge:1280,screenSizeLarge:960,screenSizeMedium:480,screenSizeSmall:320,buttonHeight:36,buttonTouchHeight:48,buttonBorderRadius:2,buttonFontSize:14,buttonFontWeight:500,surfaceReactionDuration:".2s",lineHeight:1.3,lineHeightEm:"1.3em",buttonSize:buttonSize,iconSizeLarge:5*componentGridUnit,iconSizeMedium:4*componentGridUnit,iconSize:iconSize,iconSizeSmall:2*componentGridUnit,iconButtonPadding:(buttonSize-iconSize)/2,indent:72,toolbarHeightDesktop:64,toolbarHeightMobilePortrait:56,toolbarHeightMobileLandscape:48,fontWeightNormal:400,fontWeightMedium:500,fontWeightBold:700,fontSizeTitle:20,vendors:{animation:["o","moz","webkit"],background_size:["o","moz","webkit"],box_shadow:["moz","webkit"],keyframes:["o","moz","webkit"],transform:["o","moz","ms","webkit"],transition:["o","moz","webkit"]},color:{light:{button:buttonLightConfig,"icon-button":iconButtonLightConfig,card:{main:{backgroundColor:lightBackgroundColor},title:{color:lightPrimaryTextColor},subtitle:{color:lightSecondaryTextColor},text:{color:lightTextColor},actions:{borderColor:lightBorderColor}},list:{borderColor:lightBorderColor,backgroundHoverColor:lightHoverBackgroundColor},"list-tile":{header:lightPrimaryTextColor,subheader:lightTertiaryTextColor},dialog:{content:{background:lightBackgroundColor},title:{color:lightPrimaryTextColor},body:{color:lightTextColor,border:lightBorderColor},backdrop:{background:"rgba(0, 0, 0, .4)"}}},dark:{button:buttonDarkConfig,"icon-button":iconButtonDarkConfig,card:{main:{backgroundColor:darkBackgroundColor},title:{color:darkPrimaryTextColor},subtitle:{color:darkSecondaryTextColor},text:{color:darkSecondaryTextColor},actions:{borderColor:darkBorderColor}},list:{borderColor:darkBorderColor,backgroundHoverColor:darkHoverBackgroundColor},"list-tile":{header:darkPrimaryTextColor,subheader:darkTertiaryTextColor},dialog:{content:{background:darkBackgroundColor},title:{color:darkPrimaryTextColor},body:{color:darkTextColor,border:darkBorderColor},backdrop:{background:"rgba(0, 0, 0, .5)"}}}}};module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});require("polythene-theme/common/object.assign");var rgba=function rgba(color,opacity){return"rgba("+color+","+opacity+")"};var gridUnit=4;var componentGridUnit=8;var buttonSize=6*componentGridUnit;var iconSize=3*componentGridUnit;var materialColorsBlue500="#2196f3";var materialColorsBlue600="#1e88e5";var materialColorsBlue700="#1976d2";var lightBackgroundColor="#fff";var lightPrimaryTextColor=rgba("0, 0, 0",.87);var lightTextColor=rgba("0, 0, 0",.73);var lightButtonLabelColor=rgba("0, 0, 0",.69);var lightSecondaryTextAlpha=.54;var lightSecondaryTextColor=rgba("0, 0, 0",lightSecondaryTextAlpha);var lightTertiaryTextColor=rgba("0, 0, 0",.4);var lightDisabledTextColor=rgba("0, 0, 0",.26);var lightHintTextColor=lightDisabledTextColor;var lightBorderColor=rgba("0, 0, 0",.11);var lightHoverBackgroundAlpha=.08;var lightHoverBackgroundColor=rgba("0, 0, 0",lightHoverBackgroundAlpha);var lightActiveBackgroundAlpha=.14;var lightActiveBackgroundColor=rgba("0, 0, 0",lightActiveBackgroundAlpha);var darkBackgroundColor="#222";var darkPrimaryTextColor=rgba("255, 255, 255",1);var darkTextColor=darkPrimaryTextColor;var darkSecondaryTextAlpha=.7;var darkSecondaryTextColor=rgba("255, 255, 255",darkSecondaryTextAlpha);var darkButtonLabelColor=darkSecondaryTextColor;var darkTertiaryTextColor=rgba("255, 255, 255",.4);var darkDisabledTextColor=rgba("255, 255, 255",.26);var darkHintTextColor=darkDisabledTextColor;var darkBorderColor=rgba("255, 255, 255",.1);var darkHoverBackgroundAlpha=.08;var darkHoverBackgroundColor=rgba("255, 255, 255",darkHoverBackgroundAlpha);var darkActiveBackgroundAlpha=.14;var darkActiveBackgroundColor=rgba("255, 255, 255",darkActiveBackgroundAlpha);var buttonLightConfig={flat:{normal:{background:"transparent",color:lightPrimaryTextColor},hover:{background:lightHoverBackgroundColor},active:{background:lightActiveBackgroundColor},disabled:{background:"transparent",color:lightDisabledTextColor}},raised:{normal:{background:"#E0E0E0",color:lightPrimaryTextColor},hover:{background:"transparent"},active:{background:lightHoverBackgroundColor},disabled:{background:rgba("0, 0, 0",.07),color:lightDisabledTextColor}}};var buttonDarkConfig={flat:{normal:{background:"transparent",color:"#fff"},hover:{background:darkHoverBackgroundColor},active:{background:darkActiveBackgroundColor},disabled:{background:"transparent",color:rgba("255, 255, 255",.3)}},raised:{normal:{background:materialColorsBlue500,color:darkPrimaryTextColor},hover:{background:materialColorsBlue600},active:{background:materialColorsBlue700},disabled:{background:rgba("255, 255, 255",.12),color:rgba("255, 255, 255",.3)}}};var iconButtonLightConfig=JSON.parse(JSON.stringify(buttonLightConfig));iconButtonLightConfig.flat.normal.color=lightSecondaryTextColor;var iconButtonDarkConfig=JSON.parse(JSON.stringify(buttonDarkConfig));iconButtonDarkConfig.flat.normal.color=darkSecondaryTextColor;exports["default"]={gridUnit:gridUnit,componentGridUnit:componentGridUnit,screenSizeExtraLarge:1280,screenSizeLarge:960,screenSizeMedium:480,screenSizeSmall:320,buttonHeight:36,buttonTouchHeight:48,buttonBorderRadius:2,buttonFontSize:14,buttonFontWeight:500,surfaceReactionDuration:".2s",lineHeight:1.3,lineHeightEm:"1.3em",buttonSize:buttonSize,iconSizeLarge:5*componentGridUnit,iconSizeMedium:4*componentGridUnit,iconSize:iconSize,iconSizeSmall:2*componentGridUnit,iconButtonPadding:(buttonSize-iconSize)/2,indent:72,toolbarHeightDesktop:64,toolbarHeightMobilePortrait:56,toolbarHeightMobileLandscape:48,fontWeightNormal:400,fontWeightMedium:500,fontWeightBold:700,fontSizeTitle:20,vendors:{animation:["o","moz","webkit"],background_size:["o","moz","webkit"],box_shadow:["moz","webkit"],keyframes:["o","moz","webkit"],transform:["o","moz","ms","webkit"],transition:["o","moz","webkit"],user_select:["moz","ms","webkit"]},color:{light:{button:buttonLightConfig,"icon-button":iconButtonLightConfig,card:{main:{backgroundColor:lightBackgroundColor},title:{color:lightPrimaryTextColor},subtitle:{color:lightSecondaryTextColor},text:{color:lightTextColor},actions:{borderColor:lightBorderColor}},list:{borderColor:lightBorderColor,backgroundHoverColor:lightHoverBackgroundColor},"list-tile":{header:lightPrimaryTextColor,subheader:lightTertiaryTextColor},dialog:{content:{background:lightBackgroundColor},title:{color:lightPrimaryTextColor},body:{color:lightTextColor,border:lightBorderColor},backdrop:{background:"rgba(0, 0, 0, .4)"}}},dark:{button:buttonDarkConfig,"icon-button":iconButtonDarkConfig,card:{main:{backgroundColor:darkBackgroundColor},title:{color:darkPrimaryTextColor},subtitle:{color:darkSecondaryTextColor},text:{color:darkSecondaryTextColor},actions:{borderColor:darkBorderColor}},list:{borderColor:darkBorderColor,backgroundHoverColor:darkHoverBackgroundColor},"list-tile":{header:darkPrimaryTextColor,subheader:darkTertiaryTextColor},dialog:{content:{background:darkBackgroundColor},title:{color:darkPrimaryTextColor},body:{color:darkTextColor,border:darkBorderColor},backdrop:{background:"rgba(0, 0, 0, .5)"}}}}};module.exports=exports["default"]; |
@@ -26,8 +26,2 @@ import config from 'polythene-theme/common/config'; | ||
userSelectNone: () => ({ | ||
'user-select': 'none', | ||
'-webkit-user-select': 'none', | ||
'-ms-user-select': 'none' | ||
}), | ||
fontSmoothing: (smoothing = true) => { | ||
@@ -34,0 +28,0 @@ if (smoothing) { |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var vendorize=function vendorize(what,vendors){var vendorsSel=vendors.map(function(v){return"_"+v+"$"}).join("");return _defineProperty({},vendorsSel,what)};exports["default"]={vendorize:vendorize,boxSizing:function boxSizing(){var type=arguments.length<=0||arguments[0]===undefined?"border-box":arguments[0];return{"box-sizing":type}},fit:function fit(){return{position:"absolute",top:0,right:0,bottom:0,left:0}},userSelectNone:function userSelectNone(){return{"user-select":"none","-webkit-user-select":"none","-ms-user-select":"none"}},fontSmoothing:function fontSmoothing(){var smoothing=arguments.length<=0||arguments[0]===undefined?true:arguments[0];if(smoothing){return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}else{return{"-webkit-font-smoothing":"subpixel-antialiased","-moz-osx-font-smoothing":"auto"}}},singleLine:function singleLine(){return{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},hairline:function hairline(){return{}},verticalCenter:function verticalCenter(){var position=arguments.length<=0||arguments[0]===undefined?"relative":arguments[0];return[vendorize({transform:"translateY(-50%)"},_polytheneThemeCommonConfig2["default"].vendors.transform),{position:position,top:"50%"}]},verticalCenterParent:function verticalCenterParent(){return[vendorize({"transform-style":"preserve-3d"},_polytheneThemeCommonConfig2["default"].vendors.transform)]}};module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var vendorize=function vendorize(what,vendors){var vendorsSel=vendors.map(function(v){return"_"+v+"$"}).join("");return _defineProperty({},vendorsSel,what)};exports["default"]={vendorize:vendorize,boxSizing:function boxSizing(){var type=arguments.length<=0||arguments[0]===undefined?"border-box":arguments[0];return{"box-sizing":type}},fit:function fit(){return{position:"absolute",top:0,right:0,bottom:0,left:0}},fontSmoothing:function fontSmoothing(){var smoothing=arguments.length<=0||arguments[0]===undefined?true:arguments[0];if(smoothing){return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}else{return{"-webkit-font-smoothing":"subpixel-antialiased","-moz-osx-font-smoothing":"auto"}}},singleLine:function singleLine(){return{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},hairline:function hairline(){return{}},verticalCenter:function verticalCenter(){var position=arguments.length<=0||arguments[0]===undefined?"relative":arguments[0];return[vendorize({transform:"translateY(-50%)"},_polytheneThemeCommonConfig2["default"].vendors.transform),{position:position,top:"50%"}]},verticalCenterParent:function verticalCenterParent(){return[vendorize({"transform-style":"preserve-3d"},_polytheneThemeCommonConfig2["default"].vendors.transform)]}};module.exports=exports["default"]; |
@@ -12,3 +12,5 @@ import config from 'polythene-theme/common/config'; | ||
'.fab': [ | ||
mixin.userSelectNone(), { | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), { | ||
'display': 'inline-block', | ||
@@ -47,4 +49,5 @@ 'position': 'relative', | ||
' .wash': [ | ||
mixin.vendorize({'transition': 'background-color ' + config.surfaceReactionDuration + ' ease-in-out'}, config.vendors.transition), | ||
{ | ||
mixin.vendorize({ | ||
'transition': 'background-color ' + config.surfaceReactionDuration + ' ease-in-out' | ||
}, config.vendors.transition), { | ||
'z-index': 1, | ||
@@ -51,0 +54,0 @@ 'border-radius': 'inherit', |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var sizeRegular=56;var paddingRegular=16;var sizeMini=40;var defaultBackgroundColor="#d23f31";var defaultColor="#fff";var styles=[{".fab":[_polytheneThemeCommonMixin2["default"].userSelectNone(),{display:"inline-block",position:"relative",outline:"none",cursor:"pointer","z-index":0,width:sizeRegular+"px",height:sizeRegular+"px",padding:paddingRegular+"px",background:defaultBackgroundColor,color:defaultColor,"border-radius":"50%",".mini":{width:sizeMini+"px",height:sizeMini+"px",padding:(sizeMini-_polytheneThemeCommonConfig2["default"].iconSize)/2+"px"}," .content":{"border-radius":"inherit"}," .icon":{"pointer-events":"none","z-index":3}," .ripple":{"border-radius":"inherit","z-index":2," .ripple-mask":{"border-radius":"inherit"}}," .wash":[_polytheneThemeCommonMixin2["default"].vendorize({transition:"background-color "+_polytheneThemeCommonConfig2["default"].surfaceReactionDuration+" ease-in-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),{"z-index":1,"border-radius":"inherit","pointer-events":"none","background-color":"transparent"}]}]}];exports["default"]=styles;module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var sizeRegular=56;var paddingRegular=16;var sizeMini=40;var defaultBackgroundColor="#d23f31";var defaultColor="#fff";var styles=[{".fab":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),{display:"inline-block",position:"relative",outline:"none",cursor:"pointer","z-index":0,width:sizeRegular+"px",height:sizeRegular+"px",padding:paddingRegular+"px",background:defaultBackgroundColor,color:defaultColor,"border-radius":"50%",".mini":{width:sizeMini+"px",height:sizeMini+"px",padding:(sizeMini-_polytheneThemeCommonConfig2["default"].iconSize)/2+"px"}," .content":{"border-radius":"inherit"}," .icon":{"pointer-events":"none","z-index":3}," .ripple":{"border-radius":"inherit","z-index":2," .ripple-mask":{"border-radius":"inherit"}}," .wash":[_polytheneThemeCommonMixin2["default"].vendorize({transition:"background-color "+_polytheneThemeCommonConfig2["default"].surfaceReactionDuration+" ease-in-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),{"z-index":1,"border-radius":"inherit","pointer-events":"none","background-color":"transparent"}]}]}];exports["default"]=styles;module.exports=exports["default"]; |
@@ -7,3 +7,5 @@ import config from 'polythene-theme/common/config'; | ||
'.icon-button': [ | ||
mixin.userSelectNone(), | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), | ||
buttonEffects, { | ||
@@ -10,0 +12,0 @@ // don't set button size to facilitate different icon sizes |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var _polytheneThemeButtonButtonStyleEffects=require("polythene-theme/button/button-style-effects");var _polytheneThemeButtonButtonStyleEffects2=_interopRequireDefault(_polytheneThemeButtonButtonStyleEffects);var styles=[{".icon-button":[_polytheneThemeCommonMixin2["default"].userSelectNone(),_polytheneThemeButtonButtonStyleEffects2["default"],{display:"inline-block","vertical-align":"middle",cursor:"pointer",position:"relative","font-size":"1rem","border-radius":"50%"," .content":{" .label":{"line-height":1,padding:_polytheneThemeCommonConfig2["default"].iconButtonPadding+"px"}}}]}];exports["default"]=styles;module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var _polytheneThemeButtonButtonStyleEffects=require("polythene-theme/button/button-style-effects");var _polytheneThemeButtonButtonStyleEffects2=_interopRequireDefault(_polytheneThemeButtonButtonStyleEffects);var styles=[{".icon-button":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),_polytheneThemeButtonButtonStyleEffects2["default"],{display:"inline-block","vertical-align":"middle",cursor:"pointer",position:"relative","font-size":"1rem","border-radius":"50%"," .content":{" .label":{"line-height":1,padding:_polytheneThemeCommonConfig2["default"].iconButtonPadding+"px"}}}]}];exports["default"]=styles;module.exports=exports["default"]; |
@@ -15,4 +15,6 @@ import config from 'polythene-theme/common/config'; | ||
'.tabs': [ | ||
mixin.userSelectNone(), | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), | ||
mixin.vendorize({ | ||
transform: 'translate3d(0,0,0)' | ||
@@ -43,3 +45,5 @@ }, config.vendors.transform), { | ||
' .tabRow': [ | ||
mixin.userSelectNone(), { | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), { | ||
position: 'relative', | ||
@@ -52,3 +56,5 @@ 'white-space': 'nowrap', | ||
' .tab': [ | ||
mixin.userSelectNone(), { | ||
mixin.vendorize({ | ||
'user-select': 'none' | ||
}, config.vendors.user_select), { | ||
margin: 0, | ||
@@ -55,0 +61,0 @@ 'border-radius': 0, |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var tabHeight=48;var tabIconLabelHeight=72;var fontSize=_polytheneThemeCommonConfig2["default"].buttonFontSize;var scrollButtonFadeDurationSec=".25s";var tabLabelLnh=1.1*fontSize;var tabLabelVerticalOffset=tabLabelLnh-fontSize;var tabIndicatorHeight=2;var scrollbarOffset=20;var styles=[_defineProperty({".tabs":[_polytheneThemeCommonMixin2["default"].userSelectNone(),_polytheneThemeCommonMixin2["default"].vendorize({transform:"translate3d(0,0,0)"},_polytheneThemeCommonConfig2["default"].vendors.transform),{"overflow-x":"auto","overflow-y":"hidden","-webkit-overflow-scrolling":"touch","& ::-webkit-scrollbar":{display:"none"},"&.scrollable":{" .scroll-btn":{display:"none"},"max-height":tabHeight," .tabRow":{"margin-bottom":-scrollbarOffset+"px"}}," .tabRow":[_polytheneThemeCommonMixin2["default"].userSelectNone(),{position:"relative","white-space":"nowrap",overflow:"auto"}]," .tab":[_polytheneThemeCommonMixin2["default"].userSelectNone(),{margin:0,"border-radius":0,height:tabHeight+"px",padding:0,color:"inherit","min-width":"72px"," .content":{padding:"0 12px",height:tabHeight+"px","line-height":_polytheneThemeCommonConfig2["default"].lineHeightEm," .layout":{height:"inherit"}," .label, .icon":{"max-width":"264px","line-height":tabLabelLnh+"px","max-height":2*tabLabelLnh+"px",overflow:"hidden","white-space":"normal"}," .label":{margin:tabLabelVerticalOffset+"px 0 0 0"}," .icon":{"margin-left":"auto","margin-right":"auto"}},"&.hasIconLabel":{"&, .content":[{height:tabIconLabelHeight+"px"},{" .label, .icon":{margin:"0 auto"}},{" .icon":{"margin-bottom":"8px"}}]}}]," .tabIndicator":[_polytheneThemeCommonMixin2["default"].vendorize({transform:"translate3d(0,0,0)"},_polytheneThemeCommonConfig2["default"].vendors.transform),_polytheneThemeCommonMixin2["default"].vendorize({"transform-origin":"left 50%"},_polytheneThemeCommonConfig2["default"].vendors.transform),_polytheneThemeCommonMixin2["default"].vendorize({"transition-property":"all"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-timing-function":"ease-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),{position:"absolute",height:tabIndicatorHeight+"px",bottom:0,left:0,"z-index":9,width:"100%"}]}],".toolbar":{"> div, > .toolbar-tools":{"background-color":"inherit","> .tabs, > .tabs:last-child":[_polytheneThemeCommonMixin2["default"].fit(),{width:"auto",margin:0,top:"auto"}]," .tabRow.indent":{margin:0,"padding-left":_polytheneThemeCommonConfig2["default"].indent+"px",overflow:"auto"}}},".no-touch":{" .tabs.scrollable":{"background-color":"inherit"," .scroll-btn":{position:"absolute",display:"block",top:0,"background-color":"inherit","z-index":4,"pointer-events":"auto",cursor:"pointer"," .content":{"border-radius":0,"background-color":"inherit"," .icon":[_polytheneThemeCommonMixin2["default"].vendorize({"transition-property":"opacity"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-duration":scrollButtonFadeDurationSec},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-timing-function":"ease-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-delay":".15s"},_polytheneThemeCommonConfig2["default"].vendors.transition)]},"&.inactive":{"pointer-events":"none",cursor:"auto"}}," .scroll-btn-left":{left:0}," .scroll-btn-right":{right:0}}}},"@media (min-width: "+_polytheneThemeCommonConfig2["default"].screenSizeMedium+"px)",{" .tabs:not(.small):not(.medium) .tab":{"min-width":"160px"}})];exports["default"]=styles;module.exports=exports["default"]; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}var _polytheneThemeCommonConfig=require("polythene-theme/common/config");var _polytheneThemeCommonConfig2=_interopRequireDefault(_polytheneThemeCommonConfig);var _polytheneThemeCommonMixin=require("polythene-theme/common/mixin");var _polytheneThemeCommonMixin2=_interopRequireDefault(_polytheneThemeCommonMixin);var tabHeight=48;var tabIconLabelHeight=72;var fontSize=_polytheneThemeCommonConfig2["default"].buttonFontSize;var scrollButtonFadeDurationSec=".25s";var tabLabelLnh=1.1*fontSize;var tabLabelVerticalOffset=tabLabelLnh-fontSize;var tabIndicatorHeight=2;var scrollbarOffset=20;var styles=[_defineProperty({".tabs":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),_polytheneThemeCommonMixin2["default"].vendorize({transform:"translate3d(0,0,0)"},_polytheneThemeCommonConfig2["default"].vendors.transform),{"overflow-x":"auto","overflow-y":"hidden","-webkit-overflow-scrolling":"touch","& ::-webkit-scrollbar":{display:"none"},"&.scrollable":{" .scroll-btn":{display:"none"},"max-height":tabHeight," .tabRow":{"margin-bottom":-scrollbarOffset+"px"}}," .tabRow":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),{position:"relative","white-space":"nowrap",overflow:"auto"}]," .tab":[_polytheneThemeCommonMixin2["default"].vendorize({"user-select":"none"},_polytheneThemeCommonConfig2["default"].vendors.user_select),{margin:0,"border-radius":0,height:tabHeight+"px",padding:0,color:"inherit","min-width":"72px"," .content":{padding:"0 12px",height:tabHeight+"px","line-height":_polytheneThemeCommonConfig2["default"].lineHeightEm," .layout":{height:"inherit"}," .label, .icon":{"max-width":"264px","line-height":tabLabelLnh+"px","max-height":2*tabLabelLnh+"px",overflow:"hidden","white-space":"normal"}," .label":{margin:tabLabelVerticalOffset+"px 0 0 0"}," .icon":{"margin-left":"auto","margin-right":"auto"}},"&.hasIconLabel":{"&, .content":[{height:tabIconLabelHeight+"px"},{" .label, .icon":{margin:"0 auto"}},{" .icon":{"margin-bottom":"8px"}}]}}]," .tabIndicator":[_polytheneThemeCommonMixin2["default"].vendorize({transform:"translate3d(0,0,0)"},_polytheneThemeCommonConfig2["default"].vendors.transform),_polytheneThemeCommonMixin2["default"].vendorize({"transform-origin":"left 50%"},_polytheneThemeCommonConfig2["default"].vendors.transform),_polytheneThemeCommonMixin2["default"].vendorize({"transition-property":"all"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-timing-function":"ease-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),{position:"absolute",height:tabIndicatorHeight+"px",bottom:0,left:0,"z-index":9,width:"100%"}]}],".toolbar":{"> div, > .toolbar-tools":{"background-color":"inherit","> .tabs, > .tabs:last-child":[_polytheneThemeCommonMixin2["default"].fit(),{width:"auto",margin:0,top:"auto"}]," .tabRow.indent":{margin:0,"padding-left":_polytheneThemeCommonConfig2["default"].indent+"px",overflow:"auto"}}},".no-touch":{" .tabs.scrollable":{"background-color":"inherit"," .scroll-btn":{position:"absolute",display:"block",top:0,"background-color":"inherit","z-index":4,"pointer-events":"auto",cursor:"pointer"," .content":{"border-radius":0,"background-color":"inherit"," .icon":[_polytheneThemeCommonMixin2["default"].vendorize({"transition-property":"opacity"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-duration":scrollButtonFadeDurationSec},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-timing-function":"ease-out"},_polytheneThemeCommonConfig2["default"].vendors.transition),_polytheneThemeCommonMixin2["default"].vendorize({"transition-delay":".15s"},_polytheneThemeCommonConfig2["default"].vendors.transition)]},"&.inactive":{"pointer-events":"none",cursor:"auto"}}," .scroll-btn-left":{left:0}," .scroll-btn-right":{right:0}}}},"@media (min-width: "+_polytheneThemeCommonConfig2["default"].screenSizeMedium+"px)",{" .tabs:not(.small):not(.medium) .tab":{"min-width":"160px"}})];exports["default"]=styles;module.exports=exports["default"]; |
import styler from 'polythene-theme/common/styler'; | ||
// Flexbox styles | ||
require('polythene-theme/layout/layout'); | ||
import 'polythene-theme/layout/layout'; | ||
// Roboto font | ||
require('polythene-theme/font-roboto/font-roboto'); | ||
import 'polythene-theme/font-roboto/font-roboto'; | ||
@@ -9,0 +9,0 @@ // Typography |
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonStyler=require("polythene-theme/common/styler");var _polytheneThemeCommonStyler2=_interopRequireDefault(_polytheneThemeCommonStyler);var _polytheneThemeThemeThemeStyle=require("polythene-theme/theme/theme-style");var _polytheneThemeThemeThemeStyle2=_interopRequireDefault(_polytheneThemeThemeThemeStyle);require("polythene-theme/layout/layout");require("polythene-theme/font-roboto/font-roboto");var roboto=[{"html, body":{"font-family":"Roboto, Helvetica, Arial, sans-serif"},"b, strong":{"font-weight":500}}];_polytheneThemeCommonStyler2["default"].add("polythene-style-theme",_polytheneThemeThemeThemeStyle2["default"],roboto);var isTouchDevice=function isTouchDevice(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0};document.querySelector("html").classList.add(isTouchDevice()?"touch":"no-touch"); | ||
"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonStyler=require("polythene-theme/common/styler");var _polytheneThemeCommonStyler2=_interopRequireDefault(_polytheneThemeCommonStyler);require("polythene-theme/layout/layout");require("polythene-theme/font-roboto/font-roboto");var _polytheneThemeThemeThemeStyle=require("polythene-theme/theme/theme-style");var _polytheneThemeThemeThemeStyle2=_interopRequireDefault(_polytheneThemeThemeThemeStyle);var roboto=[{"html, body":{"font-family":"Roboto, Helvetica, Arial, sans-serif"},"b, strong":{"font-weight":500}}];_polytheneThemeCommonStyler2["default"].add("polythene-style-theme",_polytheneThemeThemeThemeStyle2["default"],roboto);var isTouchDevice=function isTouchDevice(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0};document.querySelector("html").classList.add(isTouchDevice()?"touch":"no-touch"); |
{ | ||
"name": "polythene-theme", | ||
"version": "0.1.14", | ||
"description": "Polythene default theme", | ||
"license": "MIT", | ||
"main": "lib", | ||
"directories": {}, | ||
"devDependencies": { | ||
"babel": "^5.8.23", | ||
"babel-plugin-closure-elimination": "0.0.2", | ||
"jspm": "^0.16.11", | ||
"transpile-watch": "^0.0.2", | ||
"uglify-js": "^2.4.24" | ||
}, | ||
"scripts": { | ||
"watch-es6": "node scripts/watch-es6.js watch lib", | ||
"watch-test-es6": "node scripts/watch-es6.js watch test test/jspm_packages", | ||
"watch": "npm run watch-es6 & npm run watch-test-es6", | ||
"transpile-js": "node scripts/watch-es6.js once lib", | ||
"transpile-test-js": "node scripts/watch-es6.js once test test/jspm_packages", | ||
"transpile": "npm run transpile-js && npm run transpile-test-js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ArthurClemens/Polythene-theme.git" | ||
}, | ||
"author": "Arthur Clemens", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
], | ||
"bugs": { | ||
"url": "https://github.com/ArthurClemens/Polythene-theme/issues" | ||
}, | ||
"homepage": "https://github.com/ArthurClemens/Polythene-theme", | ||
"jspm": { | ||
"directories": { | ||
"lib": "lib" | ||
"name": "polythene-theme", | ||
"version": "0.1.15", | ||
"description": "Polythene default theme", | ||
"license": "MIT", | ||
"main": "", | ||
"directories": {}, | ||
"devDependencies": { | ||
"babel": "^5.8.23", | ||
"jspm": "^0.16.11", | ||
"transpile-watch": "^0.0.2", | ||
"uglify-js": "^2.4.24" | ||
}, | ||
"dependencies": { | ||
"j2c": "npm:j2c@^0.7.3", | ||
"mithril": "npm:mithril@^0.2.0", | ||
"polythene": "github:ArthurClemens/Polythene@master" | ||
"scripts": { | ||
"watch-es6": "node scripts/watch-es6.js watch lib", | ||
"watch": "npm run watch-es6", | ||
"transpile-js": "node scripts/watch-es6.js once lib", | ||
"transpile": "npm run transpile-js" | ||
}, | ||
"devDependencies": { | ||
"babel": "npm:babel-core@^5.8.24", | ||
"babel-runtime": "npm:babel-runtime@^5.8.24", | ||
"core-js": "npm:core-js@^1.1.4" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ArthurClemens/Polythene-theme.git" | ||
}, | ||
"author": "Arthur Clemens", | ||
"licenses": [{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
}], | ||
"bugs": { | ||
"url": "https://github.com/ArthurClemens/Polythene-theme/issues" | ||
}, | ||
"homepage": "https://github.com/ArthurClemens/Polythene-theme", | ||
"files": ["lib"], | ||
"jspm": { | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"dependencies": { | ||
"j2c": "npm:j2c@^0.7.3", | ||
"mithril": "npm:mithril@^0.2.0", | ||
"polythene": "github:ArthurClemens/Polythene@master" | ||
}, | ||
"devDependencies": { | ||
"babel": "npm:babel-core@^5.8.24", | ||
"babel-runtime": "npm:babel-runtime@^5.8.24", | ||
"core-js": "npm:core-js@^1.1.4" | ||
} | ||
} | ||
} | ||
} |
@@ -23,2 +23,9 @@ # Polythene-theme | ||
You will need: | ||
* [Polythene](https://github.com/ArthurClemens/Polythene) - the core components | ||
* `Polythene-theme` - (this repository) the default theme | ||
* [Polythene examples](https://github.com/ArthurClemens/Polythene-examples) - to see implementations of components | ||
Requirement: | ||
@@ -30,6 +37,2 @@ | ||
##### Github | ||
[Polythene-theme](https://github.com/ArthurClemens/Polythene-theme) | ||
##### npm | ||
@@ -47,2 +50,3 @@ | ||
### Configuration | ||
@@ -68,3 +72,2 @@ | ||
### Under the hood | ||
@@ -94,2 +97,49 @@ | ||
### Customizing | ||
Different styling can be achieved using: | ||
#### Enhancing styles | ||
Extra styles are loaded on top of existing component styles. In [Polythene-examples](https://github.com/ArthurClemens/Polythene-examples) most pages have some extra styling using the styler utility: | ||
~~~javascript | ||
import styler from 'polythene-theme/common/styler'; | ||
import style from 'app/card/card-style'; | ||
styler.add('polythene-examples-card', style); | ||
~~~ | ||
Note that no loading order can be guaranteed. Instead use specificity to set precedence of styles. | ||
Of course you can also load extra plain old CSS in the HTML file. | ||
#### Replacing styles | ||
Styles are replaced by changing the file path lookup for the module loader. | ||
It cannot be done by writing the theme name in JavaScript like `System.import('theme/component/style')`, because styles are loaded statically using `require` and `import`. This ensures that styles are loaded before the component is drawn to the screen. The downside is that no variable names can be used for these paths. | ||
Most module loaders have a mapping option to chang the path lookup. From Polythene-examples (that uses jspm/SystemJS): | ||
~~~javascript | ||
map: { | ||
"polythene-theme/element/element": "app/custom-theme/element", | ||
~~~ | ||
Here the file lookup for | ||
`polythene-theme/element/element.js` | ||
is changed to: | ||
`app/custom-theme/element.js` | ||
#### Replacing all styles | ||
The same mechanism can be used to change the lookup for `polythene-theme` to something else. | ||
## Theme utils | ||
@@ -96,0 +146,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
4
44
184
156929
100
2398