ustyle 1.3.12 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ var slice=[].slice,hasProp={}.hasOwnProperty;null==this.Utils&&(this.Utils={modules:[]});var addClass=function(a,b){return removeClass(a,b),a.className+=" "+b+" "},removeClass=function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)","gi");return a.className=a.className.replace(c,"")},hasClass=function(a,b){return new RegExp("(^| )"+b+"( |$)","gi").test(a.className)},merge=function(){var a,b,c,d,e=arguments[0],f=2<=arguments.length?slice.call(arguments,1):[];for(b=0,c=f.length;c>b;b++){a=f[b];for(d in a)hasProp.call(a,d)&&(e[d]=a[d])}return e},setOptions=function(a,b){return merge({},b,a)},deleteUndefined=function(a){var b,c,d=[];for(b in a)c=a[b],null===c||void 0===c?d.push(delete a[b]):d.push(void 0);return d},transformKey=function(){var a,b,c,d=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"];for(a=0,c=e.length;c>a;a++)if(b=e[a],void 0!==d.style[b])return b}(),requestAnimationFrame=function(a){var b,c,d,e=["ms","moz","webkit","o"];for(b=0,c=e.length;c>b&&(d=e[b],!a.requestAnimationFrame);b++)a.requestAnimationFrame=a[d+"RequestAnimationFrame"];return a.requestAnimationFrame||(a.requestAnimationFrame=function(a){return setTimeout(a,1e3/60)})}(window);this.Utils={addClass:addClass,removeClass:removeClass,hasClass:hasClass,merge:merge,setOptions:setOptions,deleteUndefined:deleteUndefined,transformKey:transformKey,requestAnimationFrame:requestAnimationFrame};var createContext,ref=this.Utils,merge=ref.merge,addClass=ref.addClass,hasClass=ref.hasClass,setOptions=ref.setOptions,removeClass=ref.removeClass,transformKey=ref.transformKey,indexOf=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};createContext=function(a){var b;return b=function(){function a(a){var b,c=this.options=setOptions(a,this.defaults);this.target=c.target,this.classPrefix=c.classPrefix,null!==this.target&&(this._boundEvents=[],this._closeTargets=[],b=this.create(),this.anchor=b.anchor,this.arrow=b.arrow,this.content=b.content,this.setEvents(this.anchor),this.watchWindow())}var b,c,d;return a.prototype.defaults={classPrefix:"us-anchor",openEvent:"click",showClose:!0,isAjax:!1},a.prototype.setEvents=function(a){var b=function(b){return function(c){return c.preventDefault(),c.stopPropagation(),b.isOpen()?b.hide(a):b.show(a)}}(this),c=function(b){return function(c){var d;if(b.isOpen()&&(d=c.target,indexOf.call(b._closeTargets,d)>=0&&(c.preventDefault(),c.stopPropagation(),b.hide(a)),c.target!==a&&!a.contains(c.target)&&c.target!==b.target&&!b.target.contains(c.target)))return b.hide(a)}}(this);return this._on(this.target,this.options.openEvent,b),this._on(document,this.options.openEvent,c)},a.prototype._on=function(a,b,c){return this._boundEvents.push({element:a,event:b,handler:c}),a.addEventListener(b,c,!1)},a.prototype.show=function(a){var b,c,d=function(b){return function(){return b.content.appendChild(b.options.content),a.parentNode||document.body.appendChild(a),addClass(a,b.classPrefix+"--open"),setTimeout(function(){return addClass(a,b.classPrefix+"--after-open")}),b.setPosition()}}(this);return this.options.isAjax?null!=(b=this.options.onOpen)?b.call().done(function(){return d()}):void 0:(d(),null!=(c=this.options.onOpen)?c.call():void 0)},a.prototype.hide=function(a){var b;return removeClass(a,this.classPrefix+"--open"),removeClass(a,this.classPrefix+"--after-open"),null!=(b=this.options.onClose)?b.call():void 0},a.prototype.isOpen=function(){return hasClass(this.anchor,this.classPrefix+"--open")},a.prototype.create=function(){var a,b,c,d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("div");return addClass(e,this.classPrefix+"__content"),addClass(f,this.classPrefix+"__arrow-inner"),addClass(d,this.classPrefix+"__arrow"),d.appendChild(f),e.appendChild(d),this.options.showClose&&(c=document.createElement("a"),c.href="#",addClass(c,this.classPrefix+"__close-button"),e.appendChild(c),this._closeTargets.push(c)),a=document.createElement("div"),addClass(a,this.classPrefix),b=a.style,b.position="absolute",b.zIndex="9999",b.top="0px",b.left="0px",a.appendChild(e),addClass(document.documentElement,this.classPrefix+"--ready"),{anchor:a,arrow:d,content:e}},a.prototype.setPosition=function(){var a,e,f,g,h=c(this.target,this.anchor,this.arrow),i=this.target.getBoundingClientRect();return b(i,this.anchor)?(addClass(this.anchor,this.classPrefix+"--bottom"),removeClass(this.anchor,this.classPrefix+"--top"),g="calc(100% + 12px)",e=d(this.target,this.anchor,this.arrow)):(addClass(this.anchor,this.classPrefix+"--top"),removeClass(this.anchor,this.classPrefix+"--bottom"),g="-12px",e=d(this.target,this.anchor,this.arrow)),a="translateX("+Math.round(h)+"px) ",a+="translateY("+Math.round(e)+"px)","msTransform"!==transformKey&&(a+=" translateZ(0)"),this.anchor.style[transformKey]=a,f=i.left-this.anchor.getBoundingClientRect().left+this.target.offsetWidth/2,this.arrow.style.left=f+"px",this.content.style[transformKey+"Origin"]=f+"px "+g},c=function(a,b,c){var d=a.getBoundingClientRect(),e=d.left+b.offsetWidth/2+a.offsetWidth/2,f=d.left+a.offsetWidth/2;return document.body.offsetWidth<e?document.body.offsetWidth-b.offsetWidth:f-b.offsetWidth/2<0?0:d.left-b.offsetWidth/2+a.offsetWidth/2},d=function(a,c,d){var e=a.getBoundingClientRect();return b(e,c)?e.top-(c.offsetHeight-window.pageYOffset)+d.offsetHeight-a.offsetHeight:e.top+d.offsetHeight+a.offsetHeight+window.pageYOffset},b=function(a,b){return a.top<b.offsetHeight?void 0:window.innerHeight-a.top<b.offsetHeight},a.prototype.watchWindow=function(){var a,b,c,d=["resize","scroll","touchmove"],e=[];for(b=0,c=d.length;c>b;b++)a=d[b],e.push(window.addEventListener(a,function(a){return function(b){var c,d,e,f,g;return a.isOpen()?(e=+new Date,f=16,d=3*f,g?void 0:(e-c>d&&(a.setPosition(),c=e),g=setTimeout(function(b){return g=null,c=+new Date,a.setPosition()},f))):void 0}}(this),!1));return e},a}()},window.Anchor=createContext(),window.Backdrop=function(){function a(){d=document.querySelector(".us-backdrop"),null==d&&(d=b())}var b,c=0,d=null;return a.prototype.element=d,b=function(){return d=document.createElement("div"),Utils.addClass(d,"us-backdrop"),document.body.appendChild(d)},a.prototype.retain=function(){var a;return c++,1===c?(Utils.addClass(d,"us-backdrop--visible"),a=function(){return c>=1?Utils.addClass(d,"us-backdrop--active"):void 0},Utils.requestAnimationFrame.call(window,a)):void 0},a.prototype.release=function(){var a;return 1===c&&(Utils.removeClass(d,"us-backdrop--active"),a=function(){return setTimeout(function(){return 0===c?Utils.removeClass(d,"us-backdrop--visible"):void 0},300)},Utils.requestAnimationFrame.call(window,a)),c=Math.max(0,c-1)},a}(),window.Overlay=function(a){function b(a){if(this.overlay=(this.options=f(a,h)).overlay,null==this.overlay||"undefined"==typeof Backdrop||null===Backdrop)throw new Error("There's no overlay or you haven't included Backdrop");this.backdrop=new Backdrop,this.addEventListeners()}var c=a.addClass,d=a.hasClass,e=a.removeClass,f=a.setOptions,g=a.requestAnimationFrame,h={bodyActiveClass:"us-overlay--open",activeClass:"us-overlay-parent--active",visibleClass:"us-overlay-parent--visible",overlay:$(".us-overlay-parent"),openButton:".js-open-overlay",closeButton:".js-close-overlay",historyStatus:"#seedeal",history:!1,preventDefault:!0,animationSpeed:300};return b.prototype.addEventListeners=function(){return $(this.options.openButton).on("click.open-overlay",function(a){return function(b){return a.options.preventDefault&&b.preventDefault(),a.show(b)}}(this)),this.overlay.on("click.close-overlay",function(a){return function(b){for(var c=[],d=a.overlay.find(a.options.closeButton).toArray(),e=[a.overlay[0]].concat(d),f=e.length-1;f>=0;f--){var g=e[f];if(b.target===g){a.options.preventDefault&&b.preventDefault(),a.hide(b);break}c.push(void 0)}return c}}(this)),this.hasHistory()?window.onpopstate=function(a){return function(b){return a.isOpen()?a.hide(b):void 0}}(this):void 0},b.prototype.show=function(a){var b,d=this;return $(document.body).addClass(this.options.bodyActiveClass),this.backdrop.retain(),c(this.overlay[0],this.options.visibleClass),b=function(){return c(d.overlay[0],d.options.activeClass),setTimeout(function(){var b;return"function"==typeof(b=d.options).onOpen?b.onOpen(a):void 0},d.options.animationSpeed)},g.call(window,b),this.hasHistory()?history.pushState("open",window.document.title,this.options.historyStatus):void 0},b.prototype.hide=function(a){var b,c=this;return $(document.body).removeClass(this.options.bodyActiveClass),this.backdrop.release(),b=function(){return e(c.overlay[0],c.options.activeClass),setTimeout(function(){var b;return e(c.overlay[0],c.options.visibleClass),"function"==typeof(b=c.options).onClose?b.onClose(a):void 0},c.options.animationSpeed)},g.call(window,b),this.hasHistory()&&"open"===history.state?history.back():void 0},b.prototype.isOpen=function(){return d(this.overlay[0],this.options.activeClass)},b.prototype.hasHistory=function(){return this.options.history&&window.history&&window.history.pushState},b}(this.Utils);var setOptions=this.Utils.setOptions;window.Tabs=function(a){var b;return b=function(){function a(a){var b=this.options=setOptions(a,this.defaults),c=b.tabContainer,d=b.tabLinks;this.tabs=$(c).find(d),this.filter=this.tabs.data("target")?"data-target":"href",this.init(),this.tabs.on("click.ustyle.tab",function(a){return function(b){var c=$(b.currentTarget);return a.isAccordion()&&a.options.collapsible&&a.isActive(c)?(a.collapse(c),a.hashClear()):(a.navigateTo(c),a.scrollToTab(c),a.hashChange(c)),b.preventDefault()}}(this))}var b;return a.prototype.defaults={tabContainer:".us-tabs",tabLinks:".us-tabs-nav-mainlink",tabNav:".us-tabs-nav",changeUrls:!0,activeClass:"active",collapsible:!1,autoScroll:!0},a.prototype.init=function(){var a=this.activeTab(),b=this.tabFromHash();return b.length?this.navigateTo(b):a.length?this.navigateTo(a):this.options.collapsible&&this.isAccordion()?void 0:this.navigateTo(this.tabs.first())},a.prototype.hashChange=function(a){return this.options.changeUrls?location.replace("#!"+b(a).replace(/#/,"")):void 0},a.prototype.hashClear=function(){if(this.options.changeUrls){var a=window.location.pathname+window.location.search;return"function"==typeof history.replaceState?history.replaceState("",document.title,a):void 0}},a.prototype.navigateTo=function(a){var c=b(a),d=$(c);return this.tabs.removeClass(this.options.activeClass).end(),this.tabs.filter("["+this.filter+"='"+c+"']").addClass(this.options.activeClass),d.siblings("."+this.options.activeClass).removeClass(this.options.activeClass).end().addClass(this.options.activeClass),d.trigger("ustyle.tab.active")},a.prototype.collapse=function(a){var c=$(b(a));return this.tabs.removeClass(this.options.activeClass).end(),c.removeClass(this.options.activeClass)},a.prototype.scrollToTab=function(a){if(this.isAccordion()&&this.options.autoScroll){var c=$(b(a));return $("html,body").scrollTop(c.offset().top)}},a.prototype.activeTab=function(){return this.tabs.filter("."+this.options.activeClass)},a.prototype.tabFromHash=function(){var a=location.hash.replace("!","");return this.tabs.filter("["+this.filter+"='"+a+"']")},a.prototype.isActive=function(a){return b(a)===b(this.activeTab())},a.prototype.isAccordion=function(){return!$(this.options.tabNav).is(":visible")},b=function(a){return a.data("target")||a.attr("href")},a}()}(),window.ClassToggler=function(){function a(a){this.options=Utils.setOptions(a,b),this.options.$target?this.addEventListeners():console.trace("ClassToggle",this.options)}var b;return b={containerClass:null,$target:null,activeClass:"active",inactiveClass:null,toggleOn:"click"},a.prototype.addEventListeners=function(){return this.options.$target.on(this.options.toggleOn,function(a){return function(b){var c=a.options.containerClass?$(b.target).closest(a.options.containerClass):$(b.delegateTarget);return a.isActive(c)?a.hide(c,b):a.show(c,b)}}(this))},a.prototype.isActive=function(a){return a.hasClass(this.options.activeClass)},a.prototype.show=function(a,b){var c;return"function"==typeof(c=this.options).onShow&&c.onShow(a,b),a.addClass(this.options.activeClass)},a.prototype.hide=function(a,b){var c;return"function"==typeof(c=this.options).onHide&&c.onHide(a,b),a.removeClass(this.options.activeClass)},a}(),window.RadioToggle=function(){function a(a){if(this.options=Utils.setOptions(a,b),!this.options.$target)throw new Error("No target defined");this.addEventListeners()}var b={$target:$(".us-toggle")};return a.prototype.addEventListeners=function(){return this.options.$target.on("change","input:radio",function(a){return $("input[name='"+this.name+"']").removeClass("checked"),this.checked&&$(this).addClass("checked"),a.stopPropagation()})},a}();
@@ -1,4 +1,4 @@
1
1
  module Ustyle
2
- version = "1.3.12"
2
+ version = "1.4.0"
3
3
  VERSION = version
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ustyle",
3
- "version": "1.3.12",
3
+ "version": "1.4.0",
4
4
  "description": "A living styleguide and pattern library by uSwitch.",
5
5
  "keywords": [
6
6
  "css",
@@ -50,6 +50,7 @@
50
50
  "grunt-contrib-uglify": "^0.9.2",
51
51
  "grunt-contrib-watch": "^0.6.1",
52
52
  "grunt-env": "^0.4.2",
53
+ "grunt-jscs": "~2.0.0",
53
54
  "grunt-newer": "^1.1.0",
54
55
  "grunt-postcss": "^0.2.0",
55
56
  "grunt-sassdoc": "^2.0.0",
@@ -58,6 +59,7 @@
58
59
  "grunt-svgmin": "^2.0.0",
59
60
  "grunt-version": "^1.0.0",
60
61
  "handlebars": "^2.0.0",
62
+ "jscs": "~2.1.0",
61
63
  "load-grunt-tasks": "~3.1.0",
62
64
  "lodash": "^2.4.1",
63
65
  "marked": "^0.3.2",
@@ -67,8 +69,6 @@
67
69
  "stylestats": "^4.2.2",
68
70
  "svg-to-png": "^2.0.0",
69
71
  "svgo": "^0.5.0",
70
- "underscore.string": "^3.0.2",
71
- "grunt-jscs": "~2.0.0",
72
- "jscs": "~2.1.0"
72
+ "underscore.string": "^3.0.2"
73
73
  }
74
74
  }
@@ -6,12 +6,12 @@
6
6
  <!-- <![endif] -->
7
7
  <head>
8
8
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
9
- <meta content='width=device-width, initial-scale=1.0' name='viewport'>
9
+ <meta content='width=device-width, initial-scale=1.0' name='viewport' />
10
10
  <title>uStyle styleguide</title>
11
11
  <link rel="stylesheet" href="/css/main.css" type="text/css" />
12
12
  <!--[if lt IE 9]>
13
13
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
14
- <![endif] -->
14
+ <![endif]-->
15
15
  <script>
16
16
  (function(html){
17
17
  html.className=html.className.replace(/\bno-js\b/,'js');
data/tasks/publish.rake CHANGED
@@ -40,6 +40,7 @@ namespace :deploy do
40
40
 
41
41
  Ustyle.invalidate([
42
42
  "/s3/#{Ustyle::BUCKET}/ustyle/ustyle-latest.css",
43
+ "/s3/#{Ustyle::BUCKET}/ustyle/ustyle.min.js",
43
44
  "/s3/#{Ustyle::BUCKET}/ustyle/ustyle-content.css",
44
45
  "/s3/#{Ustyle::BUCKET}/ustyle/ustyle-icons.css"
45
46
  ])
@@ -2,7 +2,7 @@
2
2
  // @name Primary palette
3
3
  // @partial colour
4
4
  //
5
- // @description Our colours (with a u”, were a UK company) are divided into primary, secondary and tertiary palettes. The primary and secondary are core to all our design work and supported by the tertiary which we use in infographics, graphs and the like. CMYK equivalents are available for print work.
5
+ // @description Our colours (with a "u", we're a UK company) are divided into primary, secondary and tertiary palettes. The primary and secondary are core to all our design work and supported by the tertiary which we use in infographics, graphs and the like. CMYK equivalents are available for print work.
6
6
  //
7
7
  // @variable c-cyan - Hero banners
8
8
  // @variable c-navy - Text with emphasis
@@ -10,86 +10,64 @@
10
10
  // @variable c-typecyan - Text links, icons
11
11
  // @variable c-typegrey - Body text
12
12
  // @variable c-typegrey-2 - Text without emphasis
13
- // @variable c-inputgrey - Dropdowns, icons
14
- // @variable c-bordergrey - Borders
15
- // @variable c-keylinegrey - Keylines, separators
16
13
  // @variable c-bggrey - Backgrounds
14
+ // @variable c-red - Primary buttons
15
+ // @variable c-green - Action buttons, USPs
17
16
 
18
17
  $c-navy: #1c1f4e;
19
18
  $c-blue: #174695;
20
19
  $c-typecyan: #008fe9;
21
20
  $c-cyan: #99e2ff;
22
- $c-typegrey: #333;
23
- $c-typegrey-2: #767676;
24
- $c-inputgrey: #97999a;
25
- $c-bordergrey: #bbb;
26
- $c-keylinegrey: #eaeaea;
27
- $c-bggrey: #f4f4f4;
21
+ $c-typegrey: #2f353a;
22
+ $c-typegrey-2: #65717b;
23
+ $c-bggrey: #f4f5f6;
24
+ $c-red: #d64226;
25
+ $c-green: #2aaa5b;
28
26
 
29
27
  // @page Brand/Colours
30
28
  // @name Secondary palette
31
29
  // @partial colour
32
- //
33
- // @variable c-red - Primary buttons
34
- // @variable c-green - Action buttons, USPs
35
- // @variable c-yellow - USPs
36
- // @variable c-orange - USPs
37
- // @variable c-purple - USPs
38
- // @variable c-navy-light
30
+ // @variable c-inputgrey - Dropdowns, icons
31
+ // @variable c-bordergrey - Borders
32
+ // @variable c-keylinegrey - Keylines, separators
39
33
  // @variable c-blue-light
40
34
  // @variable c-typecyan-light
41
35
  // @variable c-cyan-light
36
+ // @variable c-yellow - USPs
37
+ // @variable c-orange - USPs
38
+ // @variable c-purple - USPs
42
39
 
43
- $c-yellow: #ffd32f;
44
- $c-orange: #f27930;
45
- $c-purple: #9c55b8;
46
- $c-red: #d64226;
47
- $c-green: #2aaa5b;
48
- $c-navy-light: #1a316e;
40
+
41
+ $c-inputgrey: #84909a;
42
+ $c-bordergrey: #b0b8bf;
43
+ $c-keylinegrey: #e9ebed;
49
44
  $c-blue-light: #0c72bf;
50
45
  $c-typecyan-light: #4cc0f4;
51
46
  $c-cyan-light: #e4f8ff;
47
+ $c-yellow: #ffd32f;
48
+ $c-orange: #f27930;
49
+ $c-purple: #9c55b8;
50
+
52
51
 
53
52
  // @page Brand/Colours
54
53
  // @name Tertiary palette
55
54
  // @partial colour
56
55
  //
56
+ // @variable c-red-dark
57
+ // @variable c-green-dark
58
+ // @variable c-red-lightest
59
+ // @variable c-green-lightest
57
60
  // @variable c-yellow-lightest
58
- // @variable c-yellow-light
59
- // @variable c-yellow-dark
60
- //
61
61
  // @variable c-orange-lightest
62
- // @variable c-orange-light
63
- // @variable c-orange-dark
64
- //
65
62
  // @variable c-purple-lightest
66
- // @variable c-purple-light
67
- // @variable c-purple-dark
68
- //
69
- // @variable c-red-lightest
70
- // @variable c-red-light
71
- // @variable c-red-dark
72
- //
73
- // @variable c-green-lightest
74
- // @variable c-green-light
75
- // @variable c-green-dark
76
63
 
77
- $c-yellow-lightest: #ffedab;
78
- $c-yellow-light: #ffe06d;
79
- $c-yellow-dark: #d8b327;
80
64
 
65
+ $c-red-dark: #b53820;
66
+ $c-green-dark: #23904d;
67
+ $c-red-lightest: #eeb3a8;
68
+ $c-green-lightest: #adebc5;
69
+ $c-yellow-lightest: #ffedab;
81
70
  $c-orange-lightest: #f9c9ac;
82
- $c-orange-light: #f5a16e;
83
- $c-orange-dark: #cd6628;
84
-
85
71
  $c-purple-lightest: #d7bbe2;
86
- $c-purple-light: #b988cd;
87
- $c-purple-dark: #84489c;
88
72
 
89
- $c-red-lightest: #eeb3a8;
90
- $c-red-light: #e27a67;
91
- $c-red-dark: #b53820;
92
73
 
93
- $c-green-lightest: #a9ddbd;
94
- $c-green-light: #69c38c;
95
- $c-green-dark: #23904d;
@@ -7,7 +7,7 @@
7
7
  // @markup
8
8
  // <section class="us-cta cta cta-column">
9
9
  // <form>
10
- // <h3 class="us-cta__title">Its your report</h3>
10
+ // <h3 class="us-cta__title">It's your report</h3>
11
11
  // <p>Join the campaign to fight for free annual credit reports for everyone</p>
12
12
  // <a href="/money/itsmyreport/" class="us-btn us-btn--primary" rel="nofollow">Sign the petition</a>
13
13
  // </form>
@@ -33,7 +33,7 @@
33
33
  // <div class="us-col-xsm-6 us-desktop--block">
34
34
  // <div class="us-featured-highlight">
35
35
  // <strong class="us-featured-highlight__title">
36
- // £99.99
36
+ // &pound;99.99
37
37
  // </strong>
38
38
  // monthly cost
39
39
  // </div>
@@ -41,7 +41,7 @@
41
41
  // <div class="us-col-xsm-6 us-desktop--block">
42
42
  // <div class="us-featured-highlight">
43
43
  // <strong class="us-featured-highlight__title">
44
- // £99.99
44
+ // &pound;99.99
45
45
  // </strong>
46
46
  // monthly cost
47
47
  // <br>
@@ -28,19 +28,25 @@
28
28
  // </nav>
29
29
  // <div class='us-tabs-container'>
30
30
  // <div class='us-tab' id='tab1'>
31
- // <h2 class='us-tab-title'><a class="us-tabs-nav-mainlink" href="#tab1">Test 1</a></h2>
31
+ // <h2 class='us-tab-title'>
32
+ // <a class="us-tabs-nav-mainlink us-icon--after us-icon--chevron-right--after us-icon--small--after us-icon--inputgrey--after" href="#tab1">Test 1</a>
33
+ // </h2>
32
34
  // <div class='us-tab-content'>
33
35
  // <p>Fatback capicola leberkas pork loin pork jowl. Meatloaf shoulder pancetta, salami prosciutto ribeye andouille chuck landjaeger short loin filet mignon sirloin. Pork chop tri-tip ham pork hamburger frankfurter leberkas short ribs biltong. Prosciutto ham hock rump, andouille tongue flank sirloin tri-tip ball tip frankfurter ham drumstick meatloaf pork loin.</p>
34
36
  // </div>
35
37
  // </div>
36
38
  // <div class='us-tab' id='tab2'>
37
- // <h2 class='us-tab-title'><a class="us-tabs-nav-mainlink" href="#tab2">Test 2</a></h2>
39
+ // <h2 class='us-tab-title'>
40
+ // <a class="us-tabs-nav-mainlink us-icon--after us-icon--chevron-right--after us-icon--small--after us-icon--inputgrey--after" href="#tab2">Test 2</a>
41
+ // </h2>
38
42
  // <div class='us-tab-content'>
39
43
  // <p>Kielbasa tenderloin spare ribs, andouille doner brisket chuck drumstick bresaola short loin pork t-bone ground round jowl. Ball tip pork loin doner tongue filet mignon biltong hamburger leberkas. Filet mignon kielbasa kevin short ribs, drumstick chuck shankle spare ribs tri-tip.</p>
40
44
  // </div>
41
45
  // </div>
42
46
  // <div class='us-tab' id='tab3'>
43
- // <h2 class='us-tab-title'><a class="us-tabs-nav-mainlink" href="#tab3">Test 3</a></h2>
47
+ // <h2 class='us-tab-title'>
48
+ // <a class="us-tabs-nav-mainlink us-icon--after us-icon--chevron-right--after us-icon--small--after us-icon--inputgrey--after" href="#tab3">Test 3</a>
49
+ // </h2>
44
50
  // <div class='us-tab-content'>
45
51
  // <p>Pig pastrami pork loin kielbasa, filet mignon meatloaf short ribs tenderloin. Pork loin leberkas kevin fatback porchetta bresaola. Cow rump shoulder pastrami. Andouille pork belly t-bone short ribs brisket. Bresaola pork belly tail salami capicola meatball. Pork belly beef ham landjaeger.</p>
46
52
  // </div>
@@ -49,6 +55,8 @@
49
55
  // </div>
50
56
 
51
57
  $tab-width: col-width(2) !default;
58
+ $tab-border-color: #fff;
59
+ $tab-active-color: $tab-border-color;
52
60
 
53
61
  @keyframes tab-show {
54
62
  0% {
@@ -63,7 +71,7 @@ $tab-width: col-width(2) !default;
63
71
  // Tab nav
64
72
  .us-tabs-nav {
65
73
  display: none;
66
- background-color: $c-navy;
74
+ background-color: $c-bggrey;
67
75
 
68
76
  @include respond-to(tablet) {
69
77
  .js & {
@@ -78,7 +86,6 @@ $tab-width: col-width(2) !default;
78
86
 
79
87
  .us-tabs-nav-wrapper {
80
88
  @extend %container;
81
- padding-top: $gutter-width / 2;
82
89
  }
83
90
 
84
91
  .us-tabs-nav-menu {
@@ -91,18 +98,15 @@ $tab-width: col-width(2) !default;
91
98
  }
92
99
 
93
100
  .us-tabs-nav-link {
94
- @include normal-font;
95
- @include link-colors(#fff, $c-navy, $c-navy, #fff);
96
- position: relative;
97
- z-index: 1;
98
101
  display: table-cell;
99
102
  width: $tab-width;
100
- padding: .475em .15em 1.2em;
103
+ padding: 14px 1em 12px;
101
104
  text-align: center;
102
105
  vertical-align: middle;
103
- border-radius: 3px 3px 0 0;
106
+ border-right: 1px solid $tab-border-color;
107
+ border-radius: 0;
104
108
  transition: none;
105
-
109
+
106
110
  @include respond-to(tablet) {
107
111
  font-size: em(14px);
108
112
  line-height: 1.25em;
@@ -116,15 +120,48 @@ $tab-width: col-width(2) !default;
116
120
  font-size: em(18px);
117
121
  }
118
122
 
119
- &:hover {
120
- background-color: #fff;
123
+ &:last-child {
124
+ border-right: 0;
125
+ }
126
+
127
+ &:hover,
128
+ &.active {
129
+ color: $c-typecyan;
130
+
131
+ &:before {
132
+ background-color: $c-typecyan;
133
+ }
121
134
  }
122
135
 
123
136
  &.active {
124
- z-index: 2;
125
- color: $c-navy;
126
- background-color: #fff;
127
- box-shadow: 0 0 10px rgba(0, 0, 0, .5);
137
+ cursor: default;
138
+ background-color: $tab-active-color;
139
+
140
+ &:hover {
141
+ background-color: $tab-active-color;
142
+ }
143
+ }
144
+ }
145
+
146
+ .us-tabs-nav-mainlink {
147
+ @include link-colors($c-inputgrey, $c-typecyan, $c-typecyan, $c-inputgrey);
148
+ position: relative;
149
+ background-color: $c-bggrey;
150
+ transition: color 300ms, background-color 300ms;
151
+
152
+ &:before {
153
+ position: absolute;
154
+ top: 0;
155
+ right: 0;
156
+ left: 0;
157
+ height: 5px;
158
+ background-color: $c-bggrey;
159
+ content: "";
160
+ transition: background-color 300ms;
161
+ }
162
+
163
+ &:hover {
164
+ background-color: rgba(255,255,255,.35);
128
165
  }
129
166
  }
130
167
 
@@ -157,10 +194,11 @@ $tab-width: col-width(2) !default;
157
194
  }
158
195
 
159
196
  .us-tab-title {
160
- @extend %heading-4;
197
+ @include heading(4);
161
198
  position: relative;
162
199
  margin: 0;
163
200
  font-weight: normal;
201
+ border-bottom: 1px solid #fff;
164
202
 
165
203
  @include respond-to(tablet) {
166
204
  .js & {
@@ -172,41 +210,34 @@ $tab-width: col-width(2) !default;
172
210
  display: none;
173
211
  }
174
212
 
175
- a {
176
- @include link-colors($c-navy, #fff, $c-navy);
213
+ .us-tabs-nav-mainlink {
177
214
  display: block;
178
- padding: .5em .75em;
179
- background-color: $c-cyan;
180
- border-bottom: 1px solid #fff;
181
- transition: color 300ms, background-color 300ms;
182
-
183
- .active & {
184
- color: #fff;
185
- background-color: $c-navy;
215
+ padding: .75em .75em .5em;
216
+
217
+ &:after {
218
+ position: absolute;
219
+ right: $gutter-width/2;
186
220
  }
187
221
 
188
- .active &:before {
189
- transform: rotate(90deg);
222
+ .us-tab.active & {
223
+ color: $c-typecyan;
224
+ background-color: $tab-active-color;
190
225
  }
191
226
 
192
- &:hover:before {
193
- color: #fff;
227
+ &:hover:after,
228
+ .us-tab.active &:after {
229
+ @include icon-color("typecyan");
194
230
  transform: rotate(90deg);
195
231
  }
196
232
 
197
- &:before {
198
- @include arrow(10px, 10px, right);
199
- display: inline-block;
200
- margin-right: .75em;
201
- font-size: .75em;
202
- content: "";
203
- transition: all 300ms;
233
+ &:hover:before,
234
+ .us-tab.active &:before {
235
+ background-color: $c-typecyan;
204
236
  }
205
237
  }
206
238
  }
207
239
 
208
240
  .us-tab-content {
209
- @extend %container;
210
241
  display: block;
211
242
  overflow: hidden;
212
243
  opacity: 1;
@@ -80,15 +80,20 @@ $select-hover-color: $c-form-element-border-hover !default;
80
80
 
81
81
  .us-form-select-wrap--multiple, // [deprecated]
82
82
  .us-form-select--multiple,
83
- .us-form-select[multiple] {
83
+ .us-form-select[multiple],
84
+ .us-form-select[size] {
84
85
  &,
85
86
  .us-form-select {
86
87
  height: auto;
87
88
  padding: $select-base-padding;
88
- overflow: auto;
89
+ overflow: hidden {
90
+ x: auto;
91
+ y: auto;
92
+ };
89
93
  vertical-align: middle;
90
94
  cursor: default;
91
95
  background-image: none;
96
+ -webkit-overflow-scrolling: touch;
92
97
  }
93
98
 
94
99
  &:hover,
@@ -97,9 +102,28 @@ $select-hover-color: $c-form-element-border-hover !default;
97
102
  }
98
103
 
99
104
  option {
100
- padding: .3em 5px;
101
105
  cursor: pointer;
102
106
  }
107
+
108
+ &::-webkit-scrollbar {
109
+ width: 16px;
110
+ height: 16px;
111
+
112
+ &:window-inactive {
113
+ opacity: 0;
114
+ }
115
+ }
116
+
117
+ &::-webkit-scrollbar-thumb {
118
+ background: rgba(0, 0, 0, .2);
119
+ border: 4px solid rgba(0, 0, 0, 0);
120
+ border-radius: 8px;
121
+ background-clip: padding-box;
122
+ }
123
+
124
+ &::-webkit-scrollbar-corner {
125
+ background-color: transparent;
126
+ }
103
127
  }
104
128
 
105
129
  .us-form-select-wrap--blocked, // [deprecated]
@@ -89,6 +89,10 @@ $colors: (
89
89
  .us-color--#{nth($color, 1)} {
90
90
  color: nth($color, 2);
91
91
  }
92
+
93
+ .us-background-color--#{nth($color, 1)} {
94
+ background: nth($color, 2);
95
+ }
92
96
  }
93
97
 
94
98
  // Fonts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ustyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.12
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - uSwitch Limited
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-12-02 00:00:00.000000000 Z
16
+ date: 2016-02-03 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: sass
@@ -182,6 +182,7 @@ files:
182
182
  - dist/ustyle-latest.css
183
183
  - dist/ustyle.js
184
184
  - dist/ustyle.json
185
+ - dist/ustyle.min.js
185
186
  - grunt/modules/dss-helper.js
186
187
  - grunt/modules/file.js
187
188
  - grunt/modules/templates.js