├── .gitignore ├── examples └── docs │ ├── ico │ ├── favicon.png │ └── apple-touch-icon-144-precomposed.png │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff │ ├── js │ ├── ie8-responsive-file-warning.js │ ├── application.js │ ├── customizer.js │ ├── docs.min.js │ ├── filesaver.js │ └── holder.js │ └── css │ ├── pygments-manni.css │ └── docs.min.css ├── dist ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── js │ └── bootstrap.min.js ├── _config.yml ├── bower.json ├── less ├── theme.less ├── wells.less ├── labels.less ├── input-groups.less ├── navs.less ├── panels.less ├── type.less ├── button-groups.less ├── buttons.less ├── forms.less └── variables.less ├── package.json ├── Gruntfile.coffee ├── README.md ├── index.html └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | /node_modules 3 | /bower_components 4 | /tmp -------------------------------------------------------------------------------- /examples/docs/ico/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/examples/docs/ico/favicon.png -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - Gruntfile.coffee 3 | - bower.json 4 | - package.json 5 | - LICENSE 6 | - node_modules 7 | - bower_components 8 | - README.md -------------------------------------------------------------------------------- /examples/docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/examples/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /examples/docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/examples/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /examples/docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/examples/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /examples/docs/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slider23/bootstrap-theme-github/HEAD/examples/docs/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-theme-github", 3 | "version": "0.2.0", 4 | "main": "dist/bootstrap.css", 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "bower_components", 9 | "test", 10 | "tests" 11 | ], 12 | "dependencies": { 13 | "bootstrap":"3.1.1" 14 | } 15 | } -------------------------------------------------------------------------------- /less/theme.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Github theme for bootstrap v3.1.1 3 | * 4 | * Copyright 2013 slider23 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * This theme was built using the Themestrap Bootstrap Theme Kit. 9 | * https://github.com/divshot/themestrap 10 | */ 11 | 12 | @import "bootstrap.less"; 13 | 14 | // Add CSS Customizations to your theme here. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-theme-github", 3 | "version": "0.2.0", 4 | "devDependencies": { 5 | "grunt": "~0.4.1", 6 | "grunt-contrib-less": "~0.6.4", 7 | "grunt-contrib-watch": "~0.4.4", 8 | "grunt-contrib-cssmin": "~0.6.1", 9 | "grunt-contrib-copy": "~0.4.1", 10 | "grunt-text-replace": "~0.3.2", 11 | "grunt-contrib-clean": "~0.5.0", 12 | "grunt-contrib-connect": "~0.3.0", 13 | "bower": "~1.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/docs/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2013 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 15px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid darken(@well-bg, 7%); 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px 15px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 100%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /Gruntfile.coffee: -------------------------------------------------------------------------------- 1 | module.exports = (grunt) -> 2 | grunt.initConfig 3 | bowerDirectory: require('bower').config.directory 4 | less: 5 | compile: 6 | options: 7 | compress: false 8 | paths: ['less', 'tmp', '<%= bowerDirectory %>/bootstrap/less'] 9 | files: 10 | 'dist/css/bootstrap.css': ['less/theme.less'] 11 | watch: 12 | less: 13 | files: ['less/*.less'] 14 | tasks: ['copy', 'less:compile', 'clean'] 15 | options: 16 | livereload: true 17 | cssmin: 18 | files: ['dist/css/bootstrap.css'] 19 | tasks: ['cssmin:minify'] 20 | cssmin: 21 | minify: 22 | expand: true 23 | cwd: 'dist/css' 24 | src: ['*.css', '!*.min.css'] 25 | dest: 'dist/css' 26 | ext: '.min.css' 27 | connect: 28 | serve: 29 | options: 30 | port: grunt.option('port') || '8000' 31 | hostname: grunt.option('host') || 'localhost' 32 | copy: 33 | bootstrap: 34 | files: [ 35 | { expand: true, cwd: '<%= bowerDirectory %>/bootstrap/less', src: ['bootstrap.less'], dest: 'tmp/' }, 36 | { expand: true, cwd: '<%= bowerDirectory %>/bootstrap/fonts', src: ['*'], dest: 'dist/fonts' } 37 | ] 38 | clean: ['tmp'] 39 | 40 | grunt.loadNpmTasks('grunt-contrib-less') 41 | grunt.loadNpmTasks('grunt-contrib-watch') 42 | grunt.loadNpmTasks('grunt-contrib-cssmin') 43 | grunt.loadNpmTasks('grunt-contrib-copy') 44 | grunt.loadNpmTasks('grunt-text-replace') 45 | grunt.loadNpmTasks('grunt-contrib-clean') 46 | grunt.loadNpmTasks('grunt-contrib-connect') 47 | 48 | grunt.registerTask('default', ['copy', 'less', 'cssmin', 'clean']) 49 | grunt.registerTask('serve', ['connect', 'watch']) 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Github theme for Twitter Bootstrap 3 2 | 3 | No more ugly huge elements. No more big fonts. No more candy-style buttons. 4 | Only strict and perfect beauty. 5 | Demo: http://slider23.github.io/bootstrap-theme-github/ 6 | 7 | ## Installation 8 | 9 | Replace original `bootstrap.css` or `bootstrap.min.css` by `dist/css/bootstrap.css` or `dist/css/bootstrap.min.css` 10 | 11 | ## Built by Themestrap 12 | 13 | **Themestrap** is a simple starter kit for constructing Twitter Bootstrap 3+ themes. It provides the skeleton 14 | for a simple, maintainable theme that always uses code directly from Bootstrap with as little replacement as 15 | possible. 16 | 17 | ### Themestrap's Philosophy 18 | 19 | 1. A theme should be built *on top* of the framework, with as little intrusive change as possible. 20 | 2. As the framework evolves, a theme should be easily updated to the latest version. 21 | 22 | To this end, Themestrap provides you with two simple files to modify: **variables.less** 23 | and **theme.less** (both in the `less` directory). You can tweak any and all of the Bootstrap variables 24 | in **variables.less** and support any additional code or classes you'd like in **theme.less**. The compiled 25 | theme CSS includes the Bootstrap library and will automatically pick up any overrides from variables. 26 | 27 | ### Creating a Theme with Themestrap 28 | 29 | To create a theme, first start by cloning the Themestrap repository into a directory named for 30 | your theme. We recommend a `bootstrap-theme-THEME_NAME` naming scheme: 31 | 32 | git clone https://github.com/divshot/themestrap.git bootstrap-theme-THEME_NAME 33 | 34 | Next, you should open `bower.json` and change the package name from `bootstrap-theme-themestrap` 35 | to match what you want your theme to be named. Now you're ready to install dependencies using 36 | [Grunt](http://gruntjs.com) and [Bower](https://github.com/bower/bower) (you must have these 37 | installed). 38 | 39 | npm install 40 | bower install 41 | 42 | Now you're ready to go! Simply edit `less/variables.less` and `less/theme.less` to your liking. 43 | When you're ready, just run `grunt` and it will compile and minify the distribution for you. 44 | You can also run `grunt watch` to automatically compile as you work. -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Github theme for Bootstrap 3 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |

Github theme for Bootstrap 3 (3.1.1)

18 |

A theme for Bootstrap 3 by slider23

19 | 24 | 25 |
26 |
Installation Instructions
27 |
28 |

Download the bootstrap.css or bootstrap.min.css files.

29 |
30 |
31 | 32 |

33 |

34 | 35 |

A Themestrap theme. Copyright © 2013 Divshot, Inc. Some rights reserved.

36 |
37 |
38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/docs/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * Copyright 2013 Twitter, Inc. 7 | * 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function(){ 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement("style"); 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | "@-ms-viewport{width:auto!important}" 25 | ) 26 | ); 27 | document.getElementsByTagName("head")[0]. 28 | appendChild(msViewportStyle); 29 | } 30 | 31 | 32 | var $window = $(window) 33 | var $body = $(document.body) 34 | 35 | var navHeight = $('.navbar').outerHeight(true) + 10 36 | 37 | $body.scrollspy({ 38 | target: '.bs-sidebar', 39 | offset: navHeight 40 | }) 41 | 42 | $window.on('load', function () { 43 | $body.scrollspy('refresh') 44 | }) 45 | 46 | $('.bs-docs-container [href=#]').click(function (e) { 47 | e.preventDefault() 48 | }) 49 | 50 | // back to top 51 | setTimeout(function () { 52 | var $sideBar = $('.bs-sidebar') 53 | 54 | $sideBar.affix({ 55 | offset: { 56 | top: function () { 57 | var offsetTop = $sideBar.offset().top 58 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 59 | var navOuterHeight = $('.bs-docs-nav').height() 60 | 61 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 62 | } 63 | , bottom: function () { 64 | return (this.bottom = $('.bs-footer').outerHeight(true)) 65 | } 66 | } 67 | }) 68 | }, 100) 69 | 70 | setTimeout(function () { 71 | $('.bs-top').affix() 72 | }, 100) 73 | 74 | // tooltip demo 75 | $('.tooltip-demo').tooltip({ 76 | selector: "[data-toggle=tooltip]", 77 | container: "body" 78 | }) 79 | 80 | $('.tooltip-test').tooltip() 81 | $('.popover-test').popover() 82 | 83 | $('.bs-docs-navbar').tooltip({ 84 | selector: "a[data-toggle=tooltip]", 85 | container: ".bs-docs-navbar .nav" 86 | }) 87 | 88 | // popover demo 89 | $("[data-toggle=popover]") 90 | .popover() 91 | 92 | // button state demo 93 | $('#fat-btn') 94 | .click(function () { 95 | var btn = $(this) 96 | btn.button('loading') 97 | setTimeout(function () { 98 | btn.button('reset') 99 | }, 3000) 100 | }) 101 | }) 102 | 103 | }(jQuery) 104 | -------------------------------------------------------------------------------- /examples/docs/css/pygments-manni.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | /*{ background: #f0f3f3; }*/ 3 | .c { color: #999; } /* Comment */ 4 | .err { color: #AA0000; background-color: #FFAAAA } /* Error */ 5 | .k { color: #006699; } /* Keyword */ 6 | .o { color: #555555 } /* Operator */ 7 | .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ 8 | .cp { color: #009999 } /* Comment.Preproc */ 9 | .c1 { color: #999; } /* Comment.Single */ 10 | .cs { color: #999; } /* Comment.Special */ 11 | .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ 12 | .ge { font-style: italic } /* Generic.Emph */ 13 | .gr { color: #FF0000 } /* Generic.Error */ 14 | .gh { color: #003300; } /* Generic.Heading */ 15 | .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ 16 | .go { color: #AAAAAA } /* Generic.Output */ 17 | .gp { color: #000099; } /* Generic.Prompt */ 18 | .gs { } /* Generic.Strong */ 19 | .gu { color: #003300; } /* Generic.Subheading */ 20 | .gt { color: #99CC66 } /* Generic.Traceback */ 21 | .kc { color: #006699; } /* Keyword.Constant */ 22 | .kd { color: #006699; } /* Keyword.Declaration */ 23 | .kn { color: #006699; } /* Keyword.Namespace */ 24 | .kp { color: #006699 } /* Keyword.Pseudo */ 25 | .kr { color: #006699; } /* Keyword.Reserved */ 26 | .kt { color: #007788; } /* Keyword.Type */ 27 | .m { color: #FF6600 } /* Literal.Number */ 28 | .s { color: #d44950 } /* Literal.String */ 29 | .na { color: #4f9fcf } /* Name.Attribute */ 30 | .nb { color: #336666 } /* Name.Builtin */ 31 | .nc { color: #00AA88; } /* Name.Class */ 32 | .no { color: #336600 } /* Name.Constant */ 33 | .nd { color: #9999FF } /* Name.Decorator */ 34 | .ni { color: #999999; } /* Name.Entity */ 35 | .ne { color: #CC0000; } /* Name.Exception */ 36 | .nf { color: #CC00FF } /* Name.Function */ 37 | .nl { color: #9999FF } /* Name.Label */ 38 | .nn { color: #00CCFF; } /* Name.Namespace */ 39 | .nt { color: #2f6f9f; } /* Name.Tag */ 40 | .nv { color: #003333 } /* Name.Variable */ 41 | .ow { color: #000000; } /* Operator.Word */ 42 | .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .mf { color: #FF6600 } /* Literal.Number.Float */ 44 | .mh { color: #FF6600 } /* Literal.Number.Hex */ 45 | .mi { color: #FF6600 } /* Literal.Number.Integer */ 46 | .mo { color: #FF6600 } /* Literal.Number.Oct */ 47 | .sb { color: #CC3300 } /* Literal.String.Backtick */ 48 | .sc { color: #CC3300 } /* Literal.String.Char */ 49 | .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 50 | .s2 { color: #CC3300 } /* Literal.String.Double */ 51 | .se { color: #CC3300; } /* Literal.String.Escape */ 52 | .sh { color: #CC3300 } /* Literal.String.Heredoc */ 53 | .si { color: #AA0000 } /* Literal.String.Interpol */ 54 | .sx { color: #CC3300 } /* Literal.String.Other */ 55 | .sr { color: #33AAAA } /* Literal.String.Regex */ 56 | .s1 { color: #CC3300 } /* Literal.String.Single */ 57 | .ss { color: #FFCC33 } /* Literal.String.Symbol */ 58 | .bp { color: #336666 } /* Name.Builtin.Pseudo */ 59 | .vc { color: #003333 } /* Name.Variable.Class */ 60 | .vg { color: #003333 } /* Name.Variable.Global */ 61 | .vi { color: #003333 } /* Name.Variable.Instance */ 62 | .il { color: #FF6600 } /* Literal.Number.Integer.Long */ 63 | 64 | .css .o, 65 | .css .o + .nt, 66 | .css .nt + .nt { color: #999; } 67 | -------------------------------------------------------------------------------- /less/input-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Input groups 3 | // -------------------------------------------------- 4 | 5 | // Base styles 6 | // ------------------------- 7 | .input-group { 8 | position: relative; // For dropdowns 9 | display: table; 10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table 11 | 12 | // Undo padding and float of grid classes 13 | &[class*="col-"] { 14 | float: none; 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | 19 | .form-control { 20 | // Ensure that the input is always above the *appended* addon button for 21 | // proper border colors. 22 | position: relative; 23 | z-index: 2; 24 | 25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on 26 | // select elements in input groups. To fix it, we float the input. Details: 27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 28 | float: left; 29 | 30 | width: 100%; 31 | margin-bottom: 0; 32 | } 33 | } 34 | 35 | // Sizing options 36 | // 37 | // Remix the default form control sizing classes into new ones for easier 38 | // manipulation. 39 | 40 | .input-group-lg > .form-control, 41 | .input-group-lg > .input-group-addon, 42 | .input-group-lg > .input-group-btn > .btn { .input-lg(); } 43 | .input-group-sm > .form-control, 44 | .input-group-sm > .input-group-addon, 45 | .input-group-sm > .input-group-btn > .btn { .input-sm(); } 46 | 47 | 48 | // Display as table-cell 49 | // ------------------------- 50 | .input-group-addon, 51 | .input-group-btn, 52 | .input-group .form-control { 53 | display: table-cell; 54 | 55 | &:not(:first-child):not(:last-child) { 56 | border-radius: 0; 57 | } 58 | } 59 | // Addon and addon wrapper for buttons 60 | .input-group-addon, 61 | .input-group-btn { 62 | width: 1%; 63 | white-space: nowrap; 64 | vertical-align: middle; // Match the inputs 65 | } 66 | 67 | // Text input groups 68 | // ------------------------- 69 | .input-group-addon { 70 | padding: @padding-base-vertical @padding-base-horizontal (@padding-base-vertical - 2) @padding-base-horizontal; 71 | font-size: @font-size-base; 72 | font-weight: normal; 73 | line-height: 1; 74 | color: @input-color; 75 | text-align: center; 76 | background-color: @input-group-addon-bg; 77 | border: 1px solid @input-group-addon-border-color; 78 | border-radius: @border-radius-base; 79 | 80 | // Sizing 81 | &.input-sm { 82 | padding: @padding-small-vertical @padding-small-horizontal; 83 | font-size: @font-size-small; 84 | border-radius: @border-radius-small; 85 | } 86 | &.input-lg { 87 | padding: @padding-large-vertical @padding-large-horizontal; 88 | font-size: @font-size-large; 89 | border-radius: @border-radius-large; 90 | } 91 | 92 | // Nuke default margins from checkboxes and radios to vertically center within. 93 | input[type="radio"], 94 | input[type="checkbox"] { 95 | margin-top: 0; 96 | } 97 | } 98 | 99 | // Reset rounded corners 100 | .input-group .form-control:first-child, 101 | .input-group-addon:first-child, 102 | .input-group-btn:first-child > .btn, 103 | .input-group-btn:first-child > .btn-group > .btn, 104 | .input-group-btn:first-child > .dropdown-toggle, 105 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), 106 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { 107 | .border-right-radius(0); 108 | } 109 | .input-group-addon:first-child { 110 | border-right: 0; 111 | } 112 | .input-group .form-control:last-child, 113 | .input-group-addon:last-child, 114 | .input-group-btn:last-child > .btn, 115 | .input-group-btn:last-child > .btn-group > .btn, 116 | .input-group-btn:last-child > .dropdown-toggle, 117 | .input-group-btn:first-child > .btn:not(:first-child), 118 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { 119 | .border-left-radius(0); 120 | } 121 | .input-group-addon:last-child { 122 | border-left: 0; 123 | } 124 | 125 | // Button input groups 126 | // ------------------------- 127 | .input-group-btn { 128 | position: relative; 129 | // Jankily prevent input button groups from wrapping with `white-space` and 130 | // `font-size` in combination with `inline-block` on buttons. 131 | font-size: 0; 132 | white-space: nowrap; 133 | 134 | // Negative margin for spacing, position for bringing hovered/focused/actived 135 | // element above the siblings. 136 | > .btn { 137 | position: relative; 138 | // Jankily prevent input button groups from wrapping 139 | + .btn { 140 | margin-left: -4px; 141 | } 142 | // Bring the "active" button to the front 143 | &:hover, 144 | &:focus, 145 | &:active { 146 | z-index: 2; 147 | } 148 | } 149 | 150 | // Negative margin to only have a 1px border between the two 151 | &:first-child { 152 | > .btn, 153 | > .btn-group { 154 | margin-right: -1px; 155 | } 156 | } 157 | &:last-child { 158 | > .btn, 159 | > .btn-group { 160 | margin-left: -1px; 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /less/navs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Navs 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // -------------------------------------------------- 8 | 9 | .nav { 10 | margin-bottom: 0; 11 | padding-left: 0; // Override default ul/ol 12 | list-style: none; 13 | &:extend(.clearfix all); 14 | 15 | > li { 16 | position: relative; 17 | display: block; 18 | 19 | > a { 20 | position: relative; 21 | display: block; 22 | padding: @nav-link-padding; 23 | &:hover, 24 | &:focus { 25 | text-decoration: none; 26 | background-color: @nav-link-hover-bg; 27 | } 28 | } 29 | 30 | // Disabled state sets text to gray and nukes hover/tab effects 31 | &.disabled > a { 32 | color: @nav-disabled-link-color; 33 | 34 | &:hover, 35 | &:focus { 36 | color: @nav-disabled-link-hover-color; 37 | text-decoration: none; 38 | background-color: transparent; 39 | cursor: not-allowed; 40 | } 41 | } 42 | } 43 | 44 | // Open dropdowns 45 | .open > a { 46 | &, 47 | &:hover, 48 | &:focus { 49 | background-color: @nav-link-hover-bg; 50 | border-color: @link-color; 51 | } 52 | } 53 | 54 | // Nav dividers (deprecated with v3.0.1) 55 | // 56 | // This should have been removed in v3 with the dropping of `.nav-list`, but 57 | // we missed it. We don't currently support this anywhere, but in the interest 58 | // of maintaining backward compatibility in case you use it, it's deprecated. 59 | .nav-divider { 60 | .nav-divider(); 61 | } 62 | 63 | // Prevent IE8 from misplacing imgs 64 | // 65 | // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 66 | > li > a > img { 67 | max-width: none; 68 | } 69 | } 70 | 71 | 72 | // Tabs 73 | // ------------------------- 74 | 75 | // Give the tabs something to sit on 76 | .nav-tabs { 77 | border-bottom: 1px solid @nav-tabs-border-color; 78 | > li { 79 | float: left; 80 | // Make the list-items overlay the bottom border 81 | margin-bottom: -1px; 82 | 83 | // Actual tabs (as links) 84 | > a { 85 | color: @nav-tabs-active-link-hover-color; 86 | margin-right: 2px; 87 | line-height: @line-height-base; 88 | border: 1px solid transparent; 89 | border-radius: @border-radius-base @border-radius-base 0 0; 90 | &:hover { 91 | border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; 92 | } 93 | } 94 | 95 | // Active state, and its :hover to override normal :hover 96 | &.active > a { 97 | &, 98 | &:hover, 99 | &:focus { 100 | color: @nav-tabs-active-link-hover-color; 101 | background-color: @nav-tabs-active-link-hover-bg; 102 | border: 1px solid @nav-tabs-active-link-hover-border-color; 103 | border-bottom-color: transparent; 104 | cursor: default; 105 | } 106 | } 107 | } 108 | // pulling this in mainly for less shorthand 109 | &.nav-justified { 110 | .nav-justified(); 111 | .nav-tabs-justified(); 112 | } 113 | } 114 | 115 | 116 | // Pills 117 | // ------------------------- 118 | .nav-pills { 119 | > li { 120 | float: left; 121 | 122 | // Links rendered as pills 123 | > a { 124 | border-radius: 5px; 125 | } 126 | + li { 127 | margin-left: 2px; 128 | } 129 | 130 | // Active state 131 | &.active > a { 132 | &, 133 | &:hover, 134 | &:focus { 135 | color: @nav-pills-active-link-hover-color; 136 | background-color: @nav-pills-active-link-hover-bg; 137 | } 138 | } 139 | } 140 | } 141 | 142 | 143 | // Stacked pills 144 | .nav-stacked { 145 | > li { 146 | float: none; 147 | + li { 148 | margin-top: 2px; 149 | margin-left: 0; // no need for this gap between nav items 150 | } 151 | } 152 | } 153 | 154 | 155 | // Nav variations 156 | // -------------------------------------------------- 157 | 158 | // Justified nav links 159 | // ------------------------- 160 | 161 | .nav-justified { 162 | width: 100%; 163 | 164 | > li { 165 | float: none; 166 | > a { 167 | text-align: center; 168 | margin-bottom: 5px; 169 | } 170 | } 171 | 172 | > .dropdown .dropdown-menu { 173 | top: auto; 174 | left: auto; 175 | } 176 | 177 | @media (min-width: @screen-sm-min) { 178 | > li { 179 | display: table-cell; 180 | width: 1%; 181 | > a { 182 | margin-bottom: 0; 183 | } 184 | } 185 | } 186 | } 187 | 188 | // Move borders to anchors instead of bottom of list 189 | // 190 | // Mixin for adding on top the shared `.nav-justified` styles for our tabs 191 | .nav-tabs-justified { 192 | border-bottom: 0; 193 | 194 | > li > a { 195 | // Override margin from .nav-tabs 196 | margin-right: 0; 197 | border-radius: @border-radius-base; 198 | } 199 | 200 | > .active > a, 201 | > .active > a:hover, 202 | > .active > a:focus { 203 | border: 1px solid @nav-tabs-justified-link-border-color; 204 | } 205 | 206 | @media (min-width: @screen-sm-min) { 207 | > li > a { 208 | border-bottom: 1px solid @nav-tabs-justified-link-border-color; 209 | border-radius: @border-radius-base @border-radius-base 0 0; 210 | } 211 | > .active > a, 212 | > .active > a:hover, 213 | > .active > a:focus { 214 | border-bottom-color: @nav-tabs-justified-active-link-border-color; 215 | } 216 | } 217 | } 218 | 219 | 220 | // Tabbable tabs 221 | // ------------------------- 222 | 223 | // Hide tabbable panes to start, show them when `.active` 224 | .tab-content { 225 | > .tab-pane { 226 | display: none; 227 | } 228 | > .active { 229 | display: block; 230 | } 231 | } 232 | 233 | 234 | // Dropdowns 235 | // ------------------------- 236 | 237 | // Specific dropdowns 238 | .nav-tabs .dropdown-menu { 239 | // make dropdown border overlap tab border 240 | margin-top: -1px; 241 | // Remove the top rounded corners here since there is a hard edge above the menu 242 | .border-top-radius(0); 243 | } 244 | -------------------------------------------------------------------------------- /less/panels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Panels 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .panel { 8 | margin-bottom: @line-height-computed; 9 | background-color: @panel-bg; 10 | border: 1px solid transparent; 11 | border-radius: @panel-border-radius; 12 | .box-shadow(0 1px 1px rgba(0,0,0,.05)); 13 | } 14 | 15 | // Panel contents 16 | .panel-body { 17 | padding: @panel-body-padding; 18 | &:extend(.clearfix all); 19 | } 20 | 21 | // Optional heading 22 | .panel-heading { 23 | padding: 10px 15px; 24 | border-bottom: 1px solid transparent; 25 | .border-top-radius((@panel-border-radius - 1)); 26 | 27 | > .dropdown .dropdown-toggle { 28 | color: inherit; 29 | } 30 | } 31 | 32 | // Within heading, strip any `h*` tag of its default margins for spacing. 33 | .panel-title { 34 | margin-top: 0; 35 | margin-bottom: 0; 36 | font-size: ceil((@font-size-base * 1.125)); 37 | color: inherit; 38 | 39 | > a { 40 | color: inherit; 41 | } 42 | } 43 | 44 | // Optional footer (stays gray in every modifier class) 45 | .panel-footer { 46 | padding: 10px 15px; 47 | background-color: @panel-footer-bg; 48 | border-top: 1px solid @panel-inner-border; 49 | .border-bottom-radius((@panel-border-radius - 1)); 50 | } 51 | 52 | 53 | // List groups in panels 54 | // 55 | // By default, space out list group content from panel headings to account for 56 | // any kind of custom content between the two. 57 | 58 | .panel { 59 | > .list-group { 60 | margin-bottom: 0; 61 | 62 | .list-group-item { 63 | border-width: 1px 0; 64 | border-radius: 0; 65 | } 66 | 67 | // Add border top radius for first one 68 | &:first-child { 69 | .list-group-item:first-child { 70 | border-top: 0; 71 | .border-top-radius((@panel-border-radius - 1)); 72 | } 73 | } 74 | // Add border bottom radius for last one 75 | &:last-child { 76 | .list-group-item:last-child { 77 | border-bottom: 0; 78 | .border-bottom-radius((@panel-border-radius - 1)); 79 | } 80 | } 81 | } 82 | } 83 | // Collapse space between when there's no additional content. 84 | .panel-heading + .list-group { 85 | .list-group-item:first-child { 86 | border-top-width: 0; 87 | } 88 | } 89 | 90 | 91 | // Tables in panels 92 | // 93 | // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and 94 | // watch it go full width. 95 | 96 | .panel { 97 | > .table, 98 | > .table-responsive > .table { 99 | margin-bottom: 0; 100 | } 101 | // Add border top radius for first one 102 | > .table:first-child, 103 | > .table-responsive:first-child > .table:first-child { 104 | .border-top-radius((@panel-border-radius - 1)); 105 | 106 | > thead:first-child, 107 | > tbody:first-child { 108 | > tr:first-child { 109 | td:first-child, 110 | th:first-child { 111 | border-top-left-radius: (@panel-border-radius - 1); 112 | } 113 | td:last-child, 114 | th:last-child { 115 | border-top-right-radius: (@panel-border-radius - 1); 116 | } 117 | } 118 | } 119 | } 120 | // Add border bottom radius for last one 121 | > .table:last-child, 122 | > .table-responsive:last-child > .table:last-child { 123 | .border-bottom-radius((@panel-border-radius - 1)); 124 | 125 | > tbody:last-child, 126 | > tfoot:last-child { 127 | > tr:last-child { 128 | td:first-child, 129 | th:first-child { 130 | border-bottom-left-radius: (@panel-border-radius - 1); 131 | } 132 | td:last-child, 133 | th:last-child { 134 | border-bottom-right-radius: (@panel-border-radius - 1); 135 | } 136 | } 137 | } 138 | } 139 | > .panel-body + .table, 140 | > .panel-body + .table-responsive { 141 | border-top: 1px solid @table-border-color; 142 | } 143 | > .table > tbody:first-child > tr:first-child th, 144 | > .table > tbody:first-child > tr:first-child td { 145 | border-top: 0; 146 | } 147 | > .table-bordered, 148 | > .table-responsive > .table-bordered { 149 | border: 0; 150 | > thead, 151 | > tbody, 152 | > tfoot { 153 | > tr { 154 | > th:first-child, 155 | > td:first-child { 156 | border-left: 0; 157 | } 158 | > th:last-child, 159 | > td:last-child { 160 | border-right: 0; 161 | } 162 | } 163 | } 164 | > thead, 165 | > tbody { 166 | > tr:first-child { 167 | > td, 168 | > th { 169 | border-bottom: 0; 170 | } 171 | } 172 | } 173 | > tbody, 174 | > tfoot { 175 | > tr:last-child { 176 | > td, 177 | > th { 178 | border-bottom: 0; 179 | } 180 | } 181 | } 182 | } 183 | > .table-responsive { 184 | border: 0; 185 | margin-bottom: 0; 186 | } 187 | } 188 | 189 | 190 | // Collapsable panels (aka, accordion) 191 | // 192 | // Wrap a series of panels in `.panel-group` to turn them into an accordion with 193 | // the help of our collapse JavaScript plugin. 194 | 195 | .panel-group { 196 | margin-bottom: @line-height-computed; 197 | 198 | // Tighten up margin so it's only between panels 199 | .panel { 200 | margin-bottom: 0; 201 | border-radius: @panel-border-radius; 202 | overflow: hidden; // crop contents when collapsed 203 | + .panel { 204 | margin-top: 5px; 205 | } 206 | } 207 | 208 | .panel-heading { 209 | border-bottom: 0; 210 | + .panel-collapse .panel-body { 211 | border-top: 1px solid @panel-inner-border; 212 | } 213 | } 214 | .panel-footer { 215 | border-top: 0; 216 | + .panel-collapse .panel-body { 217 | border-bottom: 1px solid @panel-inner-border; 218 | } 219 | } 220 | } 221 | 222 | 223 | // Contextual variations 224 | .panel-default { 225 | .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); 226 | } 227 | .panel-primary { 228 | .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border); 229 | } 230 | .panel-success { 231 | .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border); 232 | } 233 | .panel-info { 234 | .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); 235 | } 236 | .panel-warning { 237 | .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border); 238 | } 239 | .panel-danger { 240 | .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border); 241 | } 242 | .panel-info { 243 | .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); 244 | } 245 | -------------------------------------------------------------------------------- /less/type.less: -------------------------------------------------------------------------------- 1 | // 2 | // Typography 3 | // -------------------------------------------------- 4 | 5 | 6 | // Headings 7 | // ------------------------- 8 | 9 | h1, h2, h3, h4, h5, h6, 10 | .h1, .h2, .h3, .h4, .h5, .h6 { 11 | font-family: @headings-font-family; 12 | font-weight: @headings-font-weight; 13 | line-height: @headings-line-height; 14 | color: @headings-color; 15 | 16 | small, 17 | .small { 18 | font-weight: normal; 19 | line-height: 1; 20 | color: @headings-small-color; 21 | } 22 | } 23 | 24 | h1, .h1, 25 | h2, .h2, 26 | h3, .h3 { 27 | margin-top: @line-height-computed; 28 | margin-bottom: (@line-height-computed / 2); 29 | 30 | small, 31 | .small { 32 | font-size: 65%; 33 | } 34 | } 35 | h4, .h4, 36 | h5, .h5, 37 | h6, .h6 { 38 | margin-top: (@line-height-computed / 2); 39 | margin-bottom: (@line-height-computed / 2); 40 | 41 | small, 42 | .small { 43 | font-size: 75%; 44 | } 45 | } 46 | 47 | h1, .h1 { font-size: @font-size-h1; } 48 | h2, .h2 { font-size: @font-size-h2; } 49 | h3, .h3 { font-size: @font-size-h3; } 50 | h4, .h4 { font-size: @font-size-h4; } 51 | h5, .h5 { font-size: @font-size-h5; } 52 | h6, .h6 { font-size: @font-size-h6; } 53 | 54 | 55 | // Body text 56 | // ------------------------- 57 | 58 | p { 59 | margin: 0 0 (@line-height-computed / 2); 60 | } 61 | 62 | .lead { 63 | margin-bottom: @line-height-computed; 64 | font-size: floor((@font-size-base * 1.15)); 65 | font-weight: 200; 66 | line-height: 1.4; 67 | 68 | @media (min-width: @screen-sm-min) { 69 | font-size: (@font-size-base * 1.5); 70 | } 71 | } 72 | 73 | 74 | // Emphasis & misc 75 | // ------------------------- 76 | 77 | // Ex: 14px base font * 85% = about 12px 78 | small, 79 | .small { font-size: 85%; } 80 | 81 | // Undo browser default styling 82 | cite { font-style: normal; } 83 | 84 | // Alignment 85 | .text-left { text-align: left; } 86 | .text-right { text-align: right; } 87 | .text-center { text-align: center; } 88 | .text-justify { text-align: justify; } 89 | 90 | // Contextual colors 91 | .text-muted { 92 | color: @text-muted; 93 | } 94 | .text-primary { 95 | .text-emphasis-variant(@brand-primary); 96 | } 97 | .text-success { 98 | .text-emphasis-variant(@state-success-text); 99 | } 100 | .text-info { 101 | .text-emphasis-variant(@state-info-text); 102 | } 103 | .text-warning { 104 | .text-emphasis-variant(@state-warning-text); 105 | } 106 | .text-danger { 107 | .text-emphasis-variant(@state-danger-text); 108 | } 109 | 110 | // Contextual backgrounds 111 | // For now we'll leave these alongside the text classes until v4 when we can 112 | // safely shift things around (per SemVer rules). 113 | .bg-primary { 114 | // Given the contrast here, this is the only class to have its color inverted 115 | // automatically. 116 | color: #fff; 117 | .bg-variant(@brand-primary); 118 | } 119 | .bg-success { 120 | .bg-variant(@state-success-bg); 121 | } 122 | .bg-info { 123 | .bg-variant(@state-info-bg); 124 | } 125 | .bg-warning { 126 | .bg-variant(@state-warning-bg); 127 | } 128 | .bg-danger { 129 | .bg-variant(@state-danger-bg); 130 | } 131 | 132 | 133 | // Page header 134 | // ------------------------- 135 | 136 | .page-header { 137 | padding-bottom: ((@line-height-computed / 2) - 1); 138 | margin: (@line-height-computed * 2) 0 @line-height-computed; 139 | border-bottom: 1px solid @page-header-border-color; 140 | } 141 | 142 | 143 | // Lists 144 | // -------------------------------------------------- 145 | 146 | // Unordered and Ordered lists 147 | ul, 148 | ol { 149 | margin-top: 0; 150 | margin-bottom: (@line-height-computed / 2); 151 | ul, 152 | ol{ 153 | margin-bottom: 0; 154 | } 155 | } 156 | 157 | // List options 158 | 159 | // Unstyled keeps list items block level, just removes default browser padding and list-style 160 | .list-unstyled { 161 | padding-left: 0; 162 | list-style: none; 163 | } 164 | 165 | // Inline turns list items into inline-block 166 | .list-inline { 167 | .list-unstyled(); 168 | margin-left: -5px; 169 | 170 | > li { 171 | display: inline-block; 172 | padding-left: 5px; 173 | padding-right: 5px; 174 | } 175 | } 176 | 177 | // Description Lists 178 | dl { 179 | margin-top: 0; // Remove browser default 180 | margin-bottom: @line-height-computed; 181 | } 182 | dt, 183 | dd { 184 | line-height: @line-height-base; 185 | } 186 | dt { 187 | font-weight: bold; 188 | } 189 | dd { 190 | margin-left: 0; // Undo browser default 191 | } 192 | 193 | // Horizontal description lists 194 | // 195 | // Defaults to being stacked without any of the below styles applied, until the 196 | // grid breakpoint is reached (default of ~768px). 197 | 198 | @media (min-width: @grid-float-breakpoint) { 199 | .dl-horizontal { 200 | dt { 201 | float: left; 202 | width: (@component-offset-horizontal - 20); 203 | clear: left; 204 | text-align: right; 205 | .text-overflow(); 206 | } 207 | dd { 208 | margin-left: @component-offset-horizontal; 209 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present 210 | } 211 | } 212 | } 213 | 214 | // MISC 215 | // ---- 216 | 217 | // Abbreviations and acronyms 218 | abbr[title], 219 | // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257 220 | abbr[data-original-title] { 221 | cursor: help; 222 | border-bottom: 1px dotted @abbr-border-color; 223 | } 224 | .initialism { 225 | font-size: 90%; 226 | text-transform: uppercase; 227 | } 228 | 229 | // Blockquotes 230 | blockquote { 231 | padding: (@line-height-computed / 2) @line-height-computed; 232 | margin: 0 0 @line-height-computed; 233 | font-size: @blockquote-font-size; 234 | border-left: 5px solid @blockquote-border-color; 235 | 236 | p, 237 | ul, 238 | ol { 239 | &:last-child { 240 | margin-bottom: 0; 241 | } 242 | } 243 | 244 | // Note: Deprecated small and .small as of v3.1.0 245 | // Context: https://github.com/twbs/bootstrap/issues/11660 246 | footer, 247 | small, 248 | .small { 249 | display: block; 250 | font-size: 80%; // back to default font-size 251 | line-height: @line-height-base; 252 | color: @blockquote-small-color; 253 | 254 | &:before { 255 | content: '\2014 \00A0'; // em dash, nbsp 256 | } 257 | } 258 | } 259 | 260 | // Opposite alignment of blockquote 261 | // 262 | // Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0. 263 | .blockquote-reverse, 264 | blockquote.pull-right { 265 | padding-right: 15px; 266 | padding-left: 0; 267 | border-right: 5px solid @blockquote-border-color; 268 | border-left: 0; 269 | text-align: right; 270 | 271 | // Account for citation 272 | footer, 273 | small, 274 | .small { 275 | &:before { content: ''; } 276 | &:after { 277 | content: '\00A0 \2014'; // nbsp, em dash 278 | } 279 | } 280 | } 281 | 282 | // Quotes 283 | blockquote:before, 284 | blockquote:after { 285 | content: ""; 286 | } 287 | 288 | // Addresses 289 | address { 290 | margin-bottom: @line-height-computed; 291 | font-style: normal; 292 | line-height: @line-height-base; 293 | } 294 | -------------------------------------------------------------------------------- /less/button-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Button groups 3 | // -------------------------------------------------- 4 | 5 | // Button carets 6 | // 7 | // Match the button text color to the arrow/caret for indicating dropdown-ness. 8 | 9 | .caret { 10 | .btn-default & { 11 | border-top-color: @btn-default-color; 12 | } 13 | //.btn-primary &, 14 | //.btn-success &, 15 | //.btn-warning &, 16 | //.btn-danger &, 17 | //.btn-info & { 18 | // border-top-color: #fff; 19 | //} 20 | .btn-primary &, 21 | .btn-success &{ 22 | border-top-color: #fff; 23 | } 24 | .btn-warning &{ 25 | border-top-color: #f28722; 26 | } 27 | .btn-danger &{ 28 | border-top-color: #900; 29 | } 30 | .btn-danger:hover &{ 31 | border-top-color: #fff; 32 | } 33 | .btn-danger:active &{ 34 | border-top-color: #fff; 35 | } 36 | .btn-danger:focus &{ 37 | border-top-color: #fff; 38 | } 39 | .btn-info &{ 40 | border-top-color: #2a567d; 41 | } 42 | } 43 | .dropup { 44 | & .btn-default .caret { 45 | border-bottom-color: @btn-default-color; 46 | } 47 | .btn-primary, 48 | .btn-success 49 | { 50 | .caret { 51 | border-bottom-color: #fff; 52 | } 53 | } 54 | .btn-warning{ 55 | .caret{ 56 | border-bottom-color: #f28722; 57 | } 58 | } 59 | .btn-danger{ 60 | .caret{ 61 | border-bottom-color: #900; 62 | } 63 | } 64 | .btn-info{ 65 | .caret{ 66 | border-bottom-color: #2a567d; 67 | } 68 | } 69 | } 70 | 71 | // Make the div behave like a button 72 | .btn-group, 73 | .btn-group-vertical { 74 | position: relative; 75 | display: inline-block; 76 | vertical-align: middle; // match .btn alignment given font-size hack above 77 | > .btn { 78 | position: relative; 79 | float: left; 80 | // Bring the "active" button to the front 81 | &:hover, 82 | &:focus, 83 | &:active, 84 | &.active { 85 | z-index: 2; 86 | } 87 | &:focus { 88 | // Remove focus outline when dropdown JS adds it after closing the menu 89 | outline: none; 90 | } 91 | } 92 | } 93 | 94 | // Prevent double borders when buttons are next to each other 95 | .btn-group { 96 | .btn + .btn, 97 | .btn + .btn-group, 98 | .btn-group + .btn, 99 | .btn-group + .btn-group { 100 | margin-left: -1px; 101 | } 102 | } 103 | 104 | // Optional: Group multiple button groups together for a toolbar 105 | .btn-toolbar { 106 | margin-left: -5px; // Offset the first child's margin 107 | &:extend(.clearfix all); 108 | 109 | .btn-group, 110 | .input-group { 111 | float: left; 112 | } 113 | > .btn, 114 | > .btn-group, 115 | > .input-group { 116 | margin-left: 5px; 117 | } 118 | } 119 | 120 | .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { 121 | border-radius: 0; 122 | } 123 | 124 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match 125 | .btn-group > .btn:first-child { 126 | margin-left: 0; 127 | &:not(:last-child):not(.dropdown-toggle) { 128 | .border-right-radius(0); 129 | } 130 | } 131 | // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it 132 | .btn-group > .btn:last-child:not(:first-child), 133 | .btn-group > .dropdown-toggle:not(:first-child) { 134 | .border-left-radius(0); 135 | } 136 | 137 | // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) 138 | .btn-group > .btn-group { 139 | float: left; 140 | } 141 | .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { 142 | border-radius: 0; 143 | } 144 | .btn-group > .btn-group:first-child { 145 | > .btn:last-child, 146 | > .dropdown-toggle { 147 | .border-right-radius(0); 148 | } 149 | } 150 | .btn-group > .btn-group:last-child > .btn:first-child { 151 | .border-left-radius(0); 152 | } 153 | 154 | // On active and open, don't show outline 155 | .btn-group .dropdown-toggle:active, 156 | .btn-group.open .dropdown-toggle { 157 | outline: 0; 158 | } 159 | 160 | 161 | // Sizing 162 | // 163 | // Remix the default button sizing classes into new ones for easier manipulation. 164 | 165 | .btn-group-xs > .btn { &:extend(.btn-xs); } 166 | .btn-group-sm > .btn { &:extend(.btn-sm); } 167 | .btn-group-lg > .btn { &:extend(.btn-lg); } 168 | 169 | 170 | // Split button dropdowns 171 | // ---------------------- 172 | 173 | // Give the line between buttons some depth 174 | .btn-group > .btn + .dropdown-toggle { 175 | padding-left: 8px; 176 | padding-right: 8px; 177 | } 178 | .btn-group > .btn-lg + .dropdown-toggle { 179 | padding-left: 12px; 180 | padding-right: 12px; 181 | } 182 | 183 | // The clickable button for toggling the menu 184 | // Remove the gradient and set the same inset shadow as the :active state 185 | .btn-group.open .dropdown-toggle { 186 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 187 | 188 | // Show no shadow for `.btn-link` since it has no other button styles. 189 | &.btn-link { 190 | .box-shadow(none); 191 | } 192 | } 193 | 194 | 195 | // Reposition the caret 196 | .btn .caret { 197 | margin-left: 0; 198 | } 199 | // Carets in other button sizes 200 | .btn-lg .caret { 201 | border-width: @caret-width-large @caret-width-large 0; 202 | border-bottom-width: 0; 203 | } 204 | // Upside down carets for .dropup 205 | .dropup .btn-lg .caret { 206 | border-width: 0 @caret-width-large @caret-width-large; 207 | } 208 | 209 | 210 | // Vertical button groups 211 | // ---------------------- 212 | 213 | .btn-group-vertical { 214 | > .btn, 215 | > .btn-group, 216 | > .btn-group > .btn { 217 | display: block; 218 | float: none; 219 | width: 100%; 220 | max-width: 100%; 221 | } 222 | 223 | // Clear floats so dropdown menus can be properly placed 224 | > .btn-group { 225 | &:extend(.clearfix all); 226 | > .btn { 227 | float: none; 228 | } 229 | } 230 | 231 | > .btn + .btn, 232 | > .btn + .btn-group, 233 | > .btn-group + .btn, 234 | > .btn-group + .btn-group { 235 | margin-top: -1px; 236 | margin-left: 0; 237 | } 238 | } 239 | 240 | .btn-group-vertical > .btn { 241 | &:not(:first-child):not(:last-child) { 242 | border-radius: 0; 243 | } 244 | &:first-child:not(:last-child) { 245 | border-top-right-radius: @border-radius-base; 246 | .border-bottom-radius(0); 247 | } 248 | &:last-child:not(:first-child) { 249 | border-bottom-left-radius: @border-radius-base; 250 | .border-top-radius(0); 251 | } 252 | } 253 | .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { 254 | border-radius: 0; 255 | } 256 | .btn-group-vertical > .btn-group:first-child:not(:last-child) { 257 | > .btn:last-child, 258 | > .dropdown-toggle { 259 | .border-bottom-radius(0); 260 | } 261 | } 262 | .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { 263 | .border-top-radius(0); 264 | } 265 | 266 | 267 | 268 | // Justified button groups 269 | // ---------------------- 270 | 271 | .btn-group-justified { 272 | display: table; 273 | width: 100%; 274 | table-layout: fixed; 275 | border-collapse: separate; 276 | > .btn, 277 | > .btn-group { 278 | float: none; 279 | display: table-cell; 280 | width: 1%; 281 | } 282 | > .btn-group .btn { 283 | width: 100%; 284 | } 285 | } 286 | 287 | 288 | // Checkbox and radio options 289 | [data-toggle="buttons"] > .btn > input[type="radio"], 290 | [data-toggle="buttons"] > .btn > input[type="checkbox"] { 291 | display: none; 292 | } 293 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- /examples/docs/js/customizer.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2013 Twitter, Inc. 3 | * 4 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 5 | * details, see http://creativecommons.org/licenses/by/3.0/. 6 | */ 7 | 8 | 9 | window.onload = function () { // wait for load in a dumb way because B-0 10 | var cw = '/*!\n * Bootstrap v3.0.3\n *\n * Copyright 2013 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */\n\n' 11 | 12 | function showError(msg, err) { 13 | $('
\ 14 |
\ 15 | ×\ 16 |

' + msg + '

' + 17 | (err.extract ? '
' + err.extract.join('\n') + '
' : '') + '\ 18 |
\ 19 |
').appendTo('body').alert() 20 | throw err 21 | } 22 | 23 | function showCallout(msg, showUpTop) { 24 | var callout = $('
\ 25 |

Attention!

\ 26 |

' + msg + '

\ 27 |
') 28 | 29 | if (showUpTop) { 30 | callout.appendTo('.bs-docs-container') 31 | } else { 32 | callout.insertAfter('.bs-customize-download') 33 | } 34 | } 35 | 36 | function getQueryParam(key) { 37 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars 38 | var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)")); 39 | return match && decodeURIComponent(match[1].replace(/\+/g, " ")); 40 | } 41 | 42 | function createGist(configJson) { 43 | var data = { 44 | "description": "Bootstrap Customizer Config", 45 | "public": true, 46 | "files": { 47 | "config.json": { 48 | "content": configJson 49 | } 50 | } 51 | } 52 | $.ajax({ 53 | url: 'https://api.github.com/gists', 54 | type: 'POST', 55 | dataType: 'json', 56 | data: JSON.stringify(data) 57 | }) 58 | .success(function(result) { 59 | var origin = window.location.protocol + "//" + window.location.host 60 | history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id) 61 | }) 62 | .error(function(err) { 63 | showError('Ruh roh! Could not save gist file, configuration not saved.', err) 64 | }) 65 | } 66 | 67 | function getCustomizerData() { 68 | var vars = {} 69 | 70 | $('#less-variables-section input') 71 | .each(function () { 72 | $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) 73 | }) 74 | 75 | var data = { 76 | vars: vars, 77 | css: $('#less-section input:checked') .map(function () { return this.value }).toArray(), 78 | js: $('#plugin-section input:checked').map(function () { return this.value }).toArray() 79 | } 80 | 81 | if ($.isEmptyObject(data.vars) && !data.css.length && !data.js.length) return 82 | 83 | return data 84 | } 85 | 86 | function parseUrl() { 87 | var id = getQueryParam('id') 88 | 89 | if (!id) return 90 | 91 | $.ajax({ 92 | url: 'https://api.github.com/gists/' + id, 93 | type: 'GET', 94 | dataType: 'json' 95 | }) 96 | .success(function(result) { 97 | var data = JSON.parse(result.files['config.json'].content) 98 | if (data.js) { 99 | $('#plugin-section input').each(function () { 100 | $(this).prop('checked', ~$.inArray(this.value, data.js)) 101 | }) 102 | } 103 | if (data.css) { 104 | $('#less-section input').each(function () { 105 | $(this).prop('checked', ~$.inArray(this.value, data.css)) 106 | }) 107 | } 108 | if (data.vars) { 109 | for (var i in data.vars) { 110 | $('input[data-var="' + i + '"]').val(data.vars[i]) 111 | } 112 | } 113 | }) 114 | .error(function(err) { 115 | showError('Error fetching bootstrap config file', err) 116 | }) 117 | } 118 | 119 | function generateZip(css, js, fonts, config, complete) { 120 | if (!css && !js) return showError('Ruh roh! No Bootstrap files selected.', new Error('no Bootstrap')) 121 | 122 | var zip = new JSZip() 123 | 124 | if (css) { 125 | var cssFolder = zip.folder('css') 126 | for (var fileName in css) { 127 | cssFolder.file(fileName, css[fileName]) 128 | } 129 | } 130 | 131 | if (js) { 132 | var jsFolder = zip.folder('js') 133 | for (var fileName in js) { 134 | jsFolder.file(fileName, js[fileName]) 135 | } 136 | } 137 | 138 | if (fonts) { 139 | var fontsFolder = zip.folder('fonts') 140 | for (var fileName in fonts) { 141 | fontsFolder.file(fileName, fonts[fileName], {base64: true}) 142 | } 143 | } 144 | 145 | if (config) { 146 | zip.file('config.json', config) 147 | } 148 | 149 | var content = zip.generate({type:"blob"}) 150 | 151 | complete(content) 152 | } 153 | 154 | function generateCustomCSS(vars) { 155 | var result = '' 156 | 157 | for (var key in vars) { 158 | result += key + ': ' + vars[key] + ';\n' 159 | } 160 | 161 | return result + '\n\n' 162 | } 163 | 164 | function generateFonts() { 165 | var glyphicons = $('#less-section [value="glyphicons.less"]:checked') 166 | if (glyphicons.length) { 167 | return __fonts 168 | } 169 | } 170 | 171 | // Returns an Array of @import'd filenames from 'bootstrap.less' in the order 172 | // in which they appear in the file. 173 | function bootstrapLessFilenames() { 174 | var IMPORT_REGEX = /^@import \"(.*?)\";$/ 175 | var bootstrapLessLines = __less['bootstrap.less'].split('\n') 176 | 177 | for (var i = 0, imports = []; i < bootstrapLessLines.length; i++) { 178 | var match = IMPORT_REGEX.exec(bootstrapLessLines[i]) 179 | if (match) imports.push(match[1]) 180 | } 181 | 182 | return imports 183 | } 184 | 185 | function generateCSS() { 186 | var oneChecked = false 187 | var lessFileIncludes = {} 188 | $('#less-section input').each(function() { 189 | var $this = $(this) 190 | var checked = $this.is(':checked') 191 | lessFileIncludes[$this.val()] = checked 192 | 193 | oneChecked = oneChecked || checked 194 | }) 195 | 196 | if (!oneChecked) return false 197 | 198 | var result = {} 199 | var vars = {} 200 | var css = '' 201 | 202 | $('#less-variables-section input') 203 | .each(function () { 204 | $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) 205 | }) 206 | 207 | $.each(bootstrapLessFilenames(), function(index, filename) { 208 | var fileInclude = lessFileIncludes[filename] 209 | 210 | // Files not explicitly unchecked are compiled into the final stylesheet. 211 | // Core stylesheets like 'normalize.less' are not included in the form 212 | // since disabling them would wreck everything, and so their 'fileInclude' 213 | // will be 'undefined'. 214 | if (fileInclude || (fileInclude == null)) css += __less[filename] 215 | 216 | // Custom variables are added after Bootstrap variables so the custom 217 | // ones take precedence. 218 | if (('variables.less' === filename) && vars) css += generateCustomCSS(vars) 219 | }) 220 | 221 | css = css.replace(/@import[^\n]*/gi, '') //strip any imports 222 | 223 | try { 224 | var parser = new less.Parser({ 225 | paths: ['variables.less', 'mixins.less'] 226 | , optimization: 0 227 | , filename: 'bootstrap.css' 228 | }).parse(css, function (err, tree) { 229 | if (err) { 230 | return showError('Ruh roh! Could not parse less files.', err) 231 | } 232 | result = { 233 | 'bootstrap.css' : cw + tree.toCSS(), 234 | 'bootstrap.min.css' : cw + tree.toCSS({ compress: true }).replace(/\n/g, '') // FIXME: remove newline hack once less.js upgraded to v1.4 235 | } 236 | }) 237 | } catch (err) { 238 | return showError('Ruh roh! Could not parse less files.', err) 239 | } 240 | 241 | return result 242 | } 243 | 244 | function generateJavascript() { 245 | var $checked = $('#plugin-section input:checked') 246 | if (!$checked.length) return false 247 | 248 | var js = $checked 249 | .map(function () { return __js[this.value] }) 250 | .toArray() 251 | .join('\n') 252 | 253 | return { 254 | 'bootstrap.js': js, 255 | 'bootstrap.min.js': cw + uglify(js) 256 | } 257 | } 258 | 259 | var inputsComponent = $('#less-section input') 260 | var inputsPlugin = $('#plugin-section input') 261 | var inputsVariables = $('#less-variables-section input') 262 | 263 | $('#less-section .toggle').on('click', function (e) { 264 | e.preventDefault() 265 | inputsComponent.prop('checked', !inputsComponent.is(':checked')) 266 | }) 267 | 268 | $('#plugin-section .toggle').on('click', function (e) { 269 | e.preventDefault() 270 | inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) 271 | }) 272 | 273 | $('#less-variables-section .toggle').on('click', function (e) { 274 | e.preventDefault() 275 | inputsVariables.val('') 276 | }) 277 | 278 | $('[data-dependencies]').on('click', function () { 279 | if (!$(this).is(':checked')) return 280 | var dependencies = this.getAttribute('data-dependencies') 281 | if (!dependencies) return 282 | dependencies = dependencies.split(',') 283 | for (var i = 0; i < dependencies.length; i++) { 284 | var dependency = $('[value="' + dependencies[i] + '"]') 285 | dependency && dependency.prop('checked', true) 286 | } 287 | }) 288 | 289 | $('[data-dependents]').on('click', function () { 290 | if ($(this).is(':checked')) return 291 | var dependents = this.getAttribute('data-dependents') 292 | if (!dependents) return 293 | dependents = dependents.split(',') 294 | for (var i = 0; i < dependents.length; i++) { 295 | var dependent = $('[value="' + dependents[i] + '"]') 296 | dependent && dependent.prop('checked', false) 297 | } 298 | }) 299 | 300 | var $compileBtn = $('#btn-compile') 301 | var $downloadBtn = $('#btn-download') 302 | 303 | $compileBtn.on('click', function (e) { 304 | var configData = getCustomizerData() 305 | var configJson = JSON.stringify(configData, null, 2) 306 | 307 | e.preventDefault() 308 | 309 | $compileBtn.attr('disabled', 'disabled') 310 | 311 | generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) { 312 | $compileBtn.removeAttr('disabled') 313 | saveAs(blob, "bootstrap.zip") 314 | createGist(configJson) 315 | }) 316 | }) 317 | 318 | // browser support alerts 319 | if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) { 320 | showCallout("Looks like you're using safari, which sadly doesn't have the best support\ 321 | for HTML5 blobs. Because of this your file will be downloaded with the name \"untitled\".\ 322 | However, if you check your downloads folder, just rename this \"untitled\" file\ 323 | to \"bootstrap.zip\" and you should be good to go!") 324 | } else if (!window.URL && !window.webkitURL) { 325 | $('.bs-docs-section, .bs-sidebar').css('display', 'none') 326 | 327 | showCallout("Looks like your current browser doesn't support the Bootstrap Customizer. Please take a second\ 328 | to upgrade to a more modern browser.", true) 329 | } 330 | 331 | parseUrl() 332 | } 333 | -------------------------------------------------------------------------------- /less/buttons.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | .btn { 10 | display: inline-block; 11 | margin-bottom: 0; // For input.btn 12 | font-weight: @btn-font-weight; 13 | text-align: center; 14 | vertical-align: middle; 15 | cursor: pointer; 16 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 17 | border: 1px solid transparent; 18 | border-radius: @border-radius-base; 19 | white-space: nowrap; 20 | .user-select(none); 21 | 22 | &, 23 | &:active, 24 | &.active { 25 | &:focus { 26 | .tab-focus(); 27 | } 28 | } 29 | 30 | &:hover, 31 | &:focus { 32 | color: @btn-default-color; 33 | text-decoration: none; 34 | } 35 | 36 | &:active, 37 | &.active { 38 | outline: 0; 39 | background-image: none; 40 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 41 | } 42 | 43 | &.disabled, 44 | &[disabled], 45 | fieldset[disabled] & { 46 | cursor: not-allowed; 47 | pointer-events: none; // Future-proof disabling of clicks 48 | .opacity(.65); 49 | .box-shadow(none); 50 | } 51 | } 52 | 53 | 54 | // Alternate buttons 55 | // -------------------------------------------------- 56 | 57 | .btn-default { 58 | background-color: #eaeaea; 59 | background-image: linear-gradient(#fafafa, #eaeaea); 60 | background-image: -moz-linear-gradient(#fafafa, #eaeaea); 61 | background-image: -webkit-linear-gradient(#fafafa, #eaeaea); 62 | background-repeat: repeat-x; 63 | border: 1px solid #ddd; 64 | border-bottom-color: #c5c5c5; 65 | color: #333; 66 | 67 | &:hover, 68 | &:focus 69 | { 70 | background-color: #dadada; 71 | background-image: linear-gradient(#eaeaea, #dadada); 72 | background-image: -moz-linear-gradient(#eaeaea, #dadada); 73 | background-image: -webkit-linear-gradient(#eaeaea, #dadada); 74 | background-repeat: repeat-x; 75 | border-color: #ccc #ccc #b5b5b5; 76 | text-decoration: none; 77 | color: #333; 78 | } 79 | &:active, 80 | &.active 81 | { 82 | background-color: #dadada; 83 | background-image: none; 84 | border-color: #b5b5b5; 85 | box-shadow: inset 0 3px 5px rgba(0,0,0,0.15); 86 | color: #333; 87 | } 88 | 89 | &.disabled, 90 | &[disabled], 91 | fieldset[disabled] & { 92 | &, 93 | &:hover, 94 | &:focus, 95 | &:active, 96 | &.active { 97 | background-color: #e5e5e5; 98 | background-image: none; 99 | border-color: #c5c5c5; 100 | box-shadow: none; 101 | color:#333; 102 | cursor: default; 103 | opacity: .5; 104 | text-shadow: 0 1px 0 rgba(255,255,255,0.9); 105 | } 106 | } 107 | } 108 | .btn-primary { 109 | 110 | background-color: #3072b3; 111 | background-image: linear-gradient(#599bcd, #3072b3); 112 | background-image: -moz-linear-gradient(#599bcd, #3072b3); 113 | background-image: -webkit-linear-gradient(#599bcd, #3072b3); 114 | background-repeat: repeat-x; 115 | border: 1px solid #2a65a0; 116 | color: #fff; 117 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25); 118 | 119 | &:hover, 120 | &:focus 121 | { 122 | background-color: #3072b3; 123 | background-image: linear-gradient(#5b97ca, #3163a5); 124 | background-image: -moz-linear-gradient(#5b97ca, #3163a5); 125 | background-image: -webkit-linear-gradient(#5b97ca, #3163a5); 126 | color: #fff; 127 | border-color: #2a65a0; 128 | } 129 | &:active, 130 | &.active 131 | { 132 | background-color: #3072b3; 133 | background-image: none; 134 | border-color: #25588c; 135 | box-shadow: inset 0 3px 5px rgba(0,0,0,0.15); 136 | } 137 | 138 | &.disabled, 139 | &[disabled], 140 | fieldset[disabled] & { 141 | &, 142 | &:hover, 143 | &:focus, 144 | &:active, 145 | &.active { 146 | background-position: 0 0; 147 | } 148 | } 149 | } 150 | // Warning appears as orange 151 | .btn-warning { 152 | background-color: #eaeaea; 153 | background-image: linear-gradient(#fafafa, #eaeaea); 154 | background-image: -moz-linear-gradient(#fafafa, #eaeaea); 155 | background-image: -webkit-linear-gradient(#fafafa, #eaeaea); 156 | background-repeat: repeat-x; 157 | border: 1px solid #ddd; 158 | border-bottom-color: #c5c5c5; 159 | color: #f28722; 160 | 161 | &:hover, 162 | &:focus 163 | { 164 | background-color: #dadada; 165 | background-image: linear-gradient(#eaeaea, #dadada); 166 | background-image: -moz-linear-gradient(#eaeaea, #dadada); 167 | background-image: -webkit-linear-gradient(#eaeaea, #dadada); 168 | background-repeat: repeat-x; 169 | border-color: #ccc #ccc #b5b5b5; 170 | text-decoration: none; 171 | color: #bc8334; 172 | } 173 | &:active, 174 | &.active 175 | { 176 | background-color: #dadada; 177 | background-image: none; 178 | border-color: #b5b5b5; 179 | box-shadow: inset 0 3px 5px rgba(0,0,0,0.15); 180 | color: #bc8334; 181 | } 182 | 183 | &.disabled, 184 | &[disabled], 185 | fieldset[disabled] & { 186 | &, 187 | &:hover, 188 | &:focus, 189 | &:active, 190 | &.active { 191 | background-color: #e5e5e5; 192 | background-image: none; 193 | border-color: #c5c5c5; 194 | box-shadow: none; 195 | color: #bc8334; 196 | cursor: default; 197 | opacity: .5; 198 | text-shadow: 0 1px 0 rgba(255,255,255,0.9); 199 | } 200 | } 201 | } 202 | // Danger and error appear as red 203 | .btn-danger { 204 | background-color: #eaeaea; 205 | background-image: linear-gradient(#fafafa, #eaeaea); 206 | background-image: -moz-linear-gradient(#fafafa, #eaeaea); 207 | background-image: -webkit-linear-gradient(#fafafa, #eaeaea); 208 | background-repeat: repeat-x; 209 | border: 1px solid #ddd; 210 | border-bottom-color: #c5c5c5; 211 | color: #900; 212 | 213 | &:hover, 214 | &:focus 215 | { 216 | background-color: #b33630; 217 | background-image: linear-gradient(#dc5f59, #b33630); 218 | background-image: -moz-linear-gradient(#dc5f59, #b33630); 219 | background-image: -webkit-linear-gradient(#dc5f59, #b33630); 220 | background-repeat: repeat-x; 221 | border-color: #cd504a; 222 | color: #fff; 223 | text-shadow: 0px -1px 0 rgba(0,0,0,0.3); 224 | } 225 | &:active, 226 | &.active 227 | { 228 | background-color: #b33630; 229 | background-image: none; 230 | border-color: #9f312c; 231 | color: #fff; 232 | } 233 | 234 | &.disabled, 235 | &[disabled], 236 | fieldset[disabled] & { 237 | &, 238 | &:hover, 239 | &:focus, 240 | &:active, 241 | &.active { 242 | background-color: #e1e1e1; 243 | background-image: linear-gradient(#fff, #e1e1e1); 244 | background-image: -moz-linear-gradient(#fff, #e1e1e1); 245 | background-image: -webkit-linear-gradient(#fff, #e1e1e1); 246 | background-repeat: repeat-x; 247 | border-color: #c5c5c5; 248 | color: #900; 249 | text-shadow: 0 1px 0 rgba(255,255,255,0.9); 250 | } 251 | } 252 | } 253 | // Success appears as green 254 | .btn-success { 255 | background-color: #60b044; 256 | background-image: linear-gradient(#8add6d, #60b044); 257 | background-image: -moz-linear-gradient(#8add6d, #60b044); 258 | background-image: -webkit-linear-gradient(#8add6d, #60b044); 259 | background-repeat: repeat-x; 260 | border-color: #5ca941; 261 | color: #fff; 262 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25); 263 | 264 | &:hover, 265 | &:focus 266 | { 267 | background-color: #569e3d; 268 | background-image: linear-gradient(#79d858, #569e3d); 269 | background-image: -moz-linear-gradient(#79d858, #569e3d); 270 | background-image: -webkit-linear-gradient(#79d858, #569e3d); 271 | background-repeat: repeat-x; 272 | border-color: #4a993e; 273 | color: #fff; 274 | } 275 | &:active, 276 | &.active 277 | { 278 | background-color: #569e3d; 279 | background-image: none; 280 | border-color: #418737; 281 | } 282 | 283 | &.disabled, 284 | &[disabled], 285 | fieldset[disabled] & { 286 | &, 287 | &:hover, 288 | &:focus, 289 | &:active, 290 | &.active { 291 | background-color: #60b044; 292 | background-image: linear-gradient(#8add6d, #60b044); 293 | background-image: -moz-linear-gradient(#8add6d, #60b044); 294 | background-image: -webkit-linear-gradient(#8add6d, #60b044); 295 | background-repeat: repeat-x; 296 | border-color: #74bb5a #74bb5a #509338; 297 | color: #fff; 298 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25); 299 | } 300 | } 301 | } 302 | // Info appears as blue-green 303 | .btn-info { 304 | background-color: #eaeaea; 305 | background-image: linear-gradient(#fafafa, #eaeaea); 306 | background-image: -moz-linear-gradient(#fafafa, #eaeaea); 307 | background-image: -webkit-linear-gradient(#fafafa, #eaeaea); 308 | background-repeat: repeat-x; 309 | border: 1px solid #ddd; 310 | border-bottom-color: #c5c5c5; 311 | color: #2a567d; 312 | 313 | &:hover, 314 | &:focus 315 | { 316 | background-color: #dadada; 317 | background-image: linear-gradient(#eaeaea, #dadada); 318 | background-image: -moz-linear-gradient(#eaeaea, #dadada); 319 | background-image: -webkit-linear-gradient(#eaeaea, #dadada); 320 | background-repeat: repeat-x; 321 | border-color: #ccc #ccc #b5b5b5; 322 | text-decoration: none; 323 | color: #2a567d; 324 | } 325 | &:active, 326 | &.active 327 | { 328 | background-color: #dadada; 329 | background-image: none; 330 | border-color: #b5b5b5; 331 | box-shadow: inset 0 3px 5px rgba(0,0,0,0.15); 332 | color: #2a567d; 333 | } 334 | 335 | &.disabled, 336 | &[disabled], 337 | fieldset[disabled] & { 338 | &, 339 | &:hover, 340 | &:focus, 341 | &:active, 342 | &.active { 343 | background-color: #e5e5e5; 344 | background-image: none; 345 | border-color: #c5c5c5; 346 | box-shadow: none; 347 | color: #2a567d; 348 | cursor: default; 349 | opacity: .5; 350 | text-shadow: 0 1px 0 rgba(255,255,255,0.9); 351 | } 352 | } 353 | } 354 | 355 | 356 | // Link buttons 357 | // ------------------------- 358 | 359 | // Make a button look and behave like a link 360 | .btn-link { 361 | color: @link-color; 362 | font-weight: normal; 363 | cursor: pointer; 364 | border-radius: 0; 365 | 366 | &, 367 | &:active, 368 | &[disabled], 369 | fieldset[disabled] & { 370 | background-color: transparent; 371 | .box-shadow(none); 372 | } 373 | &, 374 | &:hover, 375 | &:focus, 376 | &:active { 377 | border-color: transparent; 378 | } 379 | &:hover, 380 | &:focus { 381 | color: @link-hover-color; 382 | text-decoration: underline; 383 | background-color: transparent; 384 | } 385 | &[disabled], 386 | fieldset[disabled] & { 387 | &:hover, 388 | &:focus { 389 | color: @btn-link-disabled-color; 390 | text-decoration: none; 391 | } 392 | } 393 | } 394 | 395 | 396 | // Button Sizes 397 | // -------------------------------------------------- 398 | 399 | .btn { 400 | padding: 2px 12px; 401 | margin-bottom: 0; // For input.btn 402 | font-size: @font-size-base; 403 | font-weight: @btn-font-weight; 404 | // line-height: 0.8; 405 | height: 26px; 406 | } 407 | .btn-lg { 408 | // line-height: ensure even-numbered height of button next to large input 409 | padding: 7px 15px; 410 | font-size: @font-size-base; 411 | font-weight: @btn-font-weight; 412 | line-height: @line-height-base; 413 | height: 34px; 414 | } 415 | .btn-sm{ 416 | padding: 3px 12px; 417 | font-size: 11px; 418 | font-weight: @btn-font-weight; 419 | // line-height: 0.8; 420 | height: 24px; 421 | } 422 | .btn-xs { 423 | // line-height: ensure proper height of button next to small input 424 | padding: 0px 12px; 425 | vertical-align: top; 426 | font-size: 11px; 427 | font-weight: @btn-font-weight; 428 | // line-height: 0.8; 429 | height: 18px; 430 | } 431 | 432 | 433 | // Block button 434 | // -------------------------------------------------- 435 | 436 | .btn-block { 437 | display: block; 438 | width: 100%; 439 | padding-left: 0; 440 | padding-right: 0; 441 | } 442 | 443 | // Vertically space out multiple block buttons 444 | .btn-block + .btn-block { 445 | margin-top: 5px; 446 | } 447 | 448 | // Specificity overrides 449 | input[type="submit"], 450 | input[type="reset"], 451 | input[type="button"] { 452 | &.btn-block { 453 | width: 100%; 454 | } 455 | } 456 | -------------------------------------------------------------------------------- /less/forms.less: -------------------------------------------------------------------------------- 1 | // 2 | // Forms 3 | // -------------------------------------------------- 4 | 5 | 6 | // Normalize non-controls 7 | // 8 | // Restyle and baseline non-control form elements. 9 | 10 | fieldset { 11 | padding: 0; 12 | margin: 0; 13 | border: 0; 14 | // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets, 15 | // so we reset that to ensure it behaves more like a standard block element. 16 | // See https://github.com/twbs/bootstrap/issues/12359. 17 | min-width: 0; 18 | } 19 | 20 | legend { 21 | display: block; 22 | width: 100%; 23 | padding: 0; 24 | margin-bottom: @line-height-computed; 25 | font-size: (@font-size-base * 1.5); 26 | line-height: inherit; 27 | color: @legend-color; 28 | border: 0; 29 | border-bottom: 1px solid @legend-border-color; 30 | } 31 | 32 | label { 33 | display: inline-block; 34 | margin-bottom: 5px; 35 | font-weight: bold; 36 | } 37 | 38 | 39 | // Normalize form controls 40 | // 41 | // While most of our form styles require extra classes, some basic normalization 42 | // is required to ensure optimum display with or without those classes to better 43 | // address browser inconsistencies. 44 | 45 | // Override content-box in Normalize (* isn't specific enough) 46 | input[type="search"] { 47 | .box-sizing(border-box); 48 | } 49 | 50 | // Position radios and checkboxes better 51 | input[type="radio"], 52 | input[type="checkbox"] { 53 | margin: 4px 0 0; 54 | margin-top: 1px \9; /* IE8-9 */ 55 | line-height: normal; 56 | } 57 | 58 | // Set the height of file controls to match text inputs 59 | input[type="file"] { 60 | display: block; 61 | } 62 | 63 | // Make range inputs behave like textual form controls 64 | input[type="range"] { 65 | display: block; 66 | width: 100%; 67 | } 68 | 69 | // Make multiple select elements height not fixed 70 | select[multiple], 71 | select[size] { 72 | height: auto; 73 | } 74 | 75 | // Focus for file, radio, and checkbox 76 | input[type="file"]:focus, 77 | input[type="radio"]:focus, 78 | input[type="checkbox"]:focus { 79 | .tab-focus(); 80 | } 81 | 82 | // Adjust output element 83 | output { 84 | display: block; 85 | padding-top: (@padding-base-vertical + 1); 86 | font-size: @font-size-base; 87 | line-height: @line-height-base; 88 | color: @input-color; 89 | } 90 | 91 | 92 | // Common form controls 93 | // 94 | // Shared size and type resets for form controls. Apply `.form-control` to any 95 | // of the following form controls: 96 | // 97 | // select 98 | // textarea 99 | // input[type="text"] 100 | // input[type="password"] 101 | // input[type="datetime"] 102 | // input[type="datetime-local"] 103 | // input[type="date"] 104 | // input[type="month"] 105 | // input[type="time"] 106 | // input[type="week"] 107 | // input[type="number"] 108 | // input[type="email"] 109 | // input[type="url"] 110 | // input[type="search"] 111 | // input[type="tel"] 112 | // input[type="color"] 113 | 114 | .form-control { 115 | display: block; 116 | width: 100%; 117 | height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) 118 | padding: @padding-base-vertical @padding-base-horizontal; 119 | font-size: @font-size-base; 120 | line-height: @line-height-base; 121 | color: @input-color; 122 | background-color: @input-bg; 123 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 124 | border: 1px solid @input-border; 125 | border-radius: @input-border-radius; 126 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); 127 | .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); 128 | 129 | // Customize the `:focus` state to imitate native WebKit styles. 130 | .form-control-focus(); 131 | 132 | // Placeholder 133 | .placeholder(); 134 | 135 | // Disabled and read-only inputs 136 | // 137 | // HTML5 says that controls under a fieldset > legend:first-child won't be 138 | // disabled if the fieldset is disabled. Due to implementation difficulty, we 139 | // don't honor that edge case; we style them as disabled anyway. 140 | &[disabled], 141 | &[readonly], 142 | fieldset[disabled] & { 143 | cursor: not-allowed; 144 | background-color: @input-bg-disabled; 145 | opacity: 1; // iOS fix for unreadable disabled content 146 | } 147 | 148 | // Reset height for `textarea`s 149 | textarea& { 150 | height: auto; 151 | } 152 | } 153 | 154 | 155 | // Search inputs in iOS 156 | // 157 | // This overrides the extra rounded corners on search inputs in iOS so that our 158 | // `.form-control` class can properly style them. Note that this cannot simply 159 | // be added to `.form-control` as it's not specific enough. For details, see 160 | // https://github.com/twbs/bootstrap/issues/11586. 161 | 162 | input[type="search"] { 163 | -webkit-appearance: none; 164 | } 165 | 166 | 167 | // Special styles for iOS date input 168 | // 169 | // In Mobile Safari, date inputs require a pixel line-height that matches the 170 | // given height of the input. 171 | 172 | input[type="date"] { 173 | line-height: @input-height-base; 174 | } 175 | 176 | 177 | // Form groups 178 | // 179 | // Designed to help with the organization and spacing of vertical forms. For 180 | // horizontal forms, use the predefined grid classes. 181 | 182 | .form-group { 183 | margin-bottom: 15px; 184 | } 185 | 186 | 187 | // Checkboxes and radios 188 | // 189 | // Indent the labels to position radios/checkboxes as hanging controls. 190 | 191 | .radio, 192 | .checkbox { 193 | display: block; 194 | min-height: @line-height-computed; // clear the floating input if there is no label text 195 | margin-top: 10px; 196 | margin-bottom: 10px; 197 | padding-left: 20px; 198 | label { 199 | display: inline; 200 | font-weight: normal; 201 | cursor: pointer; 202 | } 203 | } 204 | .radio input[type="radio"], 205 | .radio-inline input[type="radio"], 206 | .checkbox input[type="checkbox"], 207 | .checkbox-inline input[type="checkbox"] { 208 | float: left; 209 | margin-left: -20px; 210 | } 211 | .radio + .radio, 212 | .checkbox + .checkbox { 213 | margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing 214 | } 215 | 216 | // Radios and checkboxes on same line 217 | .radio-inline, 218 | .checkbox-inline { 219 | display: inline-block; 220 | padding-left: 20px; 221 | margin-bottom: 0; 222 | vertical-align: middle; 223 | font-weight: normal; 224 | cursor: pointer; 225 | } 226 | .radio-inline + .radio-inline, 227 | .checkbox-inline + .checkbox-inline { 228 | margin-top: 0; 229 | margin-left: 10px; // space out consecutive inline controls 230 | } 231 | 232 | // Apply same disabled cursor tweak as for inputs 233 | // 234 | // Note: Neither radios nor checkboxes can be readonly. 235 | input[type="radio"], 236 | input[type="checkbox"], 237 | .radio, 238 | .radio-inline, 239 | .checkbox, 240 | .checkbox-inline { 241 | &[disabled], 242 | fieldset[disabled] & { 243 | cursor: not-allowed; 244 | } 245 | } 246 | 247 | 248 | // Form control sizing 249 | // 250 | // Build on `.form-control` with modifier classes to decrease or increase the 251 | // height and font-size of form controls. 252 | 253 | .input-sm { 254 | .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 255 | } 256 | 257 | .input-lg { 258 | .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 259 | } 260 | 261 | 262 | // Form control feedback states 263 | // 264 | // Apply contextual and semantic states to individual form controls. 265 | 266 | .has-feedback { 267 | // Enable absolute positioning 268 | position: relative; 269 | 270 | // Ensure icons don't overlap text 271 | .form-control { 272 | padding-right: (@input-height-base * 1.25); 273 | } 274 | 275 | // Feedback icon (requires .glyphicon classes) 276 | .form-control-feedback { 277 | position: absolute; 278 | top: (@line-height-computed + 5); // Height of the `label` and its margin 279 | right: 0; 280 | display: block; 281 | width: @input-height-base; 282 | height: @input-height-base; 283 | line-height: @input-height-base; 284 | text-align: center; 285 | } 286 | } 287 | 288 | // Feedback states 289 | .has-success { 290 | .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); 291 | } 292 | .has-warning { 293 | .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); 294 | } 295 | .has-error { 296 | .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); 297 | } 298 | 299 | 300 | // Static form control text 301 | // 302 | // Apply class to a `p` element to make any string of text align with labels in 303 | // a horizontal form layout. 304 | 305 | .form-control-static { 306 | margin-bottom: 0; // Remove default margin from `p` 307 | } 308 | 309 | 310 | // Help text 311 | // 312 | // Apply to any element you wish to create light text for placement immediately 313 | // below a form control. Use for general help, formatting, or instructional text. 314 | 315 | .help-block { 316 | display: block; // account for any element using help-block 317 | margin-top: 5px; 318 | margin-bottom: 10px; 319 | color: lighten(@text-color, 25%); // lighten the text some for contrast 320 | } 321 | 322 | 323 | 324 | // Inline forms 325 | // 326 | // Make forms appear inline(-block) by adding the `.form-inline` class. Inline 327 | // forms begin stacked on extra small (mobile) devices and then go inline when 328 | // viewports reach <768px. 329 | // 330 | // Requires wrapping inputs and labels with `.form-group` for proper display of 331 | // default HTML form controls and our custom form controls (e.g., input groups). 332 | // 333 | // Heads up! This is mixin-ed into `.navbar-form` in navbars.less. 334 | 335 | .form-inline { 336 | 337 | // Kick in the inline 338 | @media (min-width: @screen-sm-min) { 339 | // Inline-block all the things for "inline" 340 | .form-group { 341 | display: inline-block; 342 | margin-bottom: 0; 343 | vertical-align: middle; 344 | } 345 | 346 | // In navbar-form, allow folks to *not* use `.form-group` 347 | .form-control { 348 | display: inline-block; 349 | width: auto; // Prevent labels from stacking above inputs in `.form-group` 350 | vertical-align: middle; 351 | } 352 | // Input groups need that 100% width though 353 | .input-group > .form-control { 354 | width: 100%; 355 | } 356 | 357 | .control-label { 358 | margin-bottom: 0; 359 | vertical-align: middle; 360 | } 361 | 362 | // Remove default margin on radios/checkboxes that were used for stacking, and 363 | // then undo the floating of radios and checkboxes to match (which also avoids 364 | // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). 365 | .radio, 366 | .checkbox { 367 | display: inline-block; 368 | margin-top: 0; 369 | margin-bottom: 0; 370 | padding-left: 0; 371 | vertical-align: middle; 372 | } 373 | .radio input[type="radio"], 374 | .checkbox input[type="checkbox"] { 375 | float: none; 376 | margin-left: 0; 377 | } 378 | 379 | // Validation states 380 | // 381 | // Reposition the icon because it's now within a grid column and columns have 382 | // `position: relative;` on them. Also accounts for the grid gutter padding. 383 | .has-feedback .form-control-feedback { 384 | top: 0; 385 | } 386 | } 387 | } 388 | 389 | 390 | // Horizontal forms 391 | // 392 | // Horizontal forms are built on grid classes and allow you to create forms with 393 | // labels on the left and inputs on the right. 394 | 395 | .form-horizontal { 396 | 397 | // Consistent vertical alignment of labels, radios, and checkboxes 398 | .control-label, 399 | .radio, 400 | .checkbox, 401 | .radio-inline, 402 | .checkbox-inline { 403 | margin-top: 0; 404 | margin-bottom: 0; 405 | padding-top: (@padding-base-vertical + 1); // Default padding plus a border 406 | } 407 | // Account for padding we're adding to ensure the alignment and of help text 408 | // and other content below items 409 | .radio, 410 | .checkbox { 411 | min-height: (@line-height-computed + (@padding-base-vertical + 1)); 412 | } 413 | 414 | // Make form groups behave like rows 415 | .form-group { 416 | .make-row(); 417 | } 418 | 419 | .form-control-static { 420 | padding-top: (@padding-base-vertical + 1); 421 | } 422 | 423 | // Only right align form labels here when the columns stop stacking 424 | @media (min-width: @screen-sm-min) { 425 | .control-label { 426 | text-align: right; 427 | } 428 | } 429 | 430 | // Validation states 431 | // 432 | // Reposition the icon because it's now within a grid column and columns have 433 | // `position: relative;` on them. Also accounts for the grid gutter padding. 434 | .has-feedback .form-control-feedback { 435 | top: 0; 436 | right: (@grid-gutter-width / 2); 437 | } 438 | } 439 | -------------------------------------------------------------------------------- /examples/docs/js/docs.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Holder - 2.3.1 - client side image placeholders 4 | (c) 2012-2014 Ivan Malopinsky / http://imsky.co 5 | 6 | Provided under the MIT License. 7 | Commercial use requires attribution. 8 | 9 | */ 10 | var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseInt(a,10);var d=Math.max(b,a),e=Math.min(b,a),f=1/12,g=Math.min(.75*e,.75*d*f);return{height:Math.round(Math.max(c.size,g))}}function d(a){var b=[];for(p in a)a.hasOwnProperty(p)&&b.push(p+":"+a[p]);return b.join(";")}function e(a){var b=a.ctx,d=a.dimensions,e=a.template,f=a.ratio,g=a.holder,h="literal"==g.textmode,i="exact"==g.textmode,j=c(d.width,d.height,e),k=j.height,l=d.width*f,m=d.height*f,n=e.font?e.font:"Arial,Helvetica,sans-serif";canvas.width=l,canvas.height=m,b.textAlign="center",b.textBaseline="middle",b.fillStyle=e.background,b.fillRect(0,0,l,m),b.fillStyle=e.foreground,b.font="bold "+k+"px "+n;var o=e.text?e.text:Math.floor(d.width)+"x"+Math.floor(d.height);if(h){var d=g.dimensions;o=d.width+"x"+d.height}else if(i&&g.exact_dimensions){var d=g.exact_dimensions;o=Math.floor(d.width)+"x"+Math.floor(d.height)}var p=b.measureText(o).width;return p/l>=.75&&(k=Math.floor(.75*k*(l/p))),b.font="bold "+k*f+"px "+n,b.fillText(o,l/2,m/2,l),canvas.toDataURL("image/png")}function f(a){var b=a.dimensions,d=a.template,e=a.holder,f="literal"==e.textmode,g="exact"==e.textmode,h=c(b.width,b.height,d),i=h.height,j=b.width,k=b.height,l=d.font?d.font:"Arial,Helvetica,sans-serif",m=d.text?d.text:Math.floor(b.width)+"x"+Math.floor(b.height);if(f){var b=e.dimensions;m=b.width+"x"+b.height}else if(g&&e.exact_dimensions){var b=e.exact_dimensions;m=Math.floor(b.width)+"x"+Math.floor(b.height)}var n=z({text:m,width:j,height:k,text_height:i,font:l,template:d});return"data:image/svg+xml;base64,"+btoa(n)}function g(a){return r.use_canvas&&!r.use_svg?e(a):f(a)}function h(a,b,c,d){var e=c.dimensions,f=c.theme,h=c.text?decodeURIComponent(c.text):c.text,i=e.width+"x"+e.height;f=h?o(f,{text:h}):f,f=c.font?o(f,{font:c.font}):f,b.setAttribute("data-src",d),c.theme=f,b.holder_data=c,"image"==a?(b.setAttribute("alt",h?h:f.text?f.text+" ["+i+"]":i),(r.use_fallback||!c.auto)&&(b.style.width=e.width+"px",b.style.height=e.height+"px"),r.use_fallback?b.style.backgroundColor=f.background:(b.setAttribute("src",g({ctx:w,dimensions:e,template:f,ratio:x,holder:c})),c.textmode&&"exact"==c.textmode&&(v.push(b),k(b)))):"background"==a?r.use_fallback||(b.style.backgroundImage="url("+g({ctx:w,dimensions:e,template:f,ratio:x,holder:c})+")",b.style.backgroundSize=e.width+"px "+e.height+"px"):"fluid"==a&&(b.setAttribute("alt",h?h:f.text?f.text+" ["+i+"]":i),"%"==e.height.slice(-1)?b.style.height=e.height:null!=c.auto&&c.auto||(b.style.height=e.height+"px"),"%"==e.width.slice(-1)?b.style.width=e.width:null!=c.auto&&c.auto||(b.style.width=e.width+"px"),("inline"==b.style.display||""===b.style.display||"none"==b.style.display)&&(b.style.display="block"),j(b),r.use_fallback?b.style.backgroundColor=f.background:(v.push(b),k(b)))}function i(a,b){var c={height:a.clientHeight,width:a.clientWidth};return c.height||c.width?(a.removeAttribute("data-holder-invisible"),c):(a.setAttribute("data-holder-invisible",!0),void b.call(this,a))}function j(b){if(b.holder_data){var c=i(b,a.invisible_error_fn(j));if(c){var d=b.holder_data;d.initial_dimensions=c,d.fluid_data={fluid_height:"%"==d.dimensions.height.slice(-1),fluid_width:"%"==d.dimensions.width.slice(-1),mode:null},d.fluid_data.fluid_width&&!d.fluid_data.fluid_height?(d.fluid_data.mode="width",d.fluid_data.ratio=d.initial_dimensions.width/parseFloat(d.dimensions.height)):!d.fluid_data.fluid_width&&d.fluid_data.fluid_height&&(d.fluid_data.mode="height",d.fluid_data.ratio=parseFloat(d.dimensions.width)/d.initial_dimensions.height)}}}function k(b){var c;c=null==b.nodeType?v:[b];for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if(e.holder_data){var f=e.holder_data,h=i(e,a.invisible_error_fn(k));if(h){if(f.fluid){if(f.auto)switch(f.fluid_data.mode){case"width":h.height=h.width/f.fluid_data.ratio;break;case"height":h.width=h.height*f.fluid_data.ratio}e.setAttribute("src",g({ctx:w,dimensions:h,template:f.theme,ratio:x,holder:f}))}f.textmode&&"exact"==f.textmode&&(f.exact_dimensions=h,e.setAttribute("src",g({ctx:w,dimensions:f.dimensions,template:f.theme,ratio:x,holder:f})))}}}}function l(b,c){for(var d={theme:o(y.themes.gray,{})},e=!1,f=b.length,g=0;f>g;g++){var h=b[g];a.flags.dimensions.match(h)?(e=!0,d.dimensions=a.flags.dimensions.output(h)):a.flags.fluid.match(h)?(e=!0,d.dimensions=a.flags.fluid.output(h),d.fluid=!0):a.flags.textmode.match(h)?d.textmode=a.flags.textmode.output(h):a.flags.colors.match(h)?d.theme=a.flags.colors.output(h):c.themes[h]?c.themes.hasOwnProperty(h)&&(d.theme=o(c.themes[h],{})):a.flags.font.match(h)?d.font=a.flags.font.output(h):a.flags.auto.match(h)?d.auto=!0:a.flags.text.match(h)&&(d.text=a.flags.text.output(h))}return e?d:!1}function m(a,b){var c="complete",d="readystatechange",e=!1,f=e,g=!0,h=a.document,i=h.documentElement,j=h.addEventListener?"addEventListener":"attachEvent",k=h.addEventListener?"removeEventListener":"detachEvent",l=h.addEventListener?"":"on",m=function(g){(g.type!=d||h.readyState==c)&&(("load"==g.type?a:h)[k](l+g.type,m,e),!f&&(f=!0)&&b.call(a,null))},n=function(){try{i.doScroll("left")}catch(a){return void setTimeout(n,50)}m("poll")};if(h.readyState==c)b.call(a,"lazy");else{if(h.createEventObject&&i.doScroll){try{g=!a.frameElement}catch(o){}g&&n()}h[j](l+"DOMContentLoaded",m,e),h[j](l+d,m,e),a[j](l+"load",m,e)}}function n(a,b){var a=a.match(/^(\W)?(.*)/),b=b||document,c=b["getElement"+(a[1]?"#"==a[1]?"ById":"sByClassName":"sByTagName")],d=c.call(b,a[2]),e=[];return null!==d&&(e=d.length||0===d.length?d:[d]),e}function o(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);for(var d in b)b.hasOwnProperty(d)&&(c[d]=b[d]);return c}var q={use_svg:!1,use_canvas:!1,use_fallback:!1},r={},s=!1;canvas=document.createElement("canvas");var t=1,u=1,v=[];if(canvas.getContext)if(canvas.toDataURL("image/png").indexOf("data:image/png")<0)q.use_fallback=!0;else var w=canvas.getContext("2d");else q.use_fallback=!0;document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect&&(q.use_svg=!0,q.use_canvas=!1),q.use_fallback||(t=window.devicePixelRatio||1,u=w.webkitBackingStorePixelRatio||w.mozBackingStorePixelRatio||w.msBackingStorePixelRatio||w.oBackingStorePixelRatio||w.backingStorePixelRatio||1);var x=t/u,y={domain:"holder.js",images:"img",bgnodes:".holderjs",themes:{gray:{background:"#eee",foreground:"#aaa",size:12},social:{background:"#3a5a97",foreground:"#fff",size:12},industrial:{background:"#434A52",foreground:"#C2F200",size:12},sky:{background:"#0D8FDB",foreground:"#fff",size:12},vine:{background:"#39DBAC",foreground:"#1E292C",size:12},lava:{background:"#F8591A",foreground:"#1C2846",size:12}},stylesheet:""};a.flags={dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9%]+)x([0-9%]+)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,output:function(a){var b=this.regex.exec(a);return{size:y.themes.gray.size,foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}}};var z=function(){if(window.XMLSerializer){var a=new XMLSerializer,b="http://www.w3.org/2000/svg",c=document.createElementNS(b,"svg");c.webkitMatchesSelector&&c.setAttribute("xmlns","http://www.w3.org/2000/svg");var e=document.createElementNS(b,"rect"),f=document.createElementNS(b,"text"),g=document.createTextNode(null);return f.setAttribute("text-anchor","middle"),f.appendChild(g),c.appendChild(e),c.appendChild(f),function(b){return c.setAttribute("width",b.width),c.setAttribute("height",b.height),e.setAttribute("width",b.width),e.setAttribute("height",b.height),e.setAttribute("fill",b.template.background),f.setAttribute("x",b.width/2),f.setAttribute("y",b.height/2),g.nodeValue=b.text,f.setAttribute("style",d({fill:b.template.foreground,"font-weight":"bold","font-size":b.text_height+"px","font-family":b.font,"dominant-baseline":"central"})),a.serializeToString(c)}}}();for(var A in a.flags)a.flags.hasOwnProperty(A)&&(a.flags[A].match=function(a){return a.match(this.regex)});a.invisible_error_fn=function(){return function(a){if(a.hasAttribute("data-holder-invisible"))throw new Error("Holder: invisible placeholder")}},a.add_theme=function(b,c){return null!=b&&null!=c&&(y.themes[b]=c),a},a.add_image=function(b,c){var d=n(c);if(d.length)for(var e=0,f=d.length;f>e;e++){var g=document.createElement("img");g.setAttribute("data-src",b),d[e].appendChild(g)}return a},a.run=function(b){r=o({},q),s=!0;var c=o(y,b),d=[],e=[],f=[];for(null!=c.use_canvas&&c.use_canvas&&(r.use_canvas=!0,r.use_svg=!1),"string"==typeof c.images?e=n(c.images):window.NodeList&&c.images instanceof window.NodeList?e=c.images:window.Node&&c.images instanceof window.Node?e=[c.images]:window.HTMLCollection&&c.images instanceof window.HTMLCollection&&(e=c.images),"string"==typeof c.bgnodes?f=n(c.bgnodes):window.NodeList&&c.elements instanceof window.NodeList?f=c.bgnodes:window.Node&&c.bgnodes instanceof window.Node&&(f=[c.bgnodes]),k=0,j=e.length;j>k;k++)d.push(e[k]);var g=document.getElementById("holderjs-style");g||(g=document.createElement("style"),g.setAttribute("id","holderjs-style"),g.type="text/css",document.getElementsByTagName("head")[0].appendChild(g)),c.nocss||(g.styleSheet?g.styleSheet.cssText+=c.stylesheet:g.appendChild(document.createTextNode(c.stylesheet)));for(var i=new RegExp(c.domain+'/(.*?)"?\\)'),j=f.length,k=0;j>k;k++){var m=window.getComputedStyle(f[k],null).getPropertyValue("background-image"),p=m.match(i),t=f[k].getAttribute("data-background-src");if(p){var u=l(p[1].split("/"),c);u&&h("background",f[k],u,m)}else if(null!=t){var u=l(t.substr(t.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);u&&h("background",f[k],u,m)}}for(j=d.length,k=0;j>k;k++){var v,w;w=v=m=null;try{w=d[k].getAttribute("src"),attr_datasrc=d[k].getAttribute("data-src")}catch(x){}if(null==attr_datasrc&&w&&w.indexOf(c.domain)>=0?m=w:attr_datasrc&&attr_datasrc.indexOf(c.domain)>=0&&(m=attr_datasrc),m){var u=l(m.substr(m.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);u&&(u.fluid?h("fluid",d[k],u,m):h("image",d[k],u,m))}}return a},m(b,function(){window.addEventListener?(window.addEventListener("resize",k,!1),window.addEventListener("orientationchange",k,!1)):window.attachEvent("onresize",k),s||a.run({})}),"function"==typeof define&&define.amd&&define([],function(){return a}),function(){function a(a){this.message=a}var b="undefined"!=typeof exports?exports:this,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.prototype=Error(),a.prototype.name="InvalidCharacterError",b.btoa||(b.btoa=function(b){for(var d,e,f=0,g=c,h="";b.charAt(0|f)||(g="=",f%1);h+=g.charAt(63&d>>8-8*(f%1))){if(e=b.charCodeAt(f+=.75),e>255)throw new a("'btoa' failed");d=d<<8|e}return h}),b.atob||(b.atob=function(b){if(b=b.replace(/=+$/,""),1==b.length%4)throw new a("'atob' failed");for(var d,e,f=0,g=0,h="";e=b.charAt(g++);~e&&(d=f%4?64*d+e:e,f++%4)?h+=String.fromCharCode(255&d>>(6&-2*f)):0)e=c.indexOf(e);return h})}(),document.getElementsByClassName||(document.getElementsByClassName=function(a){var b,c,d,e=document,f=[];if(e.querySelectorAll)return e.querySelectorAll("."+a);if(e.evaluate)for(c=".//*[contains(concat(' ', @class, ' '), ' "+a+" ')]",b=e.evaluate(c,e,null,0,null);d=b.iterateNext();)f.push(d);else for(b=e.getElementsByTagName("*"),c=new RegExp("(^|\\s)"+a+"(\\s|$)"),d=0;d 1 ? end : this.data.length) 146 | , type 147 | , this.encoding 148 | ); 149 | }; 150 | FB_proto.toString = function() { 151 | return "[object Blob]"; 152 | }; 153 | return FakeBlobBuilder; 154 | }(view)); 155 | 156 | return function Blob(blobParts, options) { 157 | var type = options ? (options.type || "") : ""; 158 | var builder = new BlobBuilder(); 159 | if (blobParts) { 160 | for (var i = 0, len = blobParts.length; i < len; i++) { 161 | builder.append(blobParts[i]); 162 | } 163 | } 164 | return builder.getBlob(type); 165 | }; 166 | }(self)); 167 | 168 | /* FileSaver.js 169 | * A saveAs() FileSaver implementation. 170 | * 2013-10-21 171 | * 172 | * By Eli Grey, http://eligrey.com 173 | * License: X11/MIT 174 | * See LICENSE.md 175 | */ 176 | 177 | /*global self */ 178 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 179 | plusplus: true */ 180 | 181 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 182 | 183 | var saveAs = saveAs 184 | || (typeof navigator !== 'undefined' && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) 185 | || (function(view) { 186 | "use strict"; 187 | var 188 | doc = view.document 189 | // only get URL when necessary in case BlobBuilder.js hasn't overridden it yet 190 | , get_URL = function() { 191 | return view.URL || view.webkitURL || view; 192 | } 193 | , URL = view.URL || view.webkitURL || view 194 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 195 | , can_use_save_link = !view.externalHost && "download" in save_link 196 | , click = function(node) { 197 | var event = doc.createEvent("MouseEvents"); 198 | event.initMouseEvent( 199 | "click", true, false, view, 0, 0, 0, 0, 0 200 | , false, false, false, false, 0, null 201 | ); 202 | node.dispatchEvent(event); 203 | } 204 | , webkit_req_fs = view.webkitRequestFileSystem 205 | , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem 206 | , throw_outside = function (ex) { 207 | (view.setImmediate || view.setTimeout)(function() { 208 | throw ex; 209 | }, 0); 210 | } 211 | , force_saveable_type = "application/octet-stream" 212 | , fs_min_size = 0 213 | , deletion_queue = [] 214 | , process_deletion_queue = function() { 215 | var i = deletion_queue.length; 216 | while (i--) { 217 | var file = deletion_queue[i]; 218 | if (typeof file === "string") { // file is an object URL 219 | URL.revokeObjectURL(file); 220 | } else { // file is a File 221 | file.remove(); 222 | } 223 | } 224 | deletion_queue.length = 0; // clear queue 225 | } 226 | , dispatch = function(filesaver, event_types, event) { 227 | event_types = [].concat(event_types); 228 | var i = event_types.length; 229 | while (i--) { 230 | var listener = filesaver["on" + event_types[i]]; 231 | if (typeof listener === "function") { 232 | try { 233 | listener.call(filesaver, event || filesaver); 234 | } catch (ex) { 235 | throw_outside(ex); 236 | } 237 | } 238 | } 239 | } 240 | , FileSaver = function(blob, name) { 241 | // First try a.download, then web filesystem, then object URLs 242 | var 243 | filesaver = this 244 | , type = blob.type 245 | , blob_changed = false 246 | , object_url 247 | , target_view 248 | , get_object_url = function() { 249 | var object_url = get_URL().createObjectURL(blob); 250 | deletion_queue.push(object_url); 251 | return object_url; 252 | } 253 | , dispatch_all = function() { 254 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 255 | } 256 | // on any filesys errors revert to saving with object URLs 257 | , fs_error = function() { 258 | // don't create more object URLs than needed 259 | if (blob_changed || !object_url) { 260 | object_url = get_object_url(blob); 261 | } 262 | if (target_view) { 263 | target_view.location.href = object_url; 264 | } else { 265 | window.open(object_url, "_blank"); 266 | } 267 | filesaver.readyState = filesaver.DONE; 268 | dispatch_all(); 269 | } 270 | , abortable = function(func) { 271 | return function() { 272 | if (filesaver.readyState !== filesaver.DONE) { 273 | return func.apply(this, arguments); 274 | } 275 | }; 276 | } 277 | , create_if_not_found = {create: true, exclusive: false} 278 | , slice 279 | ; 280 | filesaver.readyState = filesaver.INIT; 281 | if (!name) { 282 | name = "download"; 283 | } 284 | if (can_use_save_link) { 285 | object_url = get_object_url(blob); 286 | // FF for Android has a nasty garbage collection mechanism 287 | // that turns all objects that are not pure javascript into 'deadObject' 288 | // this means `doc` and `save_link` are unusable and need to be recreated 289 | // `view` is usable though: 290 | doc = view.document; 291 | save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"); 292 | save_link.href = object_url; 293 | save_link.download = name; 294 | var event = doc.createEvent("MouseEvents"); 295 | event.initMouseEvent( 296 | "click", true, false, view, 0, 0, 0, 0, 0 297 | , false, false, false, false, 0, null 298 | ); 299 | save_link.dispatchEvent(event); 300 | filesaver.readyState = filesaver.DONE; 301 | dispatch_all(); 302 | return; 303 | } 304 | // Object and web filesystem URLs have a problem saving in Google Chrome when 305 | // viewed in a tab, so I force save with application/octet-stream 306 | // http://code.google.com/p/chromium/issues/detail?id=91158 307 | if (view.chrome && type && type !== force_saveable_type) { 308 | slice = blob.slice || blob.webkitSlice; 309 | blob = slice.call(blob, 0, blob.size, force_saveable_type); 310 | blob_changed = true; 311 | } 312 | // Since I can't be sure that the guessed media type will trigger a download 313 | // in WebKit, I append .download to the filename. 314 | // https://bugs.webkit.org/show_bug.cgi?id=65440 315 | if (webkit_req_fs && name !== "download") { 316 | name += ".download"; 317 | } 318 | if (type === force_saveable_type || webkit_req_fs) { 319 | target_view = view; 320 | } 321 | if (!req_fs) { 322 | fs_error(); 323 | return; 324 | } 325 | fs_min_size += blob.size; 326 | req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { 327 | fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { 328 | var save = function() { 329 | dir.getFile(name, create_if_not_found, abortable(function(file) { 330 | file.createWriter(abortable(function(writer) { 331 | writer.onwriteend = function(event) { 332 | target_view.location.href = file.toURL(); 333 | deletion_queue.push(file); 334 | filesaver.readyState = filesaver.DONE; 335 | dispatch(filesaver, "writeend", event); 336 | }; 337 | writer.onerror = function() { 338 | var error = writer.error; 339 | if (error.code !== error.ABORT_ERR) { 340 | fs_error(); 341 | } 342 | }; 343 | "writestart progress write abort".split(" ").forEach(function(event) { 344 | writer["on" + event] = filesaver["on" + event]; 345 | }); 346 | writer.write(blob); 347 | filesaver.abort = function() { 348 | writer.abort(); 349 | filesaver.readyState = filesaver.DONE; 350 | }; 351 | filesaver.readyState = filesaver.WRITING; 352 | }), fs_error); 353 | }), fs_error); 354 | }; 355 | dir.getFile(name, {create: false}, abortable(function(file) { 356 | // delete file if it already exists 357 | file.remove(); 358 | save(); 359 | }), abortable(function(ex) { 360 | if (ex.code === ex.NOT_FOUND_ERR) { 361 | save(); 362 | } else { 363 | fs_error(); 364 | } 365 | })); 366 | }), fs_error); 367 | }), fs_error); 368 | } 369 | , FS_proto = FileSaver.prototype 370 | , saveAs = function(blob, name) { 371 | return new FileSaver(blob, name); 372 | } 373 | ; 374 | FS_proto.abort = function() { 375 | var filesaver = this; 376 | filesaver.readyState = filesaver.DONE; 377 | dispatch(filesaver, "abort"); 378 | }; 379 | FS_proto.readyState = FS_proto.INIT = 0; 380 | FS_proto.WRITING = 1; 381 | FS_proto.DONE = 2; 382 | 383 | FS_proto.error = 384 | FS_proto.onwritestart = 385 | FS_proto.onprogress = 386 | FS_proto.onwrite = 387 | FS_proto.onabort = 388 | FS_proto.onerror = 389 | FS_proto.onwriteend = 390 | null; 391 | 392 | view.addEventListener("unload", process_deletion_queue, false); 393 | return saveAs; 394 | }(this.self || this.window || this.content)); 395 | // `self` is undefined in Firefox for Android content script context 396 | // while `this` is nsIContentFrameMessageManager 397 | // with an attribute `content` that corresponds to the window 398 | 399 | if (typeof module !== 'undefined') module.exports = saveAs; 400 | -------------------------------------------------------------------------------- /examples/docs/js/holder.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Holder - 2.2 - client side image placeholders 4 | (c) 2012-2013 Ivan Malopinsky / http://imsky.co 5 | 6 | Provided under the MIT License. 7 | Commercial use requires attribution. 8 | 9 | */ 10 | 11 | var Holder = Holder || {}; 12 | (function (app, win) { 13 | 14 | var preempted = false, 15 | fallback = false, 16 | canvas = document.createElement('canvas'); 17 | var dpr = 1, bsr = 1; 18 | var resizable_images = []; 19 | 20 | if (!canvas.getContext) { 21 | fallback = true; 22 | } else { 23 | if (canvas.toDataURL("image/png") 24 | .indexOf("data:image/png") < 0) { 25 | //Android doesn't support data URI 26 | fallback = true; 27 | } else { 28 | var ctx = canvas.getContext("2d"); 29 | } 30 | } 31 | 32 | if(!fallback){ 33 | dpr = window.devicePixelRatio || 1, 34 | bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; 35 | } 36 | 37 | var ratio = dpr / bsr; 38 | 39 | var settings = { 40 | domain: "holder.js", 41 | images: "img", 42 | bgnodes: ".holderjs", 43 | themes: { 44 | "gray": { 45 | background: "#eee", 46 | foreground: "#aaa", 47 | size: 12 48 | }, 49 | "social": { 50 | background: "#3a5a97", 51 | foreground: "#fff", 52 | size: 12 53 | }, 54 | "industrial": { 55 | background: "#434A52", 56 | foreground: "#C2F200", 57 | size: 12 58 | }, 59 | "sky": { 60 | background: "#0D8FDB", 61 | foreground: "#fff", 62 | size: 12 63 | }, 64 | "vine": { 65 | background: "#39DBAC", 66 | foreground: "#1E292C", 67 | size: 12 68 | }, 69 | "lava": { 70 | background: "#F8591A", 71 | foreground: "#1C2846", 72 | size: 12 73 | } 74 | }, 75 | stylesheet: "" 76 | }; 77 | app.flags = { 78 | dimensions: { 79 | regex: /^(\d+)x(\d+)$/, 80 | output: function (val) { 81 | var exec = this.regex.exec(val); 82 | return { 83 | width: +exec[1], 84 | height: +exec[2] 85 | } 86 | } 87 | }, 88 | fluid: { 89 | regex: /^([0-9%]+)x([0-9%]+)$/, 90 | output: function (val) { 91 | var exec = this.regex.exec(val); 92 | return { 93 | width: exec[1], 94 | height: exec[2] 95 | } 96 | } 97 | }, 98 | colors: { 99 | regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i, 100 | output: function (val) { 101 | var exec = this.regex.exec(val); 102 | return { 103 | size: settings.themes.gray.size, 104 | foreground: "#" + exec[2], 105 | background: "#" + exec[1] 106 | } 107 | } 108 | }, 109 | text: { 110 | regex: /text\:(.*)/, 111 | output: function (val) { 112 | return this.regex.exec(val)[1]; 113 | } 114 | }, 115 | font: { 116 | regex: /font\:(.*)/, 117 | output: function (val) { 118 | return this.regex.exec(val)[1]; 119 | } 120 | }, 121 | auto: { 122 | regex: /^auto$/ 123 | }, 124 | textmode: { 125 | regex: /textmode\:(.*)/, 126 | output: function(val){ 127 | return this.regex.exec(val)[1]; 128 | } 129 | } 130 | } 131 | 132 | //getElementsByClassName polyfill 133 | document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i= 0.75) { 217 | text_height = Math.floor(text_height * 0.75 * (width / text_width)); 218 | } 219 | //Resetting font size if necessary 220 | ctx.font = "bold " + (text_height * ratio) + "px " + font; 221 | ctx.fillText(text, (width / 2), (height / 2), width); 222 | return canvas.toDataURL("image/png"); 223 | } 224 | 225 | function render(mode, el, holder, src) { 226 | 227 | var dimensions = holder.dimensions, 228 | theme = holder.theme, 229 | text = holder.text ? decodeURIComponent(holder.text) : holder.text; 230 | var dimensions_caption = dimensions.width + "x" + dimensions.height; 231 | theme = (text ? extend(theme, { 232 | text: text 233 | }) : theme); 234 | theme = (holder.font ? extend(theme, { 235 | font: holder.font 236 | }) : theme); 237 | el.setAttribute("data-src", src); 238 | holder.theme = theme; 239 | el.holder_data = holder; 240 | 241 | if (mode == "image") { 242 | el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); 243 | if (fallback || !holder.auto) { 244 | el.style.width = dimensions.width + "px"; 245 | el.style.height = dimensions.height + "px"; 246 | } 247 | if (fallback) { 248 | el.style.backgroundColor = theme.background; 249 | } else { 250 | el.setAttribute("src", draw({ctx: ctx, dimensions: dimensions, template: theme, ratio:ratio, holder: holder})); 251 | 252 | if(holder.textmode && holder.textmode == "exact"){ 253 | resizable_images.push(el); 254 | resizable_update(el); 255 | } 256 | 257 | } 258 | } else if (mode == "background") { 259 | if (!fallback) { 260 | el.style.backgroundImage = "url(" + draw({ctx:ctx, dimensions: dimensions, template: theme, ratio: ratio, holder: holder}) + ")"; 261 | el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px"; 262 | } 263 | } else if (mode == "fluid") { 264 | el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); 265 | if (dimensions.height.slice(-1) == "%") { 266 | el.style.height = dimensions.height 267 | } else { 268 | el.style.height = dimensions.height + "px" 269 | } 270 | if (dimensions.width.slice(-1) == "%") { 271 | el.style.width = dimensions.width 272 | } else { 273 | el.style.width = dimensions.width + "px" 274 | } 275 | if (el.style.display == "inline" || el.style.display === "" || el.style.display == "none") { 276 | el.style.display = "block"; 277 | } 278 | if (fallback) { 279 | el.style.backgroundColor = theme.background; 280 | } else { 281 | resizable_images.push(el); 282 | resizable_update(el); 283 | } 284 | } 285 | } 286 | 287 | function dimension_check(el, callback) { 288 | var dimensions = { 289 | height: el.clientHeight, 290 | width: el.clientWidth 291 | }; 292 | if (!dimensions.height && !dimensions.width) { 293 | if (el.hasAttribute("data-holder-invisible")) { 294 | throw new Error("Holder: placeholder is not visible"); 295 | } else { 296 | el.setAttribute("data-holder-invisible", true) 297 | setTimeout(function () { 298 | callback.call(this, el) 299 | }, 1) 300 | return null; 301 | } 302 | } else { 303 | el.removeAttribute("data-holder-invisible") 304 | } 305 | return dimensions; 306 | } 307 | 308 | function resizable_update(element) { 309 | var images; 310 | if (element.nodeType == null) { 311 | images = resizable_images; 312 | } else { 313 | images = [element] 314 | } 315 | for (var i in images) { 316 | if (!images.hasOwnProperty(i)) { 317 | continue; 318 | } 319 | var el = images[i] 320 | if (el.holder_data) { 321 | var holder = el.holder_data; 322 | var dimensions = dimension_check(el, resizable_update) 323 | if(dimensions){ 324 | if(holder.fluid){ 325 | el.setAttribute("src", draw({ 326 | ctx: ctx, 327 | dimensions: dimensions, 328 | template: holder.theme, 329 | ratio: ratio, 330 | holder: holder 331 | })) 332 | } 333 | if(holder.textmode && holder.textmode == "exact"){ 334 | holder.exact_dimensions = dimensions; 335 | el.setAttribute("src", draw({ 336 | ctx: ctx, 337 | dimensions: holder.dimensions, 338 | template: holder.theme, 339 | ratio: ratio, 340 | holder: holder 341 | })) 342 | } 343 | } 344 | } 345 | } 346 | } 347 | 348 | function parse_flags(flags, options) { 349 | var ret = { 350 | theme: extend(settings.themes.gray, {}) 351 | }; 352 | var render = false; 353 | for (sl = flags.length, j = 0; j < sl; j++) { 354 | var flag = flags[j]; 355 | if (app.flags.dimensions.match(flag)) { 356 | render = true; 357 | ret.dimensions = app.flags.dimensions.output(flag); 358 | } else if (app.flags.fluid.match(flag)) { 359 | render = true; 360 | ret.dimensions = app.flags.fluid.output(flag); 361 | ret.fluid = true; 362 | } else if (app.flags.textmode.match(flag)) { 363 | ret.textmode = app.flags.textmode.output(flag) 364 | } else if (app.flags.colors.match(flag)) { 365 | ret.theme = app.flags.colors.output(flag); 366 | } else if (options.themes[flag]) { 367 | //If a theme is specified, it will override custom colors 368 | if(options.themes.hasOwnProperty(flag)){ 369 | ret.theme = extend(options.themes[flag], {}); 370 | } 371 | } else if (app.flags.font.match(flag)) { 372 | ret.font = app.flags.font.output(flag); 373 | } else if (app.flags.auto.match(flag)) { 374 | ret.auto = true; 375 | } else if (app.flags.text.match(flag)) { 376 | ret.text = app.flags.text.output(flag); 377 | } 378 | } 379 | return render ? ret : false; 380 | } 381 | 382 | for (var flag in app.flags) { 383 | if (!app.flags.hasOwnProperty(flag)) continue; 384 | app.flags[flag].match = function (val) { 385 | return val.match(this.regex) 386 | } 387 | } 388 | app.add_theme = function (name, theme) { 389 | name != null && theme != null && (settings.themes[name] = theme); 390 | return app; 391 | }; 392 | app.add_image = function (src, el) { 393 | var node = selector(el); 394 | if (node.length) { 395 | for (var i = 0, l = node.length; i < l; i++) { 396 | var img = document.createElement("img") 397 | img.setAttribute("data-src", src); 398 | node[i].appendChild(img); 399 | } 400 | } 401 | return app; 402 | }; 403 | app.run = function (o) { 404 | preempted = true; 405 | 406 | var options = extend(settings, o), 407 | images = [], 408 | imageNodes = [], 409 | bgnodes = []; 410 | if (typeof (options.images) == "string") { 411 | imageNodes = selector(options.images); 412 | } else if (window.NodeList && options.images instanceof window.NodeList) { 413 | imageNodes = options.images; 414 | } else if (window.Node && options.images instanceof window.Node) { 415 | imageNodes = [options.images]; 416 | } 417 | 418 | if (typeof (options.bgnodes) == "string") { 419 | bgnodes = selector(options.bgnodes); 420 | } else if (window.NodeList && options.elements instanceof window.NodeList) { 421 | bgnodes = options.bgnodes; 422 | } else if (window.Node && options.bgnodes instanceof window.Node) { 423 | bgnodes = [options.bgnodes]; 424 | } 425 | for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]); 426 | var holdercss = document.getElementById("holderjs-style"); 427 | if (!holdercss) { 428 | holdercss = document.createElement("style"); 429 | holdercss.setAttribute("id", "holderjs-style"); 430 | holdercss.type = "text/css"; 431 | document.getElementsByTagName("head")[0].appendChild(holdercss); 432 | } 433 | if (!options.nocss) { 434 | if (holdercss.styleSheet) { 435 | holdercss.styleSheet.cssText += options.stylesheet; 436 | } else { 437 | holdercss.appendChild(document.createTextNode(options.stylesheet)); 438 | } 439 | } 440 | var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)"); 441 | for (var l = bgnodes.length, i = 0; i < l; i++) { 442 | var src = window.getComputedStyle(bgnodes[i], null) 443 | .getPropertyValue("background-image"); 444 | var flags = src.match(cssregex); 445 | var bgsrc = bgnodes[i].getAttribute("data-background-src"); 446 | if (flags) { 447 | var holder = parse_flags(flags[1].split("/"), options); 448 | if (holder) { 449 | render("background", bgnodes[i], holder, src); 450 | } 451 | } else if (bgsrc != null) { 452 | var holder = parse_flags(bgsrc.substr(bgsrc.lastIndexOf(options.domain) + options.domain.length + 1) 453 | .split("/"), options); 454 | if (holder) { 455 | render("background", bgnodes[i], holder, src); 456 | } 457 | } 458 | } 459 | for (l = images.length, i = 0; i < l; i++) { 460 | var attr_data_src, attr_src; 461 | attr_src = attr_data_src = src = null; 462 | try { 463 | attr_src = images[i].getAttribute("src"); 464 | attr_datasrc = images[i].getAttribute("data-src"); 465 | } catch (e) {} 466 | if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) { 467 | src = attr_src; 468 | } else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) { 469 | src = attr_datasrc; 470 | } 471 | if (src) { 472 | var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1) 473 | .split("/"), options); 474 | if (holder) { 475 | if (holder.fluid) { 476 | render("fluid", images[i], holder, src) 477 | } else { 478 | render("image", images[i], holder, src); 479 | } 480 | } 481 | } 482 | } 483 | return app; 484 | }; 485 | contentLoaded(win, function () { 486 | if (window.addEventListener) { 487 | window.addEventListener("resize", resizable_update, false); 488 | window.addEventListener("orientationchange", resizable_update, false); 489 | } else { 490 | window.attachEvent("onresize", resizable_update) 491 | } 492 | preempted || app.run(); 493 | }); 494 | if (typeof define === "function" && define.amd) { 495 | define([], function () { 496 | return app; 497 | }); 498 | } 499 | 500 | })(Holder, window); 501 | -------------------------------------------------------------------------------- /examples/docs/css/docs.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Docs (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 5 | * details, see http://creativecommons.org/licenses/by/3.0/. 6 | */body{position:relative}.table code{font-size:13px;font-weight:400}.btn-outline{color:#563d7c;background-color:transparent;border-color:#563d7c}.btn-outline:hover,.btn-outline:focus,.btn-outline:active{color:#fff;background-color:#563d7c;border-color:#563d7c}.btn-outline-inverse{color:#fff;background-color:transparent;border-color:#cdbfe3}.btn-outline-inverse:hover,.btn-outline-inverse:focus,.btn-outline-inverse:active{color:#563d7c;text-shadow:none;background-color:#fff;border-color:#fff}.bs-docs-booticon{display:block;font-weight:500;color:#fff;background-color:#563d7c;border-radius:15%;cursor:default;text-align:center}.bs-docs-booticon-sm{width:30px;height:30px;font-size:20px;line-height:28px}.bs-docs-booticon-lg{width:144px;height:144px;font-size:108px;line-height:140px}.bs-docs-booticon-inverse{color:#563d7c;background-color:#fff}.bs-docs-booticon-outline{background-color:transparent;border:1px solid #cdbfe3}.bs-docs-nav{margin-bottom:0;background-color:#fff;border-bottom:0}.bs-home-nav .bs-nav-b{display:none}.bs-docs-nav .navbar-brand,.bs-docs-nav .navbar-nav>li>a{color:#563d7c;font-weight:500}.bs-docs-nav .navbar-nav>li>a:hover,.bs-docs-nav .navbar-nav>.active>a,.bs-docs-nav .navbar-nav>.active>a:hover{color:#463265;background-color:#f9f9f9}.bs-docs-nav .navbar-toggle .icon-bar{background-color:#563d7c}.bs-docs-nav .navbar-header .navbar-toggle{border-color:#fff}.bs-docs-nav .navbar-header .navbar-toggle:hover,.bs-docs-nav .navbar-header .navbar-toggle:focus{background-color:#f9f9f9;border-color:#f9f9f9}.bs-docs-footer{padding-top:40px;padding-bottom:40px;margin-top:100px;color:#777;text-align:center;border-top:1px solid #e5e5e5}.bs-docs-footer-links{margin-top:20px;padding-left:0;color:#999}.bs-docs-footer-links li{display:inline;padding:0 2px}.bs-docs-footer-links li:first-child{padding-left:0}@media (min-width:768px){.bs-docs-footer p{margin-bottom:0}}.bs-docs-social{margin-bottom:20px;text-align:center}.bs-docs-social-buttons{display:inline-block;margin-bottom:0;padding-left:0;list-style:none}.bs-docs-social-buttons li{display:inline-block;line-height:1;padding:5px 8px}.bs-docs-social-buttons .twitter-follow-button{width:225px!important}.bs-docs-social-buttons .twitter-share-button{width:98px!important}.github-btn{border:0;overflow:hidden}.bs-docs-masthead,.bs-docs-header{position:relative;padding:30px 15px;color:#cdbfe3;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.1);background-color:#6f5499;background-image:-webkit-linear-gradient(top,#563d7c 0,#6f5499 100%);background-image:linear-gradient(to bottom,#563d7c 0,#6f5499 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0)}.bs-docs-masthead .bs-docs-booticon{margin:0 auto 30px}.bs-docs-masthead h1{font-weight:300;line-height:1;color:#fff}.bs-docs-masthead .lead{margin:0 auto 30px;font-size:20px;color:#fff}.bs-docs-masthead .version{margin-top:-15px;margin-bottom:30px;color:#9783b9}.bs-docs-masthead .btn{width:100%;padding:15px 30px;font-size:20px}@media (min-width:480px){.bs-docs-masthead .btn{width:auto}}@media (min-width:768px){.bs-docs-masthead{padding-top:80px;padding-bottom:80px}.bs-docs-masthead h1{font-size:60px}.bs-docs-masthead .lead{font-size:24px}}@media (min-width:992px){.bs-docs-masthead .lead{width:80%;font-size:30px}}.bs-docs-header{margin-bottom:40px;font-size:20px}.bs-docs-header h1{margin-top:0;color:#fff}.bs-docs-header p{margin-bottom:0;font-weight:300;line-height:1.4}.bs-docs-header .container{position:relative}@media (min-width:768px){.bs-docs-header{padding-top:60px;padding-bottom:60px;font-size:24px;text-align:left}.bs-docs-header h1{font-size:60px;line-height:1}}@media (min-width:992px){.bs-docs-header h1,.bs-docs-header p{margin-right:380px}}.carbonad{width:auto!important;margin:30px -30px -31px!important;padding:20px!important;overflow:hidden;height:auto!important;font-size:13px!important;line-height:16px!important;text-align:left;background:transparent!important;border:solid #866ab3!important;border-width:1px 0!important}.carbonad-img{margin:0!important}.carbonad-text,.carbonad-tag{float:none!important;display:block!important;width:auto!important;height:auto!important;margin-left:145px!important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important}.carbonad-text{padding-top:0!important}.carbonad-tag{color:inherit!important;text-align:left!important}.carbonad-text a,.carbonad-tag a{color:#fff!important}.carbonad #azcarbon>img{display:none}@media (min-width:480px){.carbonad{width:330px!important;margin:20px auto!important;border-radius:4px;border-width:1px!important}.bs-docs-masthead .carbonad{margin:50px auto 0!important}}@media (min-width:768px){.carbonad{margin-left:0!important;margin-right:0!important}}@media (min-width:992px){.carbonad{position:absolute;top:0;right:15px;margin:0!important;padding:15px!important;width:330px!important}.bs-docs-masthead .carbonad{position:static}}.bs-docs-featurette{padding-top:40px;padding-bottom:40px;font-size:16px;line-height:1.5;color:#555;text-align:center;background-color:#fff;border-bottom:1px solid #e5e5e5}.bs-docs-featurette+.bs-docs-footer{margin-top:0;border-top:0}.bs-docs-featurette-title{font-size:30px;font-weight:400;color:#333;margin-bottom:5px}.half-rule{width:100px;margin:40px auto}.bs-docs-featurette h3{font-weight:400;color:#333;margin-bottom:5px}.bs-docs-featurette-img{display:block;margin-bottom:20px;color:#333}.bs-docs-featurette-img:hover{text-decoration:none;color:#428bca}.bs-docs-featurette-img img{display:block;margin-bottom:15px}.bs-docs-featured-sites{margin-left:-1px;margin-right:-1px}.bs-docs-featured-sites .col-sm-3{padding-left:1px;padding-right:1px}@media (min-width:480px){.bs-docs-featurette .img-responsive{margin-top:30px}}@media (min-width:768px){.bs-docs-featurette{padding-top:100px;padding-bottom:100px}.bs-docs-featurette-title{font-size:40px}.bs-docs-featurette .lead{margin-left:auto;margin-right:auto;max-width:80%}.bs-docs-featured-sites .col-sm-3:first-child img{border-top-left-radius:4px;border-bottom-left-radius:4px}.bs-docs-featured-sites .col-sm-3:last-child img{border-top-right-radius:4px;border-bottom-right-radius:4px}.bs-docs-featurette .img-responsive{margin-top:0}}.bs-docs-sidebar.affix{position:static}@media (min-width:768px){.bs-docs-sidebar{padding-left:20px}}.bs-docs-sidenav{margin-top:20px;margin-bottom:20px}.bs-docs-sidebar .nav>li>a{display:block;font-size:13px;font-weight:500;color:#999;padding:4px 20px}.bs-docs-sidebar .nav>li>a:hover,.bs-docs-sidebar .nav>li>a:focus{padding-left:19px;color:#563d7c;text-decoration:none;background-color:transparent;border-left:1px solid #563d7c}.bs-docs-sidebar .nav>.active>a,.bs-docs-sidebar .nav>.active:hover>a,.bs-docs-sidebar .nav>.active:focus>a{padding-left:18px;font-weight:700;color:#563d7c;background-color:transparent;border-left:2px solid #563d7c}.bs-docs-sidebar .nav .nav{display:none;padding-bottom:10px}.bs-docs-sidebar .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}.bs-docs-sidebar .nav .nav>li>a:hover,.bs-docs-sidebar .nav .nav>li>a:focus{padding-left:29px}.bs-docs-sidebar .nav .nav>.active>a,.bs-docs-sidebar .nav .nav>.active:hover>a,.bs-docs-sidebar .nav .nav>.active:focus>a{font-weight:500;padding-left:28px}.back-to-top{display:none;margin-top:10px;margin-left:10px;padding:4px 10px;font-size:12px;font-weight:500;color:#999}.back-to-top:hover{text-decoration:none;color:#563d7c}@media (min-width:768px){.back-to-top{display:block}}@media (min-width:992px){.bs-docs-sidebar .nav>.active>ul{display:block}.bs-docs-sidebar.affix,.bs-docs-sidebar.affix-bottom{width:213px}.bs-docs-sidebar.affix{position:fixed;top:20px}.bs-docs-sidebar.affix-bottom{position:absolute}.bs-docs-sidebar.affix-bottom .bs-docs-sidenav,.bs-docs-sidebar.affix .bs-docs-sidenav{margin-top:0;margin-bottom:0}}@media (min-width:1200px){.bs-docs-sidebar.affix-bottom,.bs-docs-sidebar.affix{width:263px}}.bs-docs-section{margin-bottom:60px}.bs-docs-section:last-child{margin-bottom:0}h1[id]{margin-top:0;padding-top:20px}.bs-callout{margin:20px 0;padding:20px;border-left:3px solid #eee}.bs-callout h4{margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{background-color:#fff;border-radius:3px}.bs-callout-danger{background-color:#fdf7f7;border-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{background-color:#fcf8f2;border-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{background-color:#f4f8fa;border-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:60px;height:60px;margin:0 5px;border-radius:3px}@media (min-width:768px){.color-swatch{width:100px;height:100px}}.color-swatches .gray-darker{background-color:#222}.color-swatches .gray-dark{background-color:#333}.color-swatches .gray{background-color:#555}.color-swatches .gray-light{background-color:#999}.color-swatches .gray-lighter{background-color:#eee}.color-swatches .brand-primary{background-color:#428bca}.color-swatches .brand-success{background-color:#5cb85c}.color-swatches .brand-warning{background-color:#f0ad4e}.color-swatches .brand-danger{background-color:#d9534f}.color-swatches .brand-info{background-color:#5bc0de}.color-swatches .bs-purple{background-color:#563d7c}.color-swatches .bs-purple-light{background-color:#c7bfd3}.color-swatches .bs-purple-lighter{background-color:#e5e1ea}.color-swatches .bs-gray{background-color:#f9f9f9}.bs-team .team-member{color:#555;line-height:32px}.bs-team .team-member:hover{color:#333;text-decoration:none}.bs-team .github-btn{float:right;margin-top:6px;width:180px;height:20px}.bs-team img{float:left;width:32px;margin-right:10px;border-radius:4px}.show-grid{margin-bottom:15px}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;background-color:#eee;background-color:rgba(86,61,124,.15);border:1px solid #ddd;border:1px solid rgba(86,61,124,.2)}.bs-example{position:relative;padding:45px 15px 15px;margin:0 -15px 15px;background-color:#fafafa;box-shadow:inset 0 3px 6px rgba(0,0,0,.05);border-color:#e5e5e5 #eee #eee;border-style:solid;border-width:1px 0}.bs-example:after{content:"Example";position:absolute;top:15px;left:15px;font-size:12px;font-weight:700;color:#bbb;text-transform:uppercase;letter-spacing:1px}.bs-example+.highlight{margin:-15px -15px 15px;border-radius:0;border-width:0 0 1px}@media (min-width:768px){.bs-example{margin-left:0;margin-right:0;background-color:#fff;border-width:1px;border-color:#ddd;border-radius:4px 4px 0 0;box-shadow:none}.bs-example+.highlight{margin-top:-16px;margin-left:0;margin-right:0;border-width:1px;border-bottom-left-radius:4px;border-bottom-right-radius:4px}}.bs-example .container{width:auto}.bs-example>p:last-child,.bs-example>ul:last-child,.bs-example>ol:last-child,.bs-example>blockquote:last-child,.bs-example>.form-control:last-child,.bs-example>.table:last-child,.bs-example>.navbar:last-child,.bs-example>.jumbotron:last-child,.bs-example>.alert:last-child,.bs-example>.panel:last-child,.bs-example>.list-group:last-child,.bs-example>.well:last-child,.bs-example>.progress:last-child,.bs-example>.table-responsive:last-child>.table{margin-bottom:0}.bs-example>p>.close{float:none}.bs-example-type .table .type-info{color:#999;vertical-align:middle}.bs-example-type .table td{padding:15px 0;border-color:#eee}.bs-example-type .table tr:first-child td{border-top:0}.bs-example-type h1,.bs-example-type h2,.bs-example-type h3,.bs-example-type h4,.bs-example-type h5,.bs-example-type h6{margin:0}.bs-example-bg-classes p{padding:15px}.bs-example>.img-circle,.bs-example>.img-rounded,.bs-example>.img-thumbnail{margin:5px}.bs-example>.table-responsive>.table{background-color:#fff}.bs-example>.btn,.bs-example>.btn-group{margin-top:5px;margin-bottom:5px}.bs-example>.btn-toolbar+.btn-toolbar{margin-top:10px}.bs-example-control-sizing select,.bs-example-control-sizing input[type=text]+input[type=text]{margin-top:10px}.bs-example-form .input-group{margin-bottom:10px}.bs-example>textarea.form-control{resize:vertical}.bs-example>.list-group{max-width:400px}.bs-example .navbar:last-child{margin-bottom:0}.bs-navbar-top-example,.bs-navbar-bottom-example{z-index:1;padding:0;overflow:hidden}.bs-navbar-top-example .navbar-header,.bs-navbar-bottom-example .navbar-header{margin-left:0}.bs-navbar-top-example .navbar-fixed-top,.bs-navbar-bottom-example .navbar-fixed-bottom{position:relative;margin-left:0;margin-right:0}.bs-navbar-top-example{padding-bottom:45px}.bs-navbar-top-example:after{top:auto;bottom:15px}.bs-navbar-top-example .navbar-fixed-top{top:-1px}.bs-navbar-bottom-example{padding-top:45px}.bs-navbar-bottom-example .navbar-fixed-bottom{bottom:-1px}.bs-navbar-bottom-example .navbar{margin-bottom:0}@media (min-width:768px){.bs-navbar-top-example .navbar-fixed-top,.bs-navbar-bottom-example .navbar-fixed-bottom{position:absolute}.bs-navbar-top-example{border-radius:0 0 4px 4px}.bs-navbar-bottom-example{border-radius:4px 4px 0 0}}.bs-example .pagination{margin-top:10px;margin-bottom:10px}.bs-example>.pager{margin-top:0}.bs-example-modal{background-color:#f5f5f5}.bs-example-modal .modal{position:relative;top:auto;right:auto;left:auto;bottom:auto;z-index:1;display:block}.bs-example-modal .modal-dialog{left:auto;margin-left:auto;margin-right:auto}.bs-example>.dropdown>.dropdown-menu{position:static;display:block;margin-bottom:5px}.bs-example-tabs .nav-tabs{margin-bottom:15px}.bs-example-tooltips{text-align:center}.bs-example-tooltips>.btn{margin-top:5px;margin-bottom:5px}.bs-example-popover{padding-bottom:24px;background-color:#f9f9f9}.bs-example-popover .popover{position:relative;display:block;float:left;width:260px;margin:20px}.scrollspy-example{position:relative;height:200px;margin-top:10px;overflow:auto}.highlight{padding:9px 14px;margin-bottom:14px;background-color:#f7f7f9;border:1px solid #e1e1e8;border-radius:4px}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0;white-space:nowrap}.highlight pre code{font-size:inherit;color:#333}.highlight pre .lineno{display:inline-block;width:22px;padding-right:5px;margin-right:10px;text-align:right;color:#bebec5}.table-responsive .highlight pre{white-space:normal}.bs-table th small,.responsive-utilities th small{display:block;font-weight:400;color:#999}.responsive-utilities tbody th{font-weight:400}.responsive-utilities td{text-align:center}.responsive-utilities td.is-visible{color:#468847;background-color:#dff0d8!important}.responsive-utilities td.is-hidden{color:#ccc;background-color:#f9f9f9!important}.responsive-utilities-test{margin-top:5px}.responsive-utilities-test .col-xs-6{margin-bottom:10px}.responsive-utilities-test span{display:block;padding:15px 10px;font-size:14px;font-weight:700;line-height:1.1;text-align:center;border-radius:4px}.visible-on .col-xs-6 .hidden-xs,.visible-on .col-xs-6 .hidden-sm,.visible-on .col-xs-6 .hidden-md,.visible-on .col-xs-6 .hidden-lg,.hidden-on .col-xs-6 .hidden-xs,.hidden-on .col-xs-6 .hidden-sm,.hidden-on .col-xs-6 .hidden-md,.hidden-on .col-xs-6 .hidden-lg{color:#999;border:1px solid #ddd}.visible-on .col-xs-6 .visible-xs,.visible-on .col-xs-6 .visible-sm,.visible-on .col-xs-6 .visible-md,.visible-on .col-xs-6 .visible-lg,.hidden-on .col-xs-6 .visible-xs,.hidden-on .col-xs-6 .visible-sm,.hidden-on .col-xs-6 .visible-md,.hidden-on .col-xs-6 .visible-lg{color:#468847;background-color:#dff0d8;border:1px solid #d6e9c6}.bs-glyphicons{margin:0 -19px 20px -16px;overflow:hidden}.bs-glyphicons-list{padding-left:0;list-style:none}.bs-glyphicons li{float:left;width:25%;height:115px;padding:10px;font-size:10px;line-height:1.4;text-align:center;border:1px solid #fff;background-color:#f9f9f9}.bs-glyphicons .glyphicon{margin-top:5px;margin-bottom:10px;font-size:24px}.bs-glyphicons .glyphicon-class{display:block;text-align:center;word-wrap:break-word}.bs-glyphicons li:hover{color:#fff;background-color:#563d7c}@media (min-width:768px){.bs-glyphicons{margin-left:0;margin-right:0}.bs-glyphicons li{width:12.5%;font-size:12px}}.bs-customizer .toggle{float:right;margin-top:25px}.bs-customizer label{margin-top:10px;font-weight:500;color:#555}.bs-customizer h2{margin-top:0;margin-bottom:5px;padding-top:30px}.bs-customizer h3{margin-bottom:0}.bs-customizer h4{margin-top:15px;margin-bottom:0}.bs-customizer .bs-callout h4{margin-top:0;margin-bottom:5px}.bs-customizer input[type=text]{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;background-color:#fafafa}.bs-customizer .help-block{font-size:12px;margin-bottom:5px}#less-section label{font-weight:400}.bs-customizer-input{float:left;width:33.333333%;padding-left:15px;padding-right:15px}.bs-customize-download .btn-outline{padding:20px}.bs-customizer-alert{position:fixed;top:0;left:0;right:0;z-index:1030;padding:15px 0;color:#fff;background-color:#d9534f;box-shadow:inset 0 1px 0 rgba(255,255,255,.25);border-bottom:1px solid #b94441}.bs-customizer-alert .close{margin-top:-4px;font-size:24px}.bs-customizer-alert p{margin-bottom:0}.bs-customizer-alert .glyphicon{margin-right:5px}.bs-customizer-alert pre{margin:10px 0 0;color:#fff;background-color:#a83c3a;border-color:#973634;box-shadow:inset 0 2px 4px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}.bs-brand-logos{display:table;width:100%;margin-bottom:15px;overflow:hidden;color:#563d7c;background-color:#f9f9f9;border-radius:4px}.bs-brand-item{padding:60px 0;text-align:center}.bs-brand-item+.bs-brand-item{border-top:1px solid #fff}.bs-brand-logos .inverse{color:#fff;background-color:#563d7c}.bs-brand-item h1,.bs-brand-item h3{margin-top:0;margin-bottom:0}.bs-brand-item .bs-docs-booticon{margin-left:auto;margin-right:auto}.bs-brand-item .glyphicon{width:30px;height:30px;margin:10px auto -10px;line-height:30px;color:#fff;border-radius:50%}.bs-brand-item .glyphicon-ok{background-color:#5cb85c}.bs-brand-item .glyphicon-remove{background-color:#d9534f}@media (min-width:768px){.bs-brand-item{display:table-cell;width:1%}.bs-brand-item+.bs-brand-item{border-top:0;border-left:1px solid #fff}.bs-brand-item h1{font-size:60px}}.bs-examples .thumbnail{margin-bottom:10px}.bs-examples h4{margin-bottom:5px}.bs-examples p{margin-bottom:20px}#focusedInput{border-color:#ccc;border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted \9;-moz-box-shadow:0 0 8px rgba(82,168,236,.6);box-shadow:0 0 8px rgba(82,168,236,.6)}.hll{background-color:#ffc}.c{color:#999}.err{color:#A00;background-color:#FAA}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1{color:#999}.cs{color:#999}.gd{background-color:#FCC;border:1px solid #C00}.ge{font-style:italic}.gr{color:red}.gh{color:#030}.gi{background-color:#CFC;border:1px solid #0C0}.go{color:#AAA}.gp{color:#009}.gu{color:#030}.gt{color:#9C6}.kc{color:#069}.kd{color:#069}.kn{color:#069}.kp{color:#069}.kr{color:#069}.kt{color:#078}.m{color:#F60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0A8}.no{color:#360}.nd{color:#99F}.ni{color:#999}.ne{color:#C00}.nf{color:#C0F}.nl{color:#99F}.nn{color:#0CF}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf{color:#F60}.mh{color:#F60}.mi{color:#F60}.mo{color:#F60}.sb{color:#C30}.sc{color:#C30}.sd{color:#C30;font-style:italic}.s2{color:#C30}.se{color:#C30}.sh{color:#C30}.si{color:#A00}.sx{color:#C30}.sr{color:#3AA}.s1{color:#C30}.ss{color:#FC3}.bp{color:#366}.vc{color:#033}.vg{color:#033}.vi{color:#033}.il{color:#F60}.css .o,.css .o+.nt,.css .nt+.nt{color:#999} -------------------------------------------------------------------------------- /less/variables.less: -------------------------------------------------------------------------------- 1 | // 2 | // Variables 3 | // -------------------------------------------------- 4 | 5 | 6 | //== Colors 7 | // 8 | //## Gray and brand colors for use across Bootstrap. 9 | 10 | @gray-darker: lighten(#000, 13.5%); // #222 11 | @gray-dark: lighten(#000, 20%); // #333 12 | @gray: lighten(#000, 33.5%); // #555 13 | @gray-light: lighten(#000, 60%); // #999 14 | @gray-lighter: lighten(#000, 93.5%); // #eee 15 | 16 | @brand-primary: #4183c4; 17 | @brand-success: #5cb85c; 18 | @brand-info: #5bc0de; 19 | @brand-warning: #f0ad4e; 20 | @brand-danger: #d9534f; 21 | 22 | 23 | //== Scaffolding 24 | // 25 | // ## Settings for some of the most global styles. 26 | 27 | //** Background color for ``. 28 | @body-bg: #fff; 29 | //** Global text color on ``. 30 | @text-color: @gray-dark; 31 | 32 | //** Global textual link color. 33 | @link-color: @brand-primary; 34 | //** Link hover color set via `darken()` function. 35 | @link-hover-color: darken(@link-color, 15%); 36 | 37 | 38 | //== Typography 39 | // 40 | //## Font, line-height, and color for body text, headings, and more. 41 | 42 | @font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; 43 | @font-family-serif: Georgia, "Times New Roman", Times, serif; 44 | //** Default monospace fonts for ``, ``, and `
`.
 45 | @font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
 46 | @font-family-base:        @font-family-sans-serif;
 47 | 
 48 | @font-size-base:          13px;
 49 | @font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
 50 | @font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
 51 | 
 52 | @font-size-h1:            floor((@font-size-base * 2.6)); // ~36px
 53 | @font-size-h2:            floor((@font-size-base * 2.15)); // ~30px
 54 | @font-size-h3:            ceil((@font-size-base * 1.7)); // ~24px
 55 | @font-size-h4:            ceil((@font-size-base * 1.25)); // ~18px
 56 | @font-size-h5:            @font-size-base;
 57 | @font-size-h6:            ceil((@font-size-base * 0.85)); // ~12px
 58 | 
 59 | //** Unit-less `line-height` for use in components like buttons.
 60 | @line-height-base:        1.461538461538462; // 19/13
 61 | //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
 62 | @line-height-computed:    floor(@font-size-base * @line-height-base); // ~20px
 63 | 
 64 | //** By default, this inherits from the ``.
 65 | @headings-font-family:    inherit;
 66 | @headings-font-weight:    500;
 67 | @headings-line-height:    1.1;
 68 | @headings-color:          inherit;
 69 | 
 70 | 
 71 | //-- Iconography
 72 | //
 73 | //## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
 74 | 
 75 | @icon-font-path:          "../fonts/";
 76 | @icon-font-name:          "glyphicons-halflings-regular";
 77 | @icon-font-svg-id:        "glyphicons_halflingsregular";
 78 | 
 79 | //== Components
 80 | //
 81 | //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
 82 | 
 83 | @padding-base-vertical:          3px;
 84 | @padding-base-horizontal:        8px;
 85 | 
 86 | @padding-large-vertical:         4px;
 87 | @padding-large-horizontal:       10px;
 88 | 
 89 | @padding-small-vertical:         2px;
 90 | @padding-small-horizontal:       6px;
 91 | 
 92 | @padding-xs-vertical:            1px;
 93 | @padding-xs-horizontal:          5px;
 94 | 
 95 | @line-height-large:              1.33;
 96 | @line-height-small:              1.5;
 97 | 
 98 | @border-radius-base:             3px;
 99 | @border-radius-large:            4px;
100 | @border-radius-small:            2px;
101 | 
102 | //** Global color for active items (e.g., navs or dropdowns).
103 | @component-active-color:         #fff;
104 | //** Global background color for active items (e.g., navs or dropdowns).
105 | @component-active-bg:            @brand-primary;
106 | 
107 | //** Width of the `border` for generating carets that indicator dropdowns.
108 | @caret-width-base:               4px;
109 | //** Carets increase slightly in size for larger components.
110 | @caret-width-large:              5px;
111 | 
112 | 
113 | //== Tables
114 | //
115 | //## Customizes the `.table` component with basic values, each used across all table variations.
116 | 
117 | //** Padding for ``s and ``s.
118 | @table-cell-padding:                 5px;
119 | //** Padding for cells in `.table-condensed`.
120 | @table-condensed-cell-padding:       3px;
121 | 
122 | //** Default background color used for all tables.
123 | @table-bg:                      transparent;
124 | //** Background color used for `.table-striped`.
125 | @table-bg-accent:               #f9f9f9;
126 | //** Background color used for `.table-hover`.
127 | @table-bg-hover:                     #f5f5f5;
128 | @table-bg-active:                    @table-bg-hover;
129 | 
130 | //** Border color for table and cell borders.
131 | @table-border-color:            #ddd;
132 | 
133 | 
134 | //== Buttons
135 | //
136 | //## For each of Bootstrap's buttons, define text, background and border color.
137 | 
138 | @btn-font-weight:                bold;
139 | 
140 | @btn-default-color:              #333;
141 | @btn-default-bg:                 #fff;
142 | @btn-default-border:             #ccc;
143 | 
144 | @btn-primary-color:              #fff;
145 | @btn-primary-bg:                 @brand-primary;
146 | @btn-primary-border:             darken(@btn-primary-bg, 5%);
147 | 
148 | @btn-success-color:              #fff;
149 | @btn-success-bg:                 @brand-success;
150 | @btn-success-border:             darken(@btn-success-bg, 5%);
151 | 
152 | @btn-info-color:                 #fff;
153 | @btn-info-bg:                    @brand-info;
154 | @btn-info-border:                darken(@btn-info-bg, 5%);
155 | 
156 | @btn-warning-color:              #fff;
157 | @btn-warning-bg:                 @brand-warning;
158 | @btn-warning-border:             darken(@btn-warning-bg, 5%);
159 | 
160 | @btn-danger-color:               #fff;
161 | @btn-danger-bg:                  @brand-danger;
162 | @btn-danger-border:              darken(@btn-danger-bg, 5%);
163 | 
164 | @btn-link-disabled-color:        @gray-light;
165 | 
166 | 
167 | //== Forms
168 | //
169 | //##
170 | 
171 | //** `` background color
172 | @input-bg:                       #fff;
173 | //** `` background color
174 | @input-bg-disabled:              @gray-lighter;
175 | 
176 | //** Text color for ``s
177 | @input-color:                    @gray;
178 | //** `` border color
179 | @input-border:                   #ccc;
180 | //** `` border radius
181 | @input-border-radius:            @border-radius-base;
182 | //** Border color for inputs on focus
183 | @input-border-focus:             #66afe9;
184 | 
185 | //** Placeholder text color
186 | @input-color-placeholder:        @gray-light;
187 | 
188 | //@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) - 0);
189 | //@input-height-large:             (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) - 1);
190 | //@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) - 0);
191 | 
192 | //** Default `.form-control` height
193 | //@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
194 | //** Large `.form-control` height
195 | //@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
196 | //** Small `.form-control` height
197 | //@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
198 | 
199 | //** Default `.form-control` height
200 | @input-height-base:              26px;
201 | //** Large `.form-control` height
202 | @input-height-large:             34px;
203 | //** Small `.form-control` height
204 | @input-height-small:             24px;
205 | 
206 | @legend-color:                   @gray-dark;
207 | @legend-border-color:            #e5e5e5;
208 | 
209 | //** Background color for textual input addons
210 | @input-group-addon-bg:           @gray-lighter;
211 | //** Border color for textual input addons
212 | @input-group-addon-border-color: @input-border;
213 | 
214 | 
215 | //== Dropdowns
216 | //
217 | //## Dropdown menu container and contents.
218 | 
219 | //** Background for the dropdown menu.
220 | @dropdown-bg:                    #fff;
221 | //** Dropdown menu `border-color`.
222 | @dropdown-border:                rgba(0,0,0,.15);
223 | //** Dropdown menu `border-color` **for IE8**.
224 | @dropdown-fallback-border:       #ccc;
225 | //** Divider color for between dropdown items.
226 | @dropdown-divider-bg:            #e5e5e5;
227 | 
228 | //** Dropdown link text color.
229 | @dropdown-link-color:            @gray-dark;
230 | //** Hover color for dropdown links.
231 | @dropdown-link-hover-color:      darken(@gray-dark, 5%);
232 | //** Hover background for dropdown links.
233 | @dropdown-link-hover-bg:         #f5f5f5;
234 | 
235 | //** Active dropdown menu item text color.
236 | @dropdown-link-active-color:     @component-active-color;
237 | //** Active dropdown menu item background color.
238 | @dropdown-link-active-bg:        @component-active-bg;
239 | 
240 | //** Disabled dropdown menu item background color.
241 | @dropdown-link-disabled-color:   @gray-light;
242 | 
243 | //** Text color for headers within dropdown menus.
244 | @dropdown-header-color:          @gray-light;
245 | 
246 | // Note: Deprecated @dropdown-caret-color as of v3.1.0
247 | @dropdown-caret-color:           #000;
248 | 
249 | 
250 | //-- Z-index master list
251 | //
252 | // Warning: Avoid customizing these values. They're used for a bird's eye view
253 | // of components dependent on the z-axis and are designed to all work together.
254 | //
255 | // Note: These variables are not generated into the Customizer.
256 | 
257 | @zindex-navbar:            1000;
258 | @zindex-dropdown:          1000;
259 | @zindex-popover:           1010;
260 | @zindex-tooltip:           1030;
261 | @zindex-navbar-fixed:      1030;
262 | @zindex-modal-background:  1040;
263 | @zindex-modal:             1050;
264 | 
265 | 
266 | //== Media queries breakpoints
267 | //
268 | //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
269 | 
270 | // Extra small screen / phone
271 | // Note: Deprecated @screen-xs and @screen-phone as of v3.0.1
272 | @screen-xs:                  480px;
273 | @screen-xs-min:              @screen-xs;
274 | @screen-phone:               @screen-xs-min;
275 | 
276 | // Small screen / tablet
277 | // Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1
278 | @screen-sm:                  768px;
279 | @screen-sm-min:              @screen-sm;
280 | @screen-tablet:              @screen-sm-min;
281 | 
282 | // Medium screen / desktop
283 | // Note: Deprecated @screen-md and @screen-desktop as of v3.0.1
284 | @screen-md:                  992px;
285 | @screen-md-min:              @screen-md;
286 | @screen-desktop:             @screen-md-min;
287 | 
288 | // Large screen / wide desktop
289 | // Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1
290 | @screen-lg:                  1200px;
291 | @screen-lg-min:              @screen-lg;
292 | @screen-lg-desktop:          @screen-lg-min;
293 | 
294 | // So media queries don't overlap when required, provide a maximum
295 | @screen-xs-max:              (@screen-sm-min - 1);
296 | @screen-sm-max:              (@screen-md-min - 1);
297 | @screen-md-max:              (@screen-lg-min - 1);
298 | 
299 | 
300 | //== Grid system
301 | //
302 | //## Define your custom responsive grid.
303 | 
304 | //** Number of columns in the grid.
305 | @grid-columns:              12;
306 | //** Padding between columns. Gets divided in half for the left and right.
307 | @grid-gutter-width:         30px;
308 | // Navbar collapse
309 | //** Point at which the navbar becomes uncollapsed.
310 | @grid-float-breakpoint:     @screen-sm-min;
311 | //** Point at which the navbar begins collapsing.
312 | @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
313 | 
314 | 
315 | //== Container sizes
316 | //
317 | //## Define the maximum width of `.container` for different screen sizes.
318 | 
319 | // Small screen / tablet
320 | @container-tablet:             ((720px + @grid-gutter-width));
321 | //** For `@screen-sm-min` and up.
322 | @container-sm:                 @container-tablet;
323 | 
324 | // Medium screen / desktop
325 | @container-desktop:            ((940px + @grid-gutter-width));
326 | //** For `@screen-md-min` and up.
327 | @container-md:                 @container-desktop;
328 | 
329 | // Large screen / wide desktop
330 | @container-large-desktop:      ((1140px + @grid-gutter-width));
331 | //** For `@screen-lg-min` and up.
332 | @container-lg:                 @container-large-desktop;
333 | 
334 | 
335 | //== Navbar
336 | //
337 | //##
338 | 
339 | // Basics of a navbar
340 | @navbar-height:                    50px;
341 | @navbar-margin-bottom:             @line-height-computed;
342 | @navbar-border-radius:             @border-radius-base;
343 | @navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
344 | @navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
345 | @navbar-collapse-max-height:       340px;
346 | 
347 | @navbar-default-color:             #777;
348 | @navbar-default-bg:                #f8f8f8;
349 | @navbar-default-border:            darken(@navbar-default-bg, 6.5%);
350 | 
351 | // Navbar links
352 | @navbar-default-link-color:                #777;
353 | @navbar-default-link-hover-color:          #333;
354 | @navbar-default-link-hover-bg:             transparent;
355 | @navbar-default-link-active-color:         #555;
356 | @navbar-default-link-active-bg:            darken(@navbar-default-bg, 6.5%);
357 | @navbar-default-link-disabled-color:       #ccc;
358 | @navbar-default-link-disabled-bg:          transparent;
359 | 
360 | // Navbar brand label
361 | @navbar-default-brand-color:               @navbar-default-link-color;
362 | @navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
363 | @navbar-default-brand-hover-bg:            transparent;
364 | 
365 | // Navbar toggle
366 | @navbar-default-toggle-hover-bg:           #ddd;
367 | @navbar-default-toggle-icon-bar-bg:        #888;
368 | @navbar-default-toggle-border-color:       #ddd;
369 | 
370 | 
371 | // Inverted navbar
372 | // Reset inverted navbar basics
373 | @navbar-inverse-color:                      @gray-light;
374 | @navbar-inverse-bg:                         #222;
375 | @navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
376 | 
377 | // Inverted navbar links
378 | @navbar-inverse-link-color:                 @gray-light;
379 | @navbar-inverse-link-hover-color:           #fff;
380 | @navbar-inverse-link-hover-bg:              transparent;
381 | @navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
382 | @navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
383 | @navbar-inverse-link-disabled-color:        #444;
384 | @navbar-inverse-link-disabled-bg:           transparent;
385 | 
386 | // Inverted navbar brand label
387 | @navbar-inverse-brand-color:                @navbar-inverse-link-color;
388 | @navbar-inverse-brand-hover-color:          #fff;
389 | @navbar-inverse-brand-hover-bg:             transparent;
390 | 
391 | // Inverted navbar toggle
392 | @navbar-inverse-toggle-hover-bg:            #333;
393 | @navbar-inverse-toggle-icon-bar-bg:         #fff;
394 | @navbar-inverse-toggle-border-color:        #333;
395 | 
396 | 
397 | //== Navs
398 | //
399 | //##
400 | 
401 | //=== Shared nav styles
402 | @nav-link-padding:                          10px 15px;
403 | @nav-link-hover-bg:                         @gray-lighter;
404 | 
405 | @nav-disabled-link-color:                   @gray-light;
406 | @nav-disabled-link-hover-color:             @gray-light;
407 | 
408 | @nav-open-link-hover-color:                 #fff;
409 | 
410 | //== Tabs
411 | @nav-tabs-border-color:                     #ddd;
412 | 
413 | @nav-tabs-link-hover-border-color:          @gray-lighter;
414 | 
415 | @nav-tabs-active-link-hover-bg:             @body-bg;
416 | @nav-tabs-active-link-hover-color:          @gray;
417 | @nav-tabs-active-link-hover-border-color:   #ddd;
418 | 
419 | @nav-tabs-justified-link-border-color:            #ddd;
420 | @nav-tabs-justified-active-link-border-color:     @body-bg;
421 | 
422 | //== Pills
423 | @nav-pills-border-radius:                   @border-radius-base;
424 | @nav-pills-active-link-hover-bg:            @component-active-bg;
425 | @nav-pills-active-link-hover-color:         @component-active-color;
426 | 
427 | 
428 | //== Pagination
429 | //
430 | //##
431 | 
432 | @pagination-color:                     @link-color;
433 | @pagination-bg:                        #fff;
434 | @pagination-border:                    #ddd;
435 | 
436 | @pagination-hover-color:               @link-hover-color;
437 | @pagination-hover-bg:                  @gray-lighter;
438 | @pagination-hover-border:              #ddd;
439 | 
440 | @pagination-active-color:              #fff;
441 | @pagination-active-bg:                 @brand-primary;
442 | @pagination-active-border:             @brand-primary;
443 | 
444 | @pagination-disabled-color:            @gray-light;
445 | @pagination-disabled-bg:               #fff;
446 | @pagination-disabled-border:           #ddd;
447 | 
448 | 
449 | //== Pager
450 | //
451 | //##
452 | 
453 | @pager-bg:                             @pagination-bg;
454 | @pager-border:                         @pagination-border;
455 | @pager-border-radius:                  15px;
456 | 
457 | @pager-hover-bg:                       @pagination-hover-bg;
458 | 
459 | @pager-active-bg:                      @pagination-active-bg;
460 | @pager-active-color:                   @pagination-active-color;
461 | 
462 | @pager-disabled-color:                 @pagination-disabled-color;
463 | 
464 | 
465 | //== Jumbotron
466 | //
467 | //##
468 | 
469 | @jumbotron-padding:              30px;
470 | @jumbotron-color:                inherit;
471 | @jumbotron-bg:                   @gray-lighter;
472 | @jumbotron-heading-color:        inherit;
473 | @jumbotron-font-size:            ceil((@font-size-base * 1.5));
474 | 
475 | 
476 | //== Form states and alerts
477 | //
478 | //## Define colors for form feedback states and, by default, alerts.
479 | 
480 | @state-success-text:             #468847;
481 | @state-success-text-bright:      #02a100;
482 | @state-success-bg:               #dff0d8;
483 | @state-success-border:           darken(spin(@state-success-bg, -10), 5%);
484 | 
485 | @state-info-text:                #3a87ad;
486 | @state-info-text-bright:         #3a87ad;
487 | @state-info-bg:                  #d9edf7;
488 | @state-info-border:              darken(spin(@state-info-bg, -10), 7%);
489 | 
490 | @state-warning-text:             #c09853;
491 | @state-warning-text-bright:      #cc7600;
492 | @state-warning-bg:               #fcf8e3;
493 | @state-warning-border:           darken(spin(@state-warning-bg, -10), 3%);
494 | 
495 | @state-danger-text:              #b94a48;
496 | @state-danger-text-bright:       #da3727;
497 | @state-danger-bg:                #f2dede;
498 | @state-danger-border:            darken(spin(@state-danger-bg, -10), 3%);
499 | 
500 | 
501 | //== Tooltips
502 | //
503 | //##
504 | 
505 | //** Tooltip max width
506 | @tooltip-max-width:           200px;
507 | //** Tooltip text color
508 | @tooltip-color:               #fff;
509 | //** Tooltip background color
510 | @tooltip-bg:                  #000;
511 | @tooltip-opacity:             .9;
512 | 
513 | //** Tooltip arrow width
514 | @tooltip-arrow-width:         5px;
515 | //** Tooltip arrow color
516 | @tooltip-arrow-color:         @tooltip-bg;
517 | 
518 | 
519 | //== Popovers
520 | //
521 | //##
522 | 
523 | //** Popover body background color
524 | @popover-bg:                          #fff;
525 | //** Popover maximum width
526 | @popover-max-width:                   276px;
527 | //** Popover border color
528 | @popover-border-color:                rgba(0,0,0,.2);
529 | //** Popover fallback border color
530 | @popover-fallback-border-color:       #ccc;
531 | 
532 | //** Popover title background color
533 | @popover-title-bg:                    darken(@popover-bg, 3%);
534 | 
535 | //** Popover arrow width
536 | @popover-arrow-width:                 10px;
537 | //** Popover arrow color
538 | @popover-arrow-color:                 #fff;
539 | 
540 | //** Popover outer arrow width
541 | @popover-arrow-outer-width:           (@popover-arrow-width + 1);
542 | //** Popover outer arrow color
543 | @popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
544 | //** Popover outer arrow fallback color
545 | @popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
546 | 
547 | 
548 | //== Labels
549 | //
550 | //##
551 | 
552 | //** Default label background color
553 | @label-default-bg:            @gray-light;
554 | //** Primary label background color
555 | @label-primary-bg:            @brand-primary;
556 | //** Success label background color
557 | @label-success-bg:            @brand-success;
558 | //** Info label background color
559 | @label-info-bg:               @brand-info;
560 | //** Warning label background color
561 | @label-warning-bg:            @brand-warning;
562 | //** Danger label background color
563 | @label-danger-bg:             @brand-danger;
564 | 
565 | //** Default label text color
566 | @label-color:                 #fff;
567 | //** Default text color of a linked label
568 | @label-link-hover-color:      #fff;
569 | 
570 | 
571 | //== Modals
572 | //
573 | //##
574 | 
575 | //** Padding applied to the modal body
576 | @modal-inner-padding:         20px;
577 | 
578 | //** Padding applied to the modal title
579 | @modal-title-padding:         15px;
580 | //** Modal title line-height
581 | @modal-title-line-height:     @line-height-base;
582 | 
583 | //** Background color of modal content area
584 | @modal-content-bg:                             #fff;
585 | //** Modal content border color
586 | @modal-content-border-color:                   rgba(0,0,0,.2);
587 | //** Modal content border color **for IE8**
588 | @modal-content-fallback-border-color:          #999;
589 | 
590 | //** Modal backdrop background color
591 | @modal-backdrop-bg:           #000;
592 | //** Modal backdrop opacity
593 | @modal-backdrop-opacity:      .5;
594 | //** Modal header border color
595 | @modal-header-border-color:   #e5e5e5;
596 | //** Modal footer border color
597 | @modal-footer-border-color:   @modal-header-border-color;
598 | 
599 | @modal-lg:                    900px;
600 | @modal-md:                    600px;
601 | @modal-sm:                    300px;
602 | 
603 | 
604 | //== Alerts
605 | //
606 | //## Define alert colors, border radius, and padding.
607 | 
608 | @alert-padding:               15px;
609 | @alert-border-radius:         @border-radius-base;
610 | @alert-link-font-weight:      bold;
611 | 
612 | @alert-success-bg:            @state-success-bg;
613 | @alert-success-text:          @state-success-text;
614 | @alert-success-border:        @state-success-border;
615 | 
616 | @alert-info-bg:               @state-info-bg;
617 | @alert-info-text:             @state-info-text;
618 | @alert-info-border:           @state-info-border;
619 | 
620 | @alert-warning-bg:            @state-warning-bg;
621 | @alert-warning-text:          @state-warning-text;
622 | @alert-warning-border:        @state-warning-border;
623 | 
624 | @alert-danger-bg:             @state-danger-bg;
625 | @alert-danger-text:           @state-danger-text;
626 | @alert-danger-border:         @state-danger-border;
627 | 
628 | 
629 | //== Progress bars
630 | //
631 | //##
632 | 
633 | //** Background color of the whole progress component
634 | @progress-bg:                 #f5f5f5;
635 | //** Progress bar text color
636 | @progress-bar-color:          #fff;
637 | 
638 | //** Default progress bar color
639 | @progress-bar-bg:             @brand-primary;
640 | //** Success progress bar color
641 | @progress-bar-success-bg:     @brand-success;
642 | //** Warning progress bar color
643 | @progress-bar-warning-bg:     @brand-warning;
644 | //** Danger progress bar color
645 | @progress-bar-danger-bg:      @brand-danger;
646 | //** Info progress bar color
647 | @progress-bar-info-bg:        @brand-info;
648 | 
649 | 
650 | //== List group
651 | //
652 | //##
653 | 
654 | //** Background color on `.list-group-item`
655 | @list-group-bg:               #fff;
656 | //** `.list-group-item` border color
657 | @list-group-border:           #ddd;
658 | //** List group border radius
659 | @list-group-border-radius:    @border-radius-base;
660 | 
661 | //** Background color of single list elements on hover
662 | @list-group-hover-bg:         #f5f5f5;
663 | //** Text color of active list elements
664 | @list-group-active-color:     @component-active-color;
665 | //** Background color of active list elements
666 | @list-group-active-bg:        @component-active-bg;
667 | //** Border color of active list elements
668 | @list-group-active-border:    @list-group-active-bg;
669 | @list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
670 | 
671 | @list-group-link-color:          #555;
672 | @list-group-link-heading-color:  #333;
673 | 
674 | 
675 | //== Panels
676 | //
677 | //##
678 | 
679 | @panel-bg:                    #fff;
680 | @panel-body-padding:          15px;
681 | @panel-border-radius:         @border-radius-base;
682 | 
683 | //** Border color for elements within panels
684 | @panel-inner-border:          #ddd;
685 | @panel-footer-bg:             #f5f5f5;
686 | 
687 | @panel-default-text:          @gray-dark;
688 | @panel-default-border:        #ddd;
689 | @panel-default-heading-bg:    #f5f5f5;
690 | 
691 | @panel-primary-text:          @gray-dark;
692 | @panel-primary-border:        @brand-primary;
693 | @panel-primary-heading-bg:    @brand-primary;
694 | 
695 | @panel-success-text:          @state-success-text;
696 | @panel-success-border:        @state-success-border;
697 | @panel-success-heading-bg:    @state-success-bg;
698 | 
699 | @panel-info-text:             @state-info-text;
700 | @panel-info-border:           @state-info-border;
701 | @panel-info-heading-bg:       @state-info-bg;
702 | 
703 | @panel-warning-text:          @state-warning-text;
704 | @panel-warning-border:        @state-warning-border;
705 | @panel-warning-heading-bg:    @state-warning-bg;
706 | 
707 | @panel-danger-text:           @state-danger-text;
708 | @panel-danger-border:         @state-danger-border;
709 | @panel-danger-heading-bg:     @state-danger-bg;
710 | 
711 | 
712 | //== Thumbnails
713 | //
714 | //##
715 | 
716 | //** Padding around the thumbnail image
717 | @thumbnail-padding:           4px;
718 | //** Thumbnail background color
719 | @thumbnail-bg:                @body-bg;
720 | //** Thumbnail border color
721 | @thumbnail-border:            #ddd;
722 | //** Thumbnail border radius
723 | @thumbnail-border-radius:     @border-radius-base;
724 | 
725 | //** Custom text color for thumbnail captions
726 | @thumbnail-caption-color:     @text-color;
727 | //** Padding around the thumbnail caption
728 | @thumbnail-caption-padding:   9px;
729 | 
730 | 
731 | //== Wells
732 | //
733 | //##
734 | 
735 | @well-bg:                     #f5f5f5;
736 | @well-border:                 darken(@well-bg, 7%);
737 | 
738 | 
739 | //== Badges
740 | //
741 | //##
742 | 
743 | @badge-color:                 #fff;
744 | //** Linked badge text color on hover
745 | @badge-link-hover-color:      #fff;
746 | @badge-bg:                    @gray-light;
747 | 
748 | //** Badge text color in active nav link
749 | @badge-active-color:          @link-color;
750 | //** Badge background color in active nav link
751 | @badge-active-bg:             #fff;
752 | 
753 | @badge-font-weight:           bold;
754 | @badge-line-height:           1;
755 | @badge-border-radius:         10px;
756 | 
757 | 
758 | //== Breadcrumbs
759 | //
760 | //##
761 | 
762 | @breadcrumb-padding-vertical:   8px;
763 | @breadcrumb-padding-horizontal: 15px;
764 | //** Breadcrumb background color
765 | @breadcrumb-bg:               #f5f5f5;
766 | //** Breadcrumb text color
767 | @breadcrumb-color:            #ccc;
768 | //** Text color of current page in the breadcrumb
769 | @breadcrumb-active-color:     @gray-light;
770 | //** Textual separator for between breadcrumb elements
771 | @breadcrumb-separator:        "/";
772 | 
773 | 
774 | //== Carousel
775 | //
776 | //##
777 | 
778 | @carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
779 | 
780 | @carousel-control-color:                      #fff;
781 | @carousel-control-width:                      15%;
782 | @carousel-control-opacity:                    .5;
783 | @carousel-control-font-size:                  20px;
784 | 
785 | @carousel-indicator-active-bg:                #fff;
786 | @carousel-indicator-border-color:             #fff;
787 | 
788 | @carousel-caption-color:                      #fff;
789 | 
790 | 
791 | //== Close
792 | //
793 | //##
794 | 
795 | @close-font-weight:           bold;
796 | @close-color:                 #000;
797 | @close-text-shadow:           0 1px 0 #fff;
798 | 
799 | 
800 | //== Code
801 | //
802 | //##
803 | 
804 | @code-color:                  #c7254e;
805 | @code-bg:                     #f9f2f4;
806 | 
807 | @kbd-color:                   #fff;
808 | @kbd-bg:                      #333;
809 | 
810 | @pre-bg:                      #f5f5f5;
811 | @pre-color:                   @gray-dark;
812 | @pre-border-color:            #ccc;
813 | @pre-scrollable-max-height:   340px;
814 | 
815 | 
816 | //== Type
817 | //
818 | //##
819 | 
820 | //** Text muted color
821 | @text-muted:                  @gray-light;
822 | //** Abbreviations and acronyms border color
823 | @abbr-border-color:           @gray-light;
824 | //** Headings small color
825 | @headings-small-color:        @gray-light;
826 | //** Blockquote small color
827 | @blockquote-small-color:      @gray-light;
828 | //** Blockquote font size
829 | @blockquote-font-size:        (@font-size-base * 1.25);
830 | //** Blockquote border color
831 | @blockquote-border-color:     @gray-lighter;
832 | //** Page header border color
833 | @page-header-border-color:    @gray-lighter;
834 | 
835 | 
836 | //== Miscellaneous
837 | //
838 | //##
839 | 
840 | //** Horizontal line color.
841 | @hr-border:                   @gray-lighter;
842 | 
843 | //** Horizontal offset for forms and lists.
844 | @component-offset-horizontal: 180px;
845 | 


--------------------------------------------------------------------------------
/dist/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 |  * Bootstrap v3.1.1 (http://getbootstrap.com)
3 |  * Copyright 2011-2014 Twitter, Inc.
4 |  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 |  */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.1.1",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.1.1",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};c.VERSION="3.1.1",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(".item"),this.$items.index(this.$active)},c.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")}));var l=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(l)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(l)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),(h=e.attr("data-slide-to"))&&f.data("bs.carousel").to(h),c.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.1.1",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(b){return b&&b.target!=this.$element[0]?void this.$element.one(a.support.transition.end,a.proxy(g,this)):(this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,void this.$element.off(a.support.transition.end+".bs.collapse").trigger("shown.bs.collapse"))};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.on(a.support.transition.end+".bs.collapse",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(b){return b&&b.target!=this.$element[0]?void this.$element.one(a.support.transition.end,a.proxy(d,this)):(this.transitioning=0,void this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.1.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('