compass_twitter_bootstrap 2.0.3 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/README.md +41 -7
- data/build/convert.rb +27 -11
- data/lib/compass_twitter_bootstrap/version.rb +1 -1
- data/stylesheets/_compass_twitter_bootstrap.scss +2 -1
- data/stylesheets/_compass_twitter_bootstrap_awesome.scss +1 -1
- data/stylesheets/_compass_twitter_bootstrap_responsive.scss +1 -1
- data/stylesheets/compass_twitter_bootstrap/_accordion.scss +4 -3
- data/stylesheets/compass_twitter_bootstrap/_alerts.scss +31 -10
- data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +14 -14
- data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +91 -55
- data/stylesheets/compass_twitter_bootstrap/_buttons.scss +126 -84
- data/stylesheets/compass_twitter_bootstrap/_carousel.scss +33 -23
- data/stylesheets/compass_twitter_bootstrap/_close.scss +7 -5
- data/stylesheets/compass_twitter_bootstrap/_code.scss +12 -8
- data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +9 -7
- data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +112 -22
- data/stylesheets/compass_twitter_bootstrap/_font-awesome.scss +258 -196
- data/stylesheets/compass_twitter_bootstrap/_forms.scss +262 -161
- data/stylesheets/compass_twitter_bootstrap/_grid.scss +18 -2
- data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +11 -8
- data/stylesheets/compass_twitter_bootstrap/_labels-badges.scss +42 -26
- data/stylesheets/compass_twitter_bootstrap/_layouts.scss +3 -4
- data/stylesheets/compass_twitter_bootstrap/_media.scss +55 -0
- data/stylesheets/compass_twitter_bootstrap/_mixins.scss +243 -189
- data/stylesheets/compass_twitter_bootstrap/_modals.scss +28 -23
- data/stylesheets/compass_twitter_bootstrap/_navbar.scss +269 -143
- data/stylesheets/compass_twitter_bootstrap/_navs.scss +59 -46
- data/stylesheets/compass_twitter_bootstrap/_pager.scss +17 -12
- data/stylesheets/compass_twitter_bootstrap/_pagination.scss +92 -27
- data/stylesheets/compass_twitter_bootstrap/_popovers.scss +116 -36
- data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +35 -30
- data/stylesheets/compass_twitter_bootstrap/_reset.scss +101 -11
- data/stylesheets/compass_twitter_bootstrap/_responsive-1200px-min.scss +9 -7
- data/stylesheets/compass_twitter_bootstrap/_responsive-767px-max.scss +115 -71
- data/stylesheets/compass_twitter_bootstrap/_responsive-768px-979px.scss +8 -6
- data/stylesheets/compass_twitter_bootstrap/_responsive-navbar.scss +53 -14
- data/stylesheets/compass_twitter_bootstrap/_responsive-utilities.scss +17 -15
- data/stylesheets/compass_twitter_bootstrap/_responsive.scss +48 -0
- data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +27 -4
- data/stylesheets/compass_twitter_bootstrap/_sprites.scss +24 -22
- data/stylesheets/compass_twitter_bootstrap/_tables.scss +122 -61
- data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +12 -7
- data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +50 -15
- data/stylesheets/compass_twitter_bootstrap/_type.scss +93 -93
- data/stylesheets/compass_twitter_bootstrap/_utilities.scss +9 -2
- data/stylesheets/compass_twitter_bootstrap/_variables.scss +134 -38
- data/stylesheets/compass_twitter_bootstrap/_wells.scss +11 -10
- data/stylesheets_sass/_compass_twitter_bootstrap.sass +2 -1
- data/stylesheets_sass/_compass_twitter_bootstrap_awesome.sass +1 -1
- data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +1 -1
- data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +4 -3
- data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +27 -9
- data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +12 -13
- data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +93 -55
- data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +113 -88
- data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +31 -23
- data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +5 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +12 -9
- data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +7 -6
- data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +105 -21
- data/stylesheets_sass/compass_twitter_bootstrap/_font-awesome.sass +228 -31
- data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +255 -155
- data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +16 -2
- data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +10 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_labels-badges.sass +38 -31
- data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +3 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_media.sass +48 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +215 -174
- data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +25 -26
- data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +229 -134
- data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +53 -46
- data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +16 -12
- data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +78 -23
- data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +106 -40
- data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +35 -30
- data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +80 -12
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-1200px-min.sass +8 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-767px-max.sass +89 -54
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-768px-979px.sass +7 -6
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-navbar.sass +38 -13
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive-utilities.sass +18 -17
- data/stylesheets_sass/compass_twitter_bootstrap/_responsive.sass +44 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +24 -4
- data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +25 -8
- data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +110 -83
- data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +11 -7
- data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -19
- data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +123 -75
- data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +7 -2
- data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +141 -37
- data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +10 -9
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +247 -167
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
- data/vendor/assets/javascripts/bootstrap-alert.js +13 -4
- data/vendor/assets/javascripts/bootstrap-all.js +2 -1
- data/vendor/assets/javascripts/bootstrap-button.js +17 -8
- data/vendor/assets/javascripts/bootstrap-carousel.js +30 -14
- data/vendor/assets/javascripts/bootstrap-collapse.js +24 -14
- data/vendor/assets/javascripts/bootstrap-dropdown.js +80 -19
- data/vendor/assets/javascripts/bootstrap-modal.js +111 -84
- data/vendor/assets/javascripts/bootstrap-popover.js +21 -5
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +21 -10
- data/vendor/assets/javascripts/bootstrap-tab.js +17 -8
- data/vendor/assets/javascripts/bootstrap-tooltip.js +36 -24
- data/vendor/assets/javascripts/bootstrap-transition.js +6 -7
- data/vendor/assets/javascripts/bootstrap-typeahead.js +87 -49
- metadata +17 -7
@@ -1,5 +1,21 @@
|
|
1
|
+
//
|
2
|
+
// Grid system
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
1
6
|
// Fixed (940px)
|
2
|
-
@include
|
7
|
+
@include ctb-grid-core($gridColumnWidth, $gridGutterWidth);
|
3
8
|
|
4
9
|
// Fluid (940px)
|
5
|
-
@include
|
10
|
+
@include ctb-grid-fluid($fluidGridColumnWidth, $fluidGridGutterWidth);
|
11
|
+
|
12
|
+
// Reset utility classes due to specificity
|
13
|
+
[class*="span"].hide,
|
14
|
+
.row-fluid [class*="span"].hide {
|
15
|
+
display: none;
|
16
|
+
}
|
17
|
+
|
18
|
+
[class*="span"].pull-right,
|
19
|
+
.row-fluid [class*="span"].pull-right {
|
20
|
+
float: right;
|
21
|
+
}
|
@@ -1,11 +1,17 @@
|
|
1
|
-
//
|
2
|
-
//
|
1
|
+
//
|
2
|
+
// Hero unit
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
3
5
|
|
4
6
|
.hero-unit {
|
5
7
|
padding: 60px;
|
6
8
|
margin-bottom: 30px;
|
9
|
+
font-size: 18px;
|
10
|
+
font-weight: 200;
|
11
|
+
line-height: $baseLineHeight * 1.5;
|
12
|
+
color: $heroUnitLeadColor;
|
7
13
|
background-color: $heroUnitBackground;
|
8
|
-
@include
|
14
|
+
@include ctb-border-radius(6px);
|
9
15
|
h1 {
|
10
16
|
margin-bottom: 0;
|
11
17
|
font-size: 60px;
|
@@ -13,10 +19,7 @@
|
|
13
19
|
color: $heroUnitHeadingColor;
|
14
20
|
letter-spacing: -1px;
|
15
21
|
}
|
16
|
-
|
17
|
-
|
18
|
-
font-weight: 200;
|
19
|
-
line-height: $baseLineHeight * 1.5;
|
20
|
-
color: $heroUnitLeadColor;
|
22
|
+
li {
|
23
|
+
line-height: $baseLineHeight * 1.5; // Reset since we specify in type.less
|
21
24
|
}
|
22
25
|
}
|
@@ -1,9 +1,13 @@
|
|
1
|
-
//
|
2
|
-
//
|
1
|
+
//
|
2
|
+
// Labels and badges
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
3
5
|
|
4
6
|
// Base classes
|
5
7
|
.label,
|
6
8
|
.badge {
|
9
|
+
display: inline-block;
|
10
|
+
padding: 2px 4px;
|
7
11
|
font-size: $baseFontSize * .846;
|
8
12
|
font-weight: bold;
|
9
13
|
line-height: 14px; // ensure proper line-height if floated
|
@@ -15,12 +19,20 @@
|
|
15
19
|
}
|
16
20
|
// Set unique padding and border-radii
|
17
21
|
.label {
|
18
|
-
|
19
|
-
|
22
|
+
@include ctb-border-radius(3px);
|
23
|
+
}
|
24
|
+
.badge {
|
25
|
+
padding-left: 9px;
|
26
|
+
padding-right: 9px;
|
27
|
+
@include ctb-border-radius(9px);
|
20
28
|
}
|
29
|
+
|
30
|
+
// Empty labels/badges collapse
|
31
|
+
.label,
|
21
32
|
.badge {
|
22
|
-
|
23
|
-
|
33
|
+
&:empty {
|
34
|
+
display: none;
|
35
|
+
}
|
24
36
|
}
|
25
37
|
|
26
38
|
// Hover state, but only for links
|
@@ -36,28 +48,32 @@ a {
|
|
36
48
|
// Colors
|
37
49
|
// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
|
38
50
|
// Important (red)
|
39
|
-
.label-important,
|
40
|
-
.badge-important
|
41
|
-
.label-important[href],
|
42
|
-
.badge-important[href] { background-color: darken($errorText, 10%); }
|
51
|
+
.label-important, .badge-important { background-color: $errorText; }
|
52
|
+
.label-important[href], .badge-important[href] { background-color: darken($errorText, 10%); }
|
43
53
|
// Warnings (orange)
|
44
|
-
.label-warning,
|
45
|
-
.badge-warning
|
46
|
-
.label-warning[href],
|
47
|
-
.badge-warning[href] { background-color: darken($orange, 10%); }
|
54
|
+
.label-warning, .badge-warning { background-color: $orange; }
|
55
|
+
.label-warning[href], .badge-warning[href] { background-color: darken($orange, 10%); }
|
48
56
|
// Success (green)
|
49
|
-
.label-success,
|
50
|
-
.badge-success
|
51
|
-
.label-success[href],
|
52
|
-
.badge-success[href] { background-color: darken($successText, 10%); }
|
57
|
+
.label-success, .badge-success { background-color: $successText; }
|
58
|
+
.label-success[href], .badge-success[href] { background-color: darken($successText, 10%); }
|
53
59
|
// Info (turquoise)
|
54
|
-
.label-info,
|
55
|
-
.badge-info
|
56
|
-
.label-info[href],
|
57
|
-
.badge-info[href] { background-color: darken($infoText, 10%); }
|
60
|
+
.label-info, .badge-info { background-color: $infoText; }
|
61
|
+
.label-info[href], .badge-info[href] { background-color: darken($infoText, 10%); }
|
58
62
|
// Inverse (black)
|
59
|
-
.label-inverse,
|
60
|
-
.badge-inverse
|
61
|
-
.label-inverse[href],
|
62
|
-
.badge-inverse[href] { background-color: darken($grayDark, 10%); }
|
63
|
+
.label-inverse, .badge-inverse { background-color: $grayDark; }
|
64
|
+
.label-inverse[href], .badge-inverse[href] { background-color: darken($grayDark, 10%); }
|
63
65
|
|
66
|
+
// Quick fix for labels/badges in buttons
|
67
|
+
.btn {
|
68
|
+
.label,
|
69
|
+
.badge {
|
70
|
+
position: relative;
|
71
|
+
top: -1px;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
.btn-mini {
|
75
|
+
.label,
|
76
|
+
.badge {
|
77
|
+
top: 0;
|
78
|
+
}
|
79
|
+
}
|
@@ -1,17 +1,16 @@
|
|
1
1
|
//
|
2
2
|
// Layouts
|
3
|
-
//
|
4
|
-
// --------------------------------------------
|
3
|
+
// --------------------------------------------------
|
5
4
|
|
6
5
|
|
7
6
|
// Container (centered, fixed-width layouts)
|
8
7
|
.container {
|
9
|
-
@include
|
8
|
+
@include ctb-container-fixed();
|
10
9
|
}
|
11
10
|
|
12
11
|
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
|
13
12
|
.container-fluid {
|
14
13
|
padding-right: $gridGutterWidth;
|
15
14
|
padding-left: $gridGutterWidth;
|
16
|
-
@include
|
15
|
+
@include ctb-clearfix();
|
17
16
|
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
// Media objects
|
2
|
+
// Source: http://stubbornella.org/content/?p=497
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Common styles
|
7
|
+
// -------------------------
|
8
|
+
|
9
|
+
// Clear the floats
|
10
|
+
.media,
|
11
|
+
.media-body {
|
12
|
+
overflow: hidden;
|
13
|
+
*overflow: visible;
|
14
|
+
zoom: 1;
|
15
|
+
}
|
16
|
+
|
17
|
+
// Proper spacing between instances of .media
|
18
|
+
.media,
|
19
|
+
.media .media {
|
20
|
+
margin-top: 15px;
|
21
|
+
}
|
22
|
+
.media:first-child {
|
23
|
+
margin-top: 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
// For images and videos, set to block
|
27
|
+
.media-object {
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
|
31
|
+
// Reset margins on headings for tighter default spacing
|
32
|
+
.media-heading {
|
33
|
+
margin: 0 0 5px;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
// Media image alignment
|
38
|
+
// -------------------------
|
39
|
+
|
40
|
+
.media .pull-left {
|
41
|
+
margin-right: 10px;
|
42
|
+
}
|
43
|
+
.media .pull-right {
|
44
|
+
margin-left: 10px;
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
// Media list variation
|
49
|
+
// -------------------------
|
50
|
+
|
51
|
+
// Undo default ul/ol styles
|
52
|
+
.media-list {
|
53
|
+
margin-left: 0;
|
54
|
+
list-style: none;
|
55
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
//
|
2
|
-
//
|
3
|
-
//
|
1
|
+
//
|
2
|
+
// Mixins
|
3
|
+
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
6
|
// UTILITY MIXINS
|
@@ -9,12 +9,15 @@
|
|
9
9
|
// Clearfix
|
10
10
|
// --------
|
11
11
|
// For clearing floats like a boss h5bp.com/q
|
12
|
-
@mixin
|
12
|
+
@mixin ctb-clearfix {
|
13
13
|
*zoom: 1;
|
14
14
|
&:before,
|
15
15
|
&:after {
|
16
16
|
display: table;
|
17
17
|
content: "";
|
18
|
+
// Fixes Opera/contenteditable bug:
|
19
|
+
// http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
|
20
|
+
line-height: 0;
|
18
21
|
}
|
19
22
|
&:after {
|
20
23
|
clear: both;
|
@@ -23,7 +26,7 @@
|
|
23
26
|
|
24
27
|
// Webkit-style focus
|
25
28
|
// ------------------
|
26
|
-
@mixin
|
29
|
+
@mixin ctb-tab-focus() {
|
27
30
|
// Default
|
28
31
|
outline: thin dotted #333;
|
29
32
|
// Webkit
|
@@ -33,7 +36,7 @@
|
|
33
36
|
|
34
37
|
// Center-align a block level element
|
35
38
|
// ----------------------------------
|
36
|
-
@mixin
|
39
|
+
@mixin ctb-center-block() {
|
37
40
|
display: block;
|
38
41
|
margin-left: auto;
|
39
42
|
margin-right: auto;
|
@@ -41,8 +44,8 @@
|
|
41
44
|
|
42
45
|
// IE7 inline-block
|
43
46
|
// ----------------
|
44
|
-
@mixin
|
45
|
-
*display: inline;
|
47
|
+
@mixin ctb-ie7-inline-block() {
|
48
|
+
*display: inline; // IE7 inline-block hack
|
46
49
|
*zoom: 1;
|
47
50
|
}
|
48
51
|
|
@@ -52,7 +55,7 @@
|
|
52
55
|
// right version is for icons, which come before. Applying both is ok, but it will
|
53
56
|
// mean that space between those elements will be .6em (~2 space characters) in IE7,
|
54
57
|
// instead of the 1 space in other browsers.
|
55
|
-
@mixin
|
58
|
+
@mixin ctb-ie7-restore-left-whitespace() {
|
56
59
|
*margin-left: .3em;
|
57
60
|
|
58
61
|
&:first-child {
|
@@ -60,31 +63,30 @@
|
|
60
63
|
}
|
61
64
|
}
|
62
65
|
|
63
|
-
@mixin
|
66
|
+
@mixin ctb-ie7-restore-right-whitespace() {
|
64
67
|
*margin-right: .3em;
|
65
|
-
|
66
|
-
&:last-child {
|
67
|
-
*margin-left: 0;
|
68
|
-
}
|
69
68
|
}
|
70
69
|
|
71
70
|
// Sizing shortcuts
|
72
71
|
// -------------------------
|
73
|
-
@mixin
|
72
|
+
@mixin ctb-size($height, $width) {
|
74
73
|
width: $width;
|
75
74
|
height: $height;
|
76
75
|
}
|
77
|
-
@mixin
|
78
|
-
@include
|
76
|
+
@mixin ctb-square($size) {
|
77
|
+
@include ctb-size($size, $size);
|
79
78
|
}
|
80
79
|
|
81
80
|
// Placeholder text
|
82
81
|
// -------------------------
|
83
|
-
@mixin
|
84
|
-
|
82
|
+
@mixin ctb-placeholder($color: $placeholderText) {
|
83
|
+
&:-moz-placeholder {
|
85
84
|
color: $color;
|
86
85
|
}
|
87
|
-
|
86
|
+
&:-ms-input-placeholder {
|
87
|
+
color: $color;
|
88
|
+
}
|
89
|
+
&::-webkit-input-placeholder {
|
88
90
|
color: $color;
|
89
91
|
}
|
90
92
|
}
|
@@ -92,7 +94,7 @@
|
|
92
94
|
// Text overflow
|
93
95
|
// -------------------------
|
94
96
|
// Requires inline-block or block for proper styling
|
95
|
-
@mixin
|
97
|
+
@mixin ctb-text-overflow() {
|
96
98
|
overflow: hidden;
|
97
99
|
text-overflow: ellipsis;
|
98
100
|
white-space: nowrap;
|
@@ -101,7 +103,7 @@
|
|
101
103
|
// CSS image replacement
|
102
104
|
// -------------------------
|
103
105
|
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
104
|
-
@mixin
|
106
|
+
@mixin ctb-hide-text {
|
105
107
|
font: 0/0 a;
|
106
108
|
color: transparent;
|
107
109
|
text-shadow: none;
|
@@ -111,53 +113,50 @@
|
|
111
113
|
|
112
114
|
// FONTS
|
113
115
|
// --------------------------------------------------
|
114
|
-
|
116
|
+
|
117
|
+
@mixin ctb-font-family-serif() {
|
115
118
|
font-family: $serifFontFamily;
|
116
119
|
}
|
117
|
-
|
118
|
-
@mixin bootstrap-font-family-sans-serif {
|
120
|
+
@mixin ctb-font-family-sans-serif() {
|
119
121
|
font-family: $sansFontFamily;
|
120
122
|
}
|
121
|
-
|
122
|
-
@mixin bootstrap-font-family-monospace {
|
123
|
+
@mixin ctb-font-family-monospace() {
|
123
124
|
font-family: $monoFontFamily;
|
124
125
|
}
|
125
|
-
|
126
|
-
@mixin bootstrap-font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
126
|
+
@mixin ctb-font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
127
127
|
font-size: $size;
|
128
128
|
font-weight: $weight;
|
129
129
|
line-height: $lineHeight;
|
130
130
|
}
|
131
|
-
|
132
|
-
@
|
133
|
-
@include
|
134
|
-
@include bootstrap-font-shorthand($size, $weight, $lineHeight);
|
131
|
+
@mixin ctb-font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
132
|
+
@include ctb-font-family-serif();
|
133
|
+
@include ctb-font-shorthand($size, $weight, $lineHeight);
|
135
134
|
}
|
136
|
-
|
137
|
-
@
|
138
|
-
@include
|
139
|
-
@include bootstrap-font-shorthand($size, $weight, $lineHeight);
|
135
|
+
@mixin ctb-font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
136
|
+
@include ctb-font-family-sans-serif();
|
137
|
+
@include ctb-font-shorthand($size, $weight, $lineHeight);
|
140
138
|
}
|
141
|
-
|
142
|
-
@
|
143
|
-
@include
|
144
|
-
@include bootstrap-font-shorthand($size, $weight, $lineHeight);
|
139
|
+
@mixin ctb-font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
140
|
+
@include ctb-font-family-monospace();
|
141
|
+
@include ctb-font-shorthand($size, $weight, $lineHeight);
|
145
142
|
}
|
146
143
|
|
144
|
+
|
147
145
|
// FORMS
|
148
146
|
// --------------------------------------------------
|
149
147
|
|
150
148
|
// Block level inputs
|
151
|
-
@mixin
|
149
|
+
@mixin ctb-input-block-level {
|
152
150
|
display: block;
|
153
151
|
width: 100%;
|
154
|
-
min-height:
|
155
|
-
@include
|
152
|
+
min-height: 30px; // Make inputs at least the height of their button counterpart
|
153
|
+
@include ctb-box-sizing(border-box); // Makes inputs behave like true block-level elements
|
156
154
|
}
|
157
155
|
|
158
156
|
|
157
|
+
|
159
158
|
// Mixin for form field states
|
160
|
-
@mixin
|
159
|
+
@mixin ctb-formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
|
161
160
|
// Set the text color
|
162
161
|
> label,
|
163
162
|
.help-block,
|
@@ -165,14 +164,20 @@
|
|
165
164
|
color: $textColor;
|
166
165
|
}
|
167
166
|
// Style inputs accordingly
|
167
|
+
.checkbox,
|
168
|
+
.radio,
|
168
169
|
input,
|
169
170
|
select,
|
170
171
|
textarea {
|
171
172
|
color: $textColor;
|
172
173
|
border-color: $borderColor;
|
174
|
+
@include ctb-box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
|
173
175
|
&:focus {
|
174
176
|
border-color: darken($borderColor, 10%);
|
175
|
-
|
177
|
+
// Write out in full since the lighten() function isn't easily escaped
|
178
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($borderColor, 20%);
|
179
|
+
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($borderColor, 20%);
|
180
|
+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($borderColor, 20%);
|
176
181
|
}
|
177
182
|
}
|
178
183
|
// Give a small background color for input-prepend/-append
|
@@ -185,90 +190,130 @@
|
|
185
190
|
}
|
186
191
|
|
187
192
|
|
193
|
+
|
188
194
|
// CSS3 PROPERTIES
|
189
195
|
// --------------------------------------------------
|
190
196
|
|
191
197
|
// Border Radius
|
192
|
-
@mixin
|
198
|
+
@mixin ctb-border-radius($radius) {
|
193
199
|
-webkit-border-radius: $radius;
|
194
200
|
-moz-border-radius: $radius;
|
195
201
|
border-radius: $radius;
|
196
202
|
}
|
197
203
|
|
204
|
+
// Single Corner Border Radius
|
205
|
+
@mixin ctb-border-top-left-radius($radius) {
|
206
|
+
-webkit-border-top-left-radius: $radius;
|
207
|
+
-moz-border-radius-topleft: $radius;
|
208
|
+
border-top-left-radius: $radius;
|
209
|
+
}
|
210
|
+
@mixin ctb-border-top-right-radius($radius) {
|
211
|
+
-webkit-border-top-right-radius: $radius;
|
212
|
+
-moz-border-radius-topright: $radius;
|
213
|
+
border-top-right-radius: $radius;
|
214
|
+
}
|
215
|
+
@mixin ctb-border-bottom-right-radius($radius) {
|
216
|
+
-webkit-border-bottom-right-radius: $radius;
|
217
|
+
-moz-border-radius-bottomright: $radius;
|
218
|
+
border-bottom-right-radius: $radius;
|
219
|
+
}
|
220
|
+
@mixin ctb-border-bottom-left-radius($radius) {
|
221
|
+
-webkit-border-bottom-left-radius: $radius;
|
222
|
+
-moz-border-radius-bottomleft: $radius;
|
223
|
+
border-bottom-left-radius: $radius;
|
224
|
+
}
|
225
|
+
|
226
|
+
// Single Side Border Radius
|
227
|
+
@mixin ctb-border-top-radius($radius) {
|
228
|
+
@include ctb-border-top-right-radius($radius);
|
229
|
+
@include ctb-border-top-left-radius($radius);
|
230
|
+
}
|
231
|
+
@mixin ctb-border-right-radius($radius) {
|
232
|
+
@include ctb-border-top-right-radius($radius);
|
233
|
+
@include ctb-border-bottom-right-radius($radius);
|
234
|
+
}
|
235
|
+
@mixin ctb-border-bottom-radius($radius) {
|
236
|
+
@include ctb-border-bottom-right-radius($radius);
|
237
|
+
@include ctb-border-bottom-left-radius($radius);
|
238
|
+
}
|
239
|
+
@mixin ctb-border-left-radius($radius) {
|
240
|
+
@include ctb-border-top-left-radius($radius);
|
241
|
+
@include ctb-border-bottom-left-radius($radius);
|
242
|
+
}
|
243
|
+
|
198
244
|
// Drop shadows
|
199
|
-
@mixin
|
245
|
+
@mixin ctb-box-shadow($shadow) {
|
200
246
|
-webkit-box-shadow: $shadow;
|
201
247
|
-moz-box-shadow: $shadow;
|
202
248
|
box-shadow: $shadow;
|
203
249
|
}
|
204
250
|
|
205
251
|
// Transitions
|
206
|
-
@mixin
|
252
|
+
@mixin ctb-transition($transition) {
|
207
253
|
-webkit-transition: $transition;
|
208
254
|
-moz-transition: $transition;
|
209
|
-
-ms-transition: $transition;
|
210
255
|
-o-transition: $transition;
|
211
256
|
transition: $transition;
|
212
257
|
}
|
213
258
|
|
214
259
|
// Transformations
|
215
|
-
@mixin
|
260
|
+
@mixin ctb-rotate($degrees) {
|
216
261
|
-webkit-transform: rotate($degrees);
|
217
262
|
-moz-transform: rotate($degrees);
|
218
263
|
-ms-transform: rotate($degrees);
|
219
264
|
-o-transform: rotate($degrees);
|
220
265
|
transform: rotate($degrees);
|
221
266
|
}
|
222
|
-
@mixin
|
267
|
+
@mixin ctb-scale($ratio) {
|
223
268
|
-webkit-transform: scale($ratio);
|
224
269
|
-moz-transform: scale($ratio);
|
225
270
|
-ms-transform: scale($ratio);
|
226
271
|
-o-transform: scale($ratio);
|
227
272
|
transform: scale($ratio);
|
228
273
|
}
|
229
|
-
@mixin
|
274
|
+
@mixin ctb-translate($x, $y) {
|
230
275
|
-webkit-transform: translate($x, $y);
|
231
276
|
-moz-transform: translate($x, $y);
|
232
277
|
-ms-transform: translate($x, $y);
|
233
278
|
-o-transform: translate($x, $y);
|
234
279
|
transform: translate($x, $y);
|
235
280
|
}
|
236
|
-
|
281
|
+
|
282
|
+
@mixin ctb-skew($x, $y) {
|
237
283
|
-webkit-transform: skew($x, $y);
|
238
284
|
-moz-transform: skew($x, $y);
|
239
285
|
-ms-transform: skew($x, $y);
|
240
286
|
-o-transform: skew($x, $y);
|
241
287
|
transform: skew($x, $y);
|
242
288
|
}
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
-o-transform:
|
248
|
-
transform:
|
289
|
+
|
290
|
+
@mixin ctb-translate3d($x, $y, $z) {
|
291
|
+
-webkit-transform: translate3d($x, $y, $z);
|
292
|
+
-moz-transform: translate3d($x, $y, $z);
|
293
|
+
-o-transform: translate3d($x, $y, $z);
|
294
|
+
transform: translate3d($x, $y, $z);
|
249
295
|
}
|
250
296
|
|
251
297
|
// Backface visibility
|
252
298
|
// Prevent browsers from flickering when using CSS 3D transforms.
|
253
299
|
// Default value is `visible`, but can be changed to `hidden
|
254
300
|
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
|
255
|
-
@mixin
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
backface-visibility: $visibility;
|
301
|
+
@mixin ctb-backface-visibility($visibility){
|
302
|
+
-webkit-backface-visibility: $visibility;
|
303
|
+
-moz-backface-visibility: $visibility;
|
304
|
+
backface-visibility: $visibility;
|
260
305
|
}
|
261
306
|
|
262
307
|
// Background clipping
|
263
308
|
// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
|
264
|
-
@mixin
|
309
|
+
@mixin ctb-background-clip($clip) {
|
265
310
|
-webkit-background-clip: $clip;
|
266
311
|
-moz-background-clip: $clip;
|
267
312
|
background-clip: $clip;
|
268
313
|
}
|
269
314
|
|
270
315
|
// Background sizing
|
271
|
-
@mixin
|
316
|
+
@mixin ctb-background-size($size) {
|
272
317
|
-webkit-background-size: $size;
|
273
318
|
-moz-background-size: $size;
|
274
319
|
-o-background-size: $size;
|
@@ -277,16 +322,15 @@
|
|
277
322
|
|
278
323
|
|
279
324
|
// Box sizing
|
280
|
-
@mixin
|
325
|
+
@mixin ctb-box-sizing($boxmodel) {
|
281
326
|
-webkit-box-sizing: $boxmodel;
|
282
327
|
-moz-box-sizing: $boxmodel;
|
283
|
-
-ms-box-sizing: $boxmodel;
|
284
328
|
box-sizing: $boxmodel;
|
285
329
|
}
|
286
330
|
|
287
331
|
// User select
|
288
332
|
// For selecting text on the page
|
289
|
-
@mixin
|
333
|
+
@mixin ctb-user-select($select) {
|
290
334
|
-webkit-user-select: $select;
|
291
335
|
-moz-user-select: $select;
|
292
336
|
-ms-user-select: $select;
|
@@ -295,13 +339,13 @@
|
|
295
339
|
}
|
296
340
|
|
297
341
|
// Resize anything
|
298
|
-
@mixin
|
342
|
+
@mixin ctb-resizable($direction) {
|
299
343
|
resize: $direction; // Options: horizontal, vertical, both
|
300
344
|
overflow: auto; // Safari fix
|
301
345
|
}
|
302
346
|
|
303
347
|
// CSS3 Content Columns
|
304
|
-
@mixin
|
348
|
+
@mixin ctb-content-columns($columnCount, $columnGap: $gridGutterWidth) {
|
305
349
|
-webkit-column-count: $columnCount;
|
306
350
|
-moz-column-count: $columnCount;
|
307
351
|
column-count: $columnCount;
|
@@ -310,10 +354,20 @@
|
|
310
354
|
column-gap: $columnGap;
|
311
355
|
}
|
312
356
|
|
357
|
+
// Optional hyphenation
|
358
|
+
@mixin ctb-hyphens($mode: auto) {
|
359
|
+
word-wrap: break-word;
|
360
|
+
-webkit-hyphens: $mode;
|
361
|
+
-moz-hyphens: $mode;
|
362
|
+
-ms-hyphens: $mode;
|
363
|
+
-o-hyphens: $mode;
|
364
|
+
hyphens: $mode;
|
365
|
+
}
|
366
|
+
|
313
367
|
// Opacity
|
314
|
-
@mixin
|
315
|
-
opacity: $opacity
|
316
|
-
filter:
|
368
|
+
@mixin ctb-opacity($opacity) {
|
369
|
+
opacity: $opacity;
|
370
|
+
filter: alpha(opacity=($opacity * 100));
|
317
371
|
}
|
318
372
|
|
319
373
|
|
@@ -322,87 +376,83 @@
|
|
322
376
|
// --------------------------------------------------
|
323
377
|
|
324
378
|
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
|
325
|
-
@mixin
|
379
|
+
@mixin ctb-translucent-background($color: $white, $alpha: 1) {
|
326
380
|
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
327
381
|
}
|
328
382
|
|
329
|
-
@mixin
|
383
|
+
@mixin ctb-translucent-border($color: $white, $alpha: 1) {
|
330
384
|
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
331
|
-
@include
|
385
|
+
@include ctb-background-clip(padding-box);
|
332
386
|
}
|
333
387
|
|
334
388
|
// Gradient Bar Colors for buttons and alerts
|
335
|
-
@mixin
|
336
|
-
|
389
|
+
@mixin ctb-gradientBar($primaryColor, $secondaryColor, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
|
390
|
+
color: $textColor;
|
391
|
+
text-shadow: $textShadow;
|
392
|
+
@include ctb-gradient-vertical($primaryColor, $secondaryColor);
|
337
393
|
border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
|
338
|
-
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1)
|
394
|
+
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fade-in(rgba(0,0,0,.1), 0.15);
|
339
395
|
}
|
340
396
|
|
341
397
|
// Gradients
|
342
|
-
@mixin
|
398
|
+
@mixin ctb-gradient-horizontal($startColor: #555, $endColor: #333) {
|
343
399
|
background-color: $endColor;
|
344
400
|
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
345
|
-
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
|
346
401
|
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
347
402
|
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
348
403
|
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
349
|
-
background-image: linear-gradient(
|
404
|
+
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
|
350
405
|
background-repeat: repeat-x;
|
351
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
|
406
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{darken($startColor, 1%)}', endColorstr='#{darken($endColor, 1%)}', GradientType=1); // IE9 and down
|
352
407
|
}
|
353
|
-
@mixin
|
354
|
-
background-color: mix($startColor, $endColor,
|
408
|
+
@mixin ctb-gradient-vertical($startColor: #555, $endColor: #333) {
|
409
|
+
background-color: mix($startColor, $endColor, 62.5%);
|
355
410
|
background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
|
356
|
-
background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
|
357
411
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
358
412
|
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
359
413
|
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
|
360
|
-
background-image: linear-gradient(
|
414
|
+
background-image: linear-gradient(to bottom, $startColor, $endColor); // Standard, IE10
|
361
415
|
background-repeat: repeat-x;
|
362
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
|
416
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{darken($startColor, 1%)}', endColorstr='#{darken($endColor, 1%)}', GradientType=0); // IE9 and down
|
363
417
|
}
|
364
|
-
@mixin
|
418
|
+
@mixin ctb-gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
|
365
419
|
background-color: $endColor;
|
366
420
|
background-repeat: repeat-x;
|
367
421
|
background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
|
368
|
-
background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
|
369
422
|
background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
370
423
|
background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
|
371
|
-
background-image: linear-gradient($deg, $startColor, $endColor); //
|
424
|
+
background-image: linear-gradient($deg, $startColor, $endColor); // Standard, IE10
|
372
425
|
}
|
373
|
-
@mixin
|
426
|
+
@mixin ctb-gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
|
374
427
|
background-color: mix($midColor, $endColor, 80%);
|
375
428
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
|
376
429
|
background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
377
|
-
background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop
|
378
|
-
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
430
|
+
background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop*100%, $endColor);
|
379
431
|
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
380
432
|
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
|
381
433
|
background-repeat: no-repeat;
|
382
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
434
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{darken($startColor, 1%)}', endColorstr='#{darken($endColor, 1%)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
383
435
|
}
|
384
|
-
@mixin
|
436
|
+
@mixin ctb-gradient-radial($innerColor: #555, $outerColor: #333) {
|
385
437
|
background-color: $outerColor;
|
386
438
|
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
|
387
439
|
background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
|
388
440
|
background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
|
389
|
-
background-image: -ms-radial-gradient(circle, $innerColor, $outerColor);
|
390
441
|
background-image: -o-radial-gradient(circle, $innerColor, $outerColor);
|
391
442
|
background-repeat: no-repeat;
|
392
443
|
}
|
393
|
-
@mixin
|
444
|
+
@mixin ctb-gradient-striped($color, $angle: 45deg) {
|
394
445
|
background-color: $color;
|
395
446
|
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
|
396
447
|
background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
397
448
|
background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
398
|
-
background-image: -ms-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
399
449
|
background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
400
450
|
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
401
451
|
}
|
402
452
|
|
403
453
|
// Reset filters for IE
|
404
|
-
@mixin
|
405
|
-
filter: progid:DXImageTransform.Microsoft.gradient(enabled
|
454
|
+
@mixin ctb-gradient-reset-filter() {
|
455
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
406
456
|
}
|
407
457
|
|
408
458
|
|
@@ -413,7 +463,7 @@
|
|
413
463
|
// Horizontal dividers
|
414
464
|
// -------------------------
|
415
465
|
// Dividers (basically an hr) within dropdowns and nav lists
|
416
|
-
@mixin
|
466
|
+
@mixin ctb-nav-divider($top: #e5e5e5, $bottom: $white) {
|
417
467
|
// IE7 needs a set width since we gave a height. Restricting just
|
418
468
|
// to IE7 to keep the 1px left/right space in other browsers.
|
419
469
|
// It is unclear where IE is getting the extra space that we need
|
@@ -423,20 +473,21 @@
|
|
423
473
|
margin: (($baseLineHeight / 2) - 1) 1px; // 8px 1px
|
424
474
|
*margin: -5px 0 5px;
|
425
475
|
overflow: hidden;
|
426
|
-
background-color:
|
427
|
-
border-bottom: 1px solid $
|
476
|
+
background-color: $top;
|
477
|
+
border-bottom: 1px solid $bottom;
|
428
478
|
}
|
429
479
|
|
430
480
|
// Button backgrounds
|
431
481
|
// ------------------
|
432
|
-
@mixin
|
482
|
+
@mixin ctb-buttonBackground($startColor, $endColor, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
|
433
483
|
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
434
|
-
@include
|
484
|
+
@include ctb-gradientBar($startColor, $endColor, $textColor, $textShadow);
|
435
485
|
*background-color: $endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
436
|
-
@include
|
486
|
+
@include ctb-gradient-reset-filter();
|
437
487
|
|
438
488
|
// in these cases the gradient won't cover the background, so we override
|
439
489
|
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
490
|
+
color: $textColor;
|
440
491
|
background-color: $endColor;
|
441
492
|
*background-color: darken($endColor, 5%);
|
442
493
|
}
|
@@ -444,7 +495,7 @@
|
|
444
495
|
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
445
496
|
&:active,
|
446
497
|
&.active {
|
447
|
-
background-color: darken($endColor, 10%)\9;
|
498
|
+
background-color: darken($endColor, 10%) \9;
|
448
499
|
}
|
449
500
|
}
|
450
501
|
|
@@ -452,62 +503,25 @@
|
|
452
503
|
// -------------------------
|
453
504
|
// Vertically center elements in the navbar.
|
454
505
|
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
|
455
|
-
@mixin
|
506
|
+
@mixin ctb-navbarVerticalAlign($elementHeight) {
|
456
507
|
margin-top: ($navbarHeight - $elementHeight) / 2;
|
457
508
|
}
|
458
509
|
|
459
|
-
// Popover arrows
|
460
|
-
// -------------------------
|
461
|
-
// For tipsies and popovers
|
462
|
-
@mixin bootstrap-popoverArrow-top($arrowWidth: 5px, $color: $black) {
|
463
|
-
bottom: 0;
|
464
|
-
left: 50%;
|
465
|
-
margin-left: -$arrowWidth;
|
466
|
-
border-left: $arrowWidth solid transparent;
|
467
|
-
border-right: $arrowWidth solid transparent;
|
468
|
-
border-top: $arrowWidth solid $color;
|
469
|
-
}
|
470
|
-
|
471
|
-
@mixin bootstrap-popoverArrow-left($arrowWidth: 5px, $color: $black) {
|
472
|
-
top: 50%;
|
473
|
-
right: 0;
|
474
|
-
margin-top: -$arrowWidth;
|
475
|
-
border-top: $arrowWidth solid transparent;
|
476
|
-
border-bottom: $arrowWidth solid transparent;
|
477
|
-
border-left: $arrowWidth solid $color;
|
478
|
-
}
|
479
|
-
|
480
|
-
@mixin bootstrap-popoverArrow-bottom($arrowWidth: 5px, $color: $black) {
|
481
|
-
top: 0;
|
482
|
-
left: 50%;
|
483
|
-
margin-left: -$arrowWidth;
|
484
|
-
border-left: $arrowWidth solid transparent;
|
485
|
-
border-right: $arrowWidth solid transparent;
|
486
|
-
border-bottom: $arrowWidth solid $color;
|
487
|
-
}
|
488
510
|
|
489
|
-
@mixin bootstrap-popoverArrow-right($arrowWidth: 5px, $color: $black) {
|
490
|
-
top: 50%;
|
491
|
-
left: 0;
|
492
|
-
margin-top: -$arrowWidth;
|
493
|
-
border-top: $arrowWidth solid transparent;
|
494
|
-
border-bottom: $arrowWidth solid transparent;
|
495
|
-
border-right: $arrowWidth solid $color;
|
496
|
-
}
|
497
511
|
|
498
512
|
|
499
513
|
// Grid System
|
500
514
|
// -----------
|
501
515
|
|
502
516
|
// Centered container element
|
503
|
-
@mixin
|
517
|
+
@mixin ctb-container-fixed() {
|
504
518
|
margin-right: auto;
|
505
519
|
margin-left: auto;
|
506
|
-
@include
|
520
|
+
@include ctb-clearfix();
|
507
521
|
}
|
508
522
|
|
509
523
|
// Table columns
|
510
|
-
@mixin
|
524
|
+
@mixin ctb-tableColumns($columnSpan: 1) {
|
511
525
|
float: none; // undo default grid column styles
|
512
526
|
width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
|
513
527
|
margin-left: 0; // undo default grid column styles
|
@@ -515,88 +529,128 @@
|
|
515
529
|
|
516
530
|
// Make a Grid
|
517
531
|
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
|
518
|
-
@mixin
|
532
|
+
@mixin ctb-makeRow() {
|
519
533
|
margin-left: $gridGutterWidth * -1;
|
520
|
-
@include
|
534
|
+
@include ctb-clearfix();
|
521
535
|
}
|
522
|
-
@mixin
|
536
|
+
@mixin ctb-makeColumn($columns: 1, $offset: 0) {
|
523
537
|
float: left;
|
524
538
|
margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
|
525
539
|
width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
|
526
540
|
}
|
527
541
|
|
528
542
|
// The Grid
|
529
|
-
@mixin
|
530
|
-
margin-left: ($
|
543
|
+
@mixin ctb-core-offset($columns, $columnWidth: $gridColumnWidth, $gutterWidth: $gridGutterWidth) {
|
544
|
+
margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns + 1));
|
531
545
|
}
|
532
|
-
|
533
|
-
@mixin
|
534
|
-
width: ($
|
546
|
+
|
547
|
+
@mixin ctb-core-span($columns, $columnWidth: $gridColumnWidth, $gutterWidth: $gridGutterWidth) {
|
548
|
+
width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1));
|
535
549
|
}
|
536
550
|
|
537
|
-
@mixin
|
551
|
+
@mixin ctb-grid-core($columnWidth: $gridColumnWidth, $gutterWidth: $gridGutterWidth) {
|
538
552
|
.row {
|
539
|
-
margin-left: $
|
540
|
-
@include
|
553
|
+
margin-left: $gutterWidth * -1;
|
554
|
+
@include ctb-clearfix();
|
541
555
|
}
|
542
|
-
|
556
|
+
|
543
557
|
[class*="span"] {
|
544
558
|
float: left;
|
545
|
-
margin-left: $
|
559
|
+
margin-left: $gutterWidth;
|
546
560
|
}
|
547
|
-
|
561
|
+
|
548
562
|
// Set the container width, and override it for fixed navbars in media queries
|
549
563
|
.container,
|
564
|
+
.navbar-static-top .container,
|
550
565
|
.navbar-fixed-top .container,
|
551
|
-
.navbar-fixed-bottom .container {
|
552
|
-
|
566
|
+
.navbar-fixed-bottom .container {
|
567
|
+
@include ctb-core-span($gridColumns, $columnWidth, $gutterWidth);
|
568
|
+
}
|
569
|
+
|
553
570
|
// generate .spanX and .offsetX
|
554
|
-
|
555
|
-
|
556
|
-
.
|
571
|
+
$i: $gridColumns;
|
572
|
+
@while $i > 0 {
|
573
|
+
.span#{$i} { @include ctb-core-span($i, $columnWidth, $gutterWidth); }
|
574
|
+
$i: $i - 1;
|
557
575
|
}
|
576
|
+
|
577
|
+
$i: $gridColumns;
|
578
|
+
@while $i > 0 {
|
579
|
+
.offset#{$i} { @include ctb-core-offset($i, $columnWidth, $gutterWidth); }
|
580
|
+
$i: $i - 1;
|
581
|
+
}
|
582
|
+
}
|
583
|
+
|
584
|
+
@mixin ctb-fluid-offset($columns, $columnWidth: $fluidGridColumnWidth, $gutterWidth: $fluidGridGutterWidth) {
|
585
|
+
margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) + ($gutterWidth * 2);
|
586
|
+
*margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + ($gutterWidth * 2) - (.5 / $gridRowWidth * 100px * 1%);
|
558
587
|
}
|
559
588
|
|
560
|
-
@mixin
|
561
|
-
|
562
|
-
*
|
589
|
+
@mixin ctb-fluid-offset-first-child($columns, $columnWidth: $fluidGridColumnWidth, $gutterWidth: $fluidGridGutterWidth) {
|
590
|
+
margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) + $gutterWidth;
|
591
|
+
*margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + $gutterWidth - (.5 / $gridRowWidth * 100px * 1%);
|
563
592
|
}
|
564
593
|
|
565
|
-
@mixin
|
594
|
+
@mixin ctb-fluid-span($columns, $columnWidth: $fluidGridColumnWidth, $gutterWidth: $fluidGridGutterWidth) {
|
595
|
+
width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1));
|
596
|
+
*width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%);
|
597
|
+
}
|
598
|
+
|
599
|
+
@mixin ctb-grid-fluid($columnWidth: $fluidGridColumnWidth, $gutterWidth: $fluidGridGutterWidth) {
|
566
600
|
.row-fluid {
|
567
601
|
width: 100%;
|
568
|
-
@include
|
602
|
+
@include ctb-clearfix();
|
569
603
|
[class*="span"] {
|
570
|
-
@include
|
604
|
+
@include ctb-input-block-level();
|
571
605
|
float: left;
|
572
|
-
margin-left: $
|
573
|
-
*margin-left: $
|
606
|
+
margin-left: $gutterWidth;
|
607
|
+
*margin-left: $gutterWidth - (.5 / $gridRowWidth * 100px * 1%);
|
574
608
|
}
|
575
609
|
[class*="span"]:first-child {
|
576
610
|
margin-left: 0;
|
577
611
|
}
|
578
612
|
|
579
|
-
// generate .spanX
|
580
|
-
|
581
|
-
|
613
|
+
// generate .spanX and .offsetX
|
614
|
+
$i: $gridColumns;
|
615
|
+
@while $i > 0 {
|
616
|
+
.span#{$i} {
|
617
|
+
@include ctb-fluid-span($i, $columnWidth, $gutterWidth);
|
618
|
+
}
|
619
|
+
.offset#{$i} {
|
620
|
+
@include ctb-fluid-offset($i, $columnWidth, $gutterWidth);
|
621
|
+
}
|
622
|
+
.offset#{$i}:first-child {
|
623
|
+
@include ctb-fluid-offset-first-child($i, $columnWidth, $gutterWidth);
|
624
|
+
}
|
625
|
+
$i: $i - 1;
|
582
626
|
}
|
583
627
|
}
|
584
628
|
}
|
585
629
|
|
586
|
-
@mixin
|
587
|
-
width: (($
|
630
|
+
@mixin ctb-input-span($columns, $columnWidth: $gridColumnWidth, $gutterWidth: $gridGutterWidth) {
|
631
|
+
width: (($columnWidth) * $columns) + ($gutterWidth * ($columns - 1)) - 14;
|
588
632
|
}
|
589
633
|
|
590
|
-
@mixin
|
634
|
+
@mixin ctb-grid-input($columnWidth: $gridColumnWidth, $gutterWidth: $gridGutterWidth) {
|
591
635
|
input,
|
592
636
|
textarea,
|
593
637
|
.uneditable-input {
|
594
638
|
margin-left: 0; // override margin-left from core grid system
|
595
639
|
}
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
640
|
+
|
641
|
+
// Space grid-sized controls properly if multiple per line
|
642
|
+
.controls-row [class*="span"] + [class*="span"] {
|
643
|
+
margin-left: $gutterWidth;
|
644
|
+
}
|
645
|
+
|
646
|
+
// generate .spanX
|
647
|
+
$i: $gridColumns;
|
648
|
+
@while $i > 0 {
|
649
|
+
input.span#{$i},
|
650
|
+
textarea.span#{$i},
|
651
|
+
.uneditable-input.span#{$i} {
|
652
|
+
@include ctb-input-span($i, $columnWidth, $gutterWidth);
|
600
653
|
}
|
601
|
-
|
654
|
+
$i: $i - 1;
|
655
|
+
}
|
602
656
|
}
|