compass_twitter_bootstrap 0.1.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +6 -0
- data/README.md +14 -8
- data/build/convert.rb +58 -33
- data/lib/compass_twitter_bootstrap.rb +1 -1
- data/lib/compass_twitter_bootstrap/version.rb +1 -1
- data/stylesheets/_compass_twitter_bootstrap.scss +45 -7
- data/stylesheets/_compass_twitter_bootstrap_responsive.scss +322 -0
- data/stylesheets/compass_twitter_bootstrap/_accordion.scss +28 -0
- data/stylesheets/compass_twitter_bootstrap/_alerts.scss +70 -0
- data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +22 -0
- data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +147 -0
- data/stylesheets/compass_twitter_bootstrap/_buttons.scss +165 -0
- data/stylesheets/compass_twitter_bootstrap/_carousel.scss +121 -0
- data/stylesheets/compass_twitter_bootstrap/_close.scss +18 -0
- data/stylesheets/compass_twitter_bootstrap/_code.scss +44 -0
- data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +18 -0
- data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +131 -0
- data/stylesheets/compass_twitter_bootstrap/_forms.scss +335 -299
- data/stylesheets/compass_twitter_bootstrap/_grid.scss +8 -0
- data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +20 -0
- data/stylesheets/compass_twitter_bootstrap/_labels.scss +16 -0
- data/stylesheets/compass_twitter_bootstrap/_layouts.scss +17 -0
- data/stylesheets/compass_twitter_bootstrap/_mixins.scss +409 -68
- data/stylesheets/compass_twitter_bootstrap/_modals.scss +72 -0
- data/stylesheets/compass_twitter_bootstrap/_navbar.scss +292 -0
- data/stylesheets/compass_twitter_bootstrap/_navs.scss +344 -0
- data/stylesheets/compass_twitter_bootstrap/_pager.scss +30 -0
- data/stylesheets/compass_twitter_bootstrap/_pagination.scss +55 -0
- data/stylesheets/compass_twitter_bootstrap/_popovers.scss +49 -0
- data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +95 -0
- data/stylesheets/compass_twitter_bootstrap/_reset.scss +37 -52
- data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +13 -123
- data/stylesheets/compass_twitter_bootstrap/_sprites.scss +156 -0
- data/stylesheets/compass_twitter_bootstrap/_tables.scss +75 -160
- data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +35 -0
- data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +35 -0
- data/stylesheets/compass_twitter_bootstrap/_type.scss +100 -70
- data/stylesheets/compass_twitter_bootstrap/_utilities.scss +23 -0
- data/stylesheets/compass_twitter_bootstrap/_variables.scss +94 -55
- data/stylesheets/compass_twitter_bootstrap/_wells.scss +17 -0
- data/stylesheets_sass/_compass_twitter_bootstrap.sass +49 -6
- data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +252 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +24 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +65 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +18 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +129 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +150 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +95 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +16 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +41 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +16 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +121 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +327 -306
- data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +8 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +17 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_labels.sass +23 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +14 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +425 -57
- data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +75 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +258 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +316 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +29 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +53 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +55 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +89 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +33 -67
- data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +13 -175
- data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +392 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +67 -139
- data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +34 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +95 -65
- data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +20 -0
- data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +67 -45
- data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +15 -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-alert.js +91 -0
- data/vendor/assets/javascripts/bootstrap-button.js +98 -0
- data/vendor/assets/javascripts/bootstrap-carousel.js +154 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +136 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +58 -21
- data/vendor/assets/javascripts/bootstrap-modal.js +63 -114
- data/vendor/assets/javascripts/bootstrap-popover.js +38 -33
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +62 -44
- data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
- data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
- data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
- metadata +69 -17
- data/stylesheets/compass_twitter_bootstrap/_patterns.scss +0 -1058
- data/stylesheets_sass/compass_twitter_bootstrap/_patterns.sass +0 -923
- data/vendor/assets/javascripts/bootstrap-alerts.js +0 -124
- data/vendor/assets/javascripts/bootstrap-buttons.js +0 -64
- data/vendor/assets/javascripts/bootstrap-tabs.js +0 -80
- data/vendor/assets/javascripts/bootstrap-twipsy.js +0 -321
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
* Updated twitter bootstrap to 2.0
|
|
5
|
+
* Updated import script
|
|
6
|
+
* Changed version number to match twitter boot
|
|
7
|
+
* Added link to demo app
|
|
8
|
+
|
|
3
9
|
## 0.1.8
|
|
4
10
|
* Upgraded to twitter bootstrap version 1.4
|
|
5
11
|
* Add Javascript files to vendors directory (thanks to tmaier)
|
data/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Twitter Bootstrap - For Compass
|
|
2
2
|
|
|
3
3
|
Compass Twitter Bootstrap is Twitter's toolkit converted for Compass.
|
|
4
4
|
|
|
5
|
+
Demo App at https://github.com/vwall/Compass-Twitter-Bootstrap-Demo-App
|
|
6
|
+
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
7
9
|
**Install the gem**
|
|
@@ -24,12 +26,16 @@ Compass Twitter Bootstrap is Twitter's toolkit converted for Compass.
|
|
|
24
26
|
|
|
25
27
|
@import "compass_twitter_bootstrap";
|
|
26
28
|
|
|
27
|
-
## Usage with asset pipeline(Rails 3.
|
|
29
|
+
## Usage with asset pipeline(Rails 3.2)
|
|
28
30
|
|
|
29
31
|
**Add it to your Gemfile**
|
|
30
32
|
|
|
31
33
|
gem 'compass_twitter_bootstrap'
|
|
32
34
|
|
|
35
|
+
**Use the new compass-rails gem. See https://github.com/Compass/compass-rails for more info.**
|
|
36
|
+
|
|
37
|
+
gem 'compass-rails'
|
|
38
|
+
|
|
33
39
|
**Bundle install**
|
|
34
40
|
|
|
35
41
|
bundle install
|
|
@@ -39,16 +45,16 @@ Compass Twitter Bootstrap is Twitter's toolkit converted for Compass.
|
|
|
39
45
|
# Enable the asset pipeline
|
|
40
46
|
config.assets.enabled = true
|
|
41
47
|
|
|
42
|
-
# Compass integration
|
|
43
|
-
config.sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
|
|
44
|
-
config.sass.load_paths << Compass::Frameworks['twitter_bootstrap'].stylesheets_directory
|
|
45
|
-
|
|
46
48
|
**Import it into your SCSS file**
|
|
47
49
|
|
|
48
50
|
@import "compass_twitter_bootstrap"
|
|
49
51
|
|
|
52
|
+
**Import twitter bootstrap responsive if you're looking for that**
|
|
53
|
+
|
|
54
|
+
@import "compass_twitter_bootstrap_responsive"
|
|
55
|
+
|
|
50
56
|
|
|
51
|
-
## Usage with Rails 3.1
|
|
57
|
+
## Usage with Rails 3.1 (via plugin)
|
|
52
58
|
|
|
53
59
|
**Install plugin**
|
|
54
60
|
|
|
@@ -63,7 +69,7 @@ Compass Twitter Bootstrap is Twitter's toolkit converted for Compass.
|
|
|
63
69
|
config.load_paths << Compass::Frameworks['twitter_bootstrap'].stylesheets_directory
|
|
64
70
|
|
|
65
71
|
...
|
|
66
|
-
|
|
72
|
+
end
|
|
67
73
|
|
|
68
74
|
**Import it into your SCSS file**
|
|
69
75
|
|
data/build/convert.rb
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
require 'open-uri'
|
|
2
|
+
require 'json'
|
|
2
3
|
|
|
3
4
|
class Convert
|
|
5
|
+
|
|
4
6
|
def process
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
end
|
|
7
|
+
get_less_files.each do |name|
|
|
8
|
+
unless ['bootstrap.less', 'responsive.less'].include?(name)
|
|
9
|
+
file = open_git_file("https://raw.github.com/twitter/bootstrap/master/less/#{name}")
|
|
10
|
+
file = convert(file)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
if name == 'progress-bars.less'
|
|
13
|
+
file = fix_progress_bar(file)
|
|
14
|
+
end
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
save_file(name, file) unless name == 'mixins.less'
|
|
17
|
+
end
|
|
18
|
+
end
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
file = 'https://raw.github.com/twitter/bootstrap/master/lib/mixins.less'
|
|
18
|
-
file = open_git_file(file)
|
|
19
|
-
file = replace_mixins(file)
|
|
20
|
-
save_file('_mixins', file)
|
|
20
|
+
self.create_sass_files
|
|
21
21
|
end
|
|
22
|
-
|
|
23
22
|
|
|
24
23
|
def create_sass_files
|
|
24
|
+
puts 'Creating sass files for testing'
|
|
25
|
+
|
|
25
26
|
scss_files = 'stylesheets'
|
|
26
27
|
|
|
27
28
|
Dir.glob(scss_files+'/*').each do |dir|
|
|
@@ -39,34 +40,43 @@ class Convert
|
|
|
39
40
|
end
|
|
40
41
|
end
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
# Get the sha of less branch
|
|
46
|
+
def get_tree_sha
|
|
47
|
+
sha = nil
|
|
48
|
+
trees = open('https://api.github.com/repos/twitter/bootstrap/git/trees/master').read
|
|
49
|
+
trees = JSON.parse trees
|
|
50
|
+
|
|
51
|
+
trees['tree'].select do |t|
|
|
52
|
+
if t['path'] == 'less'
|
|
53
|
+
sha = t['sha']
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sha
|
|
47
58
|
end
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
def get_less_files
|
|
61
|
+
file_list = []
|
|
62
|
+
files = open("https://api.github.com/repos/twitter/bootstrap/git/trees/#{get_tree_sha}").read
|
|
63
|
+
files = JSON.parse files
|
|
64
|
+
files['tree'].each{|f| file_list << f['path']}
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
'_reset' => 'https://raw.github.com/twitter/bootstrap/master/lib/reset.less',
|
|
54
|
-
'_variables' => 'https://raw.github.com/twitter/bootstrap/master/lib/variables.less',
|
|
55
|
-
'_scaffolding' => 'https://raw.github.com/twitter/bootstrap/master/lib/scaffolding.less',
|
|
56
|
-
'_type' => 'https://raw.github.com/twitter/bootstrap/master/lib/type.less',
|
|
57
|
-
'_forms' => 'https://raw.github.com/twitter/bootstrap/master/lib/forms.less',
|
|
58
|
-
'_tables' => 'https://raw.github.com/twitter/bootstrap/master/lib/tables.less',
|
|
59
|
-
'_patterns' => 'https://raw.github.com/twitter/bootstrap/master/lib/patterns.less'
|
|
60
|
-
}
|
|
66
|
+
file_list
|
|
61
67
|
end
|
|
62
68
|
|
|
69
|
+
|
|
63
70
|
def convert(file)
|
|
64
71
|
file = replace_vars(file)
|
|
65
72
|
file = replace_fonts(file)
|
|
73
|
+
file = replace_font_family(file)
|
|
66
74
|
file = replace_grads(file)
|
|
67
75
|
file = replace_mixins(file)
|
|
76
|
+
file = replace_less_extend(file)
|
|
68
77
|
file = replace_includes(file)
|
|
69
78
|
file = replace_spin(file)
|
|
79
|
+
file = replace_opacity(file)
|
|
70
80
|
|
|
71
81
|
file
|
|
72
82
|
end
|
|
@@ -76,18 +86,29 @@ private
|
|
|
76
86
|
end
|
|
77
87
|
|
|
78
88
|
def save_file(name, content)
|
|
79
|
-
|
|
89
|
+
name = name.gsub(/\.less/, '')
|
|
90
|
+
f = File.open("stylesheets/compass_twitter_bootstrap/_#{name}.scss", "w+")
|
|
80
91
|
f.write(content)
|
|
81
92
|
f.close
|
|
82
|
-
puts "Converted#{name}\n"
|
|
93
|
+
puts "Converted #{name}\n"
|
|
83
94
|
end
|
|
84
95
|
|
|
85
96
|
def replace_vars(less)
|
|
86
97
|
less.gsub(/@/, '$')
|
|
87
98
|
end
|
|
88
99
|
|
|
100
|
+
def fix_progress_bar(less)
|
|
101
|
+
less = less.gsub(/(\$)(-webkit-keyframes progress-bar-stripes)/, '@\2')
|
|
102
|
+
less = less.gsub(/(\$)(-moz-keyframes)/, '@\2')
|
|
103
|
+
less = less.gsub(/(\$)(keyframes progress-bar-stripes)/, '@\2')
|
|
104
|
+
end
|
|
105
|
+
|
|
89
106
|
def replace_fonts(less)
|
|
90
|
-
less.gsub(/#font \> \.([\w-]+)/, '@include
|
|
107
|
+
less.gsub(/#font \> \.([\w-]+)/, '@include font-\1')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def replace_font_family(less)
|
|
111
|
+
less.gsub(/#font \> #family \> \.([\w-]+)/, '@include font-family-\1')
|
|
91
112
|
end
|
|
92
113
|
|
|
93
114
|
def replace_grads(less)
|
|
@@ -102,6 +123,10 @@ private
|
|
|
102
123
|
less.gsub(/\.([\w-]*)(\(.*\));?/, '@include \1\2;')
|
|
103
124
|
end
|
|
104
125
|
|
|
126
|
+
def replace_less_extend(less)
|
|
127
|
+
less.gsub(/\#(\w+) \> \.([\w-]*)(\(.*\));?/, '@include \1-\2\3;')
|
|
128
|
+
end
|
|
129
|
+
|
|
105
130
|
def replace_spin(less)
|
|
106
131
|
less.gsub(/spin/, 'adjust-hue')
|
|
107
132
|
end
|
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Bootstrap
|
|
2
|
+
* Bootstrap v2.0.0
|
|
3
3
|
*
|
|
4
|
-
* Copyright
|
|
4
|
+
* Copyright 2012 Twitter, Inc
|
|
5
5
|
* Licensed under the Apache License v2.0
|
|
6
6
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
7
|
*
|
|
8
8
|
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
|
9
|
-
* Date: @DATE
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
@import "compass";
|
|
13
12
|
|
|
13
|
+
@import "compass_twitter_bootstrap/mixins";
|
|
14
|
+
|
|
14
15
|
// CSS Reset
|
|
15
16
|
@import "compass_twitter_bootstrap/reset";
|
|
16
17
|
|
|
17
18
|
// Core variables and mixins
|
|
18
|
-
@import "compass_twitter_bootstrap/variables";
|
|
19
|
-
|
|
19
|
+
@import "compass_twitter_bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
|
|
20
|
+
|
|
20
21
|
|
|
21
22
|
// Grid system and page structure
|
|
22
23
|
@import "compass_twitter_bootstrap/scaffolding";
|
|
24
|
+
@import "compass_twitter_bootstrap/grid";
|
|
25
|
+
@import "compass_twitter_bootstrap/layouts";
|
|
23
26
|
|
|
24
|
-
//
|
|
27
|
+
// Base CSS
|
|
25
28
|
@import "compass_twitter_bootstrap/type";
|
|
29
|
+
@import "compass_twitter_bootstrap/code";
|
|
26
30
|
@import "compass_twitter_bootstrap/forms";
|
|
27
31
|
@import "compass_twitter_bootstrap/tables";
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
// Components: common
|
|
34
|
+
@import "compass_twitter_bootstrap/sprites";
|
|
35
|
+
@import "compass_twitter_bootstrap/dropdowns";
|
|
36
|
+
@import "compass_twitter_bootstrap/wells";
|
|
37
|
+
@import "compass_twitter_bootstrap/component-animations";
|
|
38
|
+
@import "compass_twitter_bootstrap/close";
|
|
39
|
+
|
|
40
|
+
// Components: Buttons & Alerts
|
|
41
|
+
@import "compass_twitter_bootstrap/buttons";
|
|
42
|
+
@import "compass_twitter_bootstrap/button-groups";
|
|
43
|
+
@import "compass_twitter_bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
|
|
44
|
+
|
|
45
|
+
// Components: Nav
|
|
46
|
+
@import "compass_twitter_bootstrap/navs";
|
|
47
|
+
@import "compass_twitter_bootstrap/navbar";
|
|
48
|
+
@import "compass_twitter_bootstrap/breadcrumbs";
|
|
49
|
+
@import "compass_twitter_bootstrap/pagination";
|
|
50
|
+
@import "compass_twitter_bootstrap/pager";
|
|
51
|
+
|
|
52
|
+
// Components: Popovers
|
|
53
|
+
@import "compass_twitter_bootstrap/modals";
|
|
54
|
+
@import "compass_twitter_bootstrap/tooltip";
|
|
55
|
+
@import "compass_twitter_bootstrap/popovers";
|
|
56
|
+
|
|
57
|
+
// Components: Misc
|
|
58
|
+
@import "compass_twitter_bootstrap/thumbnails";
|
|
59
|
+
@import "compass_twitter_bootstrap/labels";
|
|
60
|
+
@import "compass_twitter_bootstrap/progress-bars";
|
|
61
|
+
@import "compass_twitter_bootstrap/accordion";
|
|
62
|
+
@import "compass_twitter_bootstrap/carousel";
|
|
63
|
+
@import "compass_twitter_bootstrap/hero-unit";
|
|
64
|
+
|
|
65
|
+
// Utility classes
|
|
66
|
+
@import "compass_twitter_bootstrap/utilities"; // Has to be last to override when necessary
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Bootstrap Responsive v2.0.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2012 Twitter, Inc
|
|
5
|
+
* Licensed under the Apache License v2.0
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// RESPONSIVE
|
|
12
|
+
// For phone and tablet devices
|
|
13
|
+
// -------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// REPEAT VARIABLES & MIXINS
|
|
17
|
+
// -------------------------
|
|
18
|
+
// Required since we compile the responsive stuff separately
|
|
19
|
+
|
|
20
|
+
@import "compass_twitter_bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
|
|
21
|
+
@import "compass_twitter_bootstrap/mixins";
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// RESPONSIVE CLASSES
|
|
25
|
+
// ------------------
|
|
26
|
+
|
|
27
|
+
// Hide from screenreaders and browsers
|
|
28
|
+
// Credit: HTML5 Boilerplate
|
|
29
|
+
.hidden {
|
|
30
|
+
display: none;
|
|
31
|
+
visibility: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
// UP TO LANDSCAPE PHONE
|
|
37
|
+
// ---------------------
|
|
38
|
+
|
|
39
|
+
@media (max-width: 480px) {
|
|
40
|
+
|
|
41
|
+
// Smooth out the collapsing/expanding nav
|
|
42
|
+
.nav-collapse {
|
|
43
|
+
-webkit-transform: translate3d(0, 0, 0); // activate the GPU
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Block level the page header small tag for readability
|
|
47
|
+
.page-header h1 small {
|
|
48
|
+
display: block;
|
|
49
|
+
line-height: $baseLineHeight;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Make span* classes full width
|
|
53
|
+
input[class*="span"],
|
|
54
|
+
select[class*="span"],
|
|
55
|
+
textarea[class*="span"],
|
|
56
|
+
.uneditable-input {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 28px; /* Make inputs at least the height of their button counterpart */
|
|
60
|
+
/* Makes inputs behave like true block-level elements */
|
|
61
|
+
-webkit-box-sizing: border-box; /* Older Webkit */
|
|
62
|
+
-moz-box-sizing: border-box; /* Older FF */
|
|
63
|
+
-ms-box-sizing: border-box; /* IE8 */
|
|
64
|
+
box-sizing: border-box; /* CSS3 spec*/
|
|
65
|
+
}
|
|
66
|
+
// But don't let it screw up prepend/append inputs
|
|
67
|
+
.input-prepend input[class*="span"],
|
|
68
|
+
.input-append input[class*="span"] {
|
|
69
|
+
width: auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Update checkboxes for iOS
|
|
73
|
+
input[type="checkbox"],
|
|
74
|
+
input[type="radio"] {
|
|
75
|
+
border: 1px solid #ccc;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Remove the horizontal form styles
|
|
79
|
+
.form-horizontal .control-group > label {
|
|
80
|
+
float: none;
|
|
81
|
+
width: auto;
|
|
82
|
+
padding-top: 0;
|
|
83
|
+
text-align: left;
|
|
84
|
+
}
|
|
85
|
+
// Move over all input controls and content
|
|
86
|
+
.form-horizontal .controls {
|
|
87
|
+
margin-left: 0;
|
|
88
|
+
}
|
|
89
|
+
// Move the options list down to align with labels
|
|
90
|
+
.form-horizontal .control-list {
|
|
91
|
+
padding-top: 0; // has to be padding because margin collaspes
|
|
92
|
+
}
|
|
93
|
+
// Move over buttons in .form-actions to align with .controls
|
|
94
|
+
.form-horizontal .form-actions {
|
|
95
|
+
padding-left: 10px;
|
|
96
|
+
padding-right: 10px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Modals
|
|
100
|
+
.modal {
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 10px;
|
|
103
|
+
left: 10px;
|
|
104
|
+
right: 10px;
|
|
105
|
+
width: auto;
|
|
106
|
+
margin: 0;
|
|
107
|
+
&.fade.in { top: auto; }
|
|
108
|
+
}
|
|
109
|
+
.modal-header .close {
|
|
110
|
+
padding: 10px;
|
|
111
|
+
margin: -10px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Carousel
|
|
115
|
+
.carousel-caption {
|
|
116
|
+
position: static;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
|
|
124
|
+
// --------------------------------------------------
|
|
125
|
+
|
|
126
|
+
@media (max-width: 768px) {
|
|
127
|
+
// GRID & CONTAINERS
|
|
128
|
+
// -----------------
|
|
129
|
+
// Remove width from containers
|
|
130
|
+
.container {
|
|
131
|
+
width: auto;
|
|
132
|
+
padding: 0 20px;
|
|
133
|
+
}
|
|
134
|
+
// Fluid rows
|
|
135
|
+
.row-fluid {
|
|
136
|
+
width: 100%;
|
|
137
|
+
}
|
|
138
|
+
// Undo negative margin on rows
|
|
139
|
+
.row {
|
|
140
|
+
margin-left: 0;
|
|
141
|
+
}
|
|
142
|
+
// Make all columns even
|
|
143
|
+
.row > [class*="span"],
|
|
144
|
+
.row-fluid > [class*="span"] {
|
|
145
|
+
float: none;
|
|
146
|
+
display: block;
|
|
147
|
+
width: auto;
|
|
148
|
+
margin: 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
// PORTRAIT TABLET TO DEFAULT DESKTOP
|
|
155
|
+
// ----------------------------------
|
|
156
|
+
|
|
157
|
+
@media (min-width: 768px) and (max-width: 980px) {
|
|
158
|
+
|
|
159
|
+
// Fixed grid
|
|
160
|
+
@include gridSystem-generate(12, 42px, 20px);
|
|
161
|
+
|
|
162
|
+
// Fluid grid
|
|
163
|
+
@include fluidGridSystem-generate(12, 5.801104972%, 2.762430939%);
|
|
164
|
+
|
|
165
|
+
// Input grid
|
|
166
|
+
@include inputGridSystem-generate(12, 42px, 20px);
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
// TABLETS AND BELOW
|
|
173
|
+
// -----------------
|
|
174
|
+
@media (max-width: 980px) {
|
|
175
|
+
|
|
176
|
+
// UNFIX THE TOPBAR
|
|
177
|
+
// ----------------
|
|
178
|
+
// Remove any padding from the body
|
|
179
|
+
body {
|
|
180
|
+
padding-top: 0;
|
|
181
|
+
}
|
|
182
|
+
// Unfix the navbar
|
|
183
|
+
.navbar-fixed-top {
|
|
184
|
+
position: static;
|
|
185
|
+
margin-bottom: $baseLineHeight;
|
|
186
|
+
}
|
|
187
|
+
.navbar-fixed-top .navbar-inner {
|
|
188
|
+
padding: 5px;
|
|
189
|
+
}
|
|
190
|
+
.navbar .container {
|
|
191
|
+
width: auto;
|
|
192
|
+
padding: 0;
|
|
193
|
+
}
|
|
194
|
+
// Account for brand name
|
|
195
|
+
.navbar .brand {
|
|
196
|
+
padding-left: 10px;
|
|
197
|
+
padding-right: 10px;
|
|
198
|
+
margin: 0 0 0 -5px;
|
|
199
|
+
}
|
|
200
|
+
// Nav collapse clears brand
|
|
201
|
+
.navbar .nav-collapse {
|
|
202
|
+
clear: left;
|
|
203
|
+
}
|
|
204
|
+
// Block-level the nav
|
|
205
|
+
.navbar .nav {
|
|
206
|
+
float: none;
|
|
207
|
+
margin: 0 0 ($baseLineHeight / 2);
|
|
208
|
+
}
|
|
209
|
+
.navbar .nav > li {
|
|
210
|
+
float: none;
|
|
211
|
+
}
|
|
212
|
+
.navbar .nav > li > a {
|
|
213
|
+
margin-bottom: 2px;
|
|
214
|
+
}
|
|
215
|
+
.navbar .nav > .divider-vertical {
|
|
216
|
+
display: none;
|
|
217
|
+
}
|
|
218
|
+
// Nav and dropdown links in navbar
|
|
219
|
+
.navbar .nav > li > a,
|
|
220
|
+
.navbar .dropdown-menu a {
|
|
221
|
+
padding: 6px 15px;
|
|
222
|
+
font-weight: bold;
|
|
223
|
+
color: $navbarLinkColor;
|
|
224
|
+
@include border-radius(3px);
|
|
225
|
+
}
|
|
226
|
+
.navbar .dropdown-menu li + li a {
|
|
227
|
+
margin-bottom: 2px;
|
|
228
|
+
}
|
|
229
|
+
.navbar .nav > li > a:hover,
|
|
230
|
+
.navbar .dropdown-menu a:hover {
|
|
231
|
+
background-color: $navbarBackground;
|
|
232
|
+
}
|
|
233
|
+
// Dropdowns in the navbar
|
|
234
|
+
.navbar .dropdown-menu {
|
|
235
|
+
position: static;
|
|
236
|
+
top: auto;
|
|
237
|
+
left: auto;
|
|
238
|
+
float: none;
|
|
239
|
+
display: block;
|
|
240
|
+
max-width: none;
|
|
241
|
+
margin: 0 15px;
|
|
242
|
+
padding: 0;
|
|
243
|
+
background-color: transparent;
|
|
244
|
+
border: none;
|
|
245
|
+
@include border-radius(0);
|
|
246
|
+
@include box-shadow(none);
|
|
247
|
+
}
|
|
248
|
+
.navbar .dropdown-menu:before,
|
|
249
|
+
.navbar .dropdown-menu:after {
|
|
250
|
+
display: none;
|
|
251
|
+
}
|
|
252
|
+
.navbar .dropdown-menu .divider {
|
|
253
|
+
display: none;
|
|
254
|
+
}
|
|
255
|
+
// Forms in navbar
|
|
256
|
+
.navbar-form,
|
|
257
|
+
.navbar-search {
|
|
258
|
+
float: none;
|
|
259
|
+
padding: ($baseLineHeight / 2) 15px;
|
|
260
|
+
margin: ($baseLineHeight / 2) 0;
|
|
261
|
+
border-top: 1px solid $navbarBackground;
|
|
262
|
+
border-bottom: 1px solid $navbarBackground;
|
|
263
|
+
$shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
|
|
264
|
+
@include box-shadow($shadow);
|
|
265
|
+
}
|
|
266
|
+
// Pull right (secondary) nav content
|
|
267
|
+
.navbar .nav.pull-right {
|
|
268
|
+
float: none;
|
|
269
|
+
margin-left: 0;
|
|
270
|
+
}
|
|
271
|
+
// Static navbar
|
|
272
|
+
.navbar-static .navbar-inner {
|
|
273
|
+
padding-left: 10px;
|
|
274
|
+
padding-right: 10px;
|
|
275
|
+
}
|
|
276
|
+
// Navbar button
|
|
277
|
+
.btn-navbar {
|
|
278
|
+
display: block;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Hide everything in the navbar save .brand and toggle button */
|
|
282
|
+
.nav-collapse {
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
height: 0;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
// DEFAULT DESKTOP
|
|
291
|
+
// ---------------
|
|
292
|
+
|
|
293
|
+
@media (min-width: 980px) {
|
|
294
|
+
.nav-collapse.collapse {
|
|
295
|
+
height: auto !important;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
// LARGE DESKTOP & UP
|
|
302
|
+
// ------------------
|
|
303
|
+
|
|
304
|
+
@media (min-width: 1200px) {
|
|
305
|
+
|
|
306
|
+
// Fixed grid
|
|
307
|
+
@include gridSystem-generate(12, 70px, 30px);
|
|
308
|
+
|
|
309
|
+
// Fluid grid
|
|
310
|
+
@include fluidGridSystem-generate(12, 5.982905983%, 2.564102564%);
|
|
311
|
+
|
|
312
|
+
// Input grid
|
|
313
|
+
@include inputGridSystem-generate(12, 70px, 30px);
|
|
314
|
+
|
|
315
|
+
// Thumbnails
|
|
316
|
+
.thumbnails {
|
|
317
|
+
margin-left: -30px;
|
|
318
|
+
}
|
|
319
|
+
.thumbnails > li {
|
|
320
|
+
margin-left: 30px;
|
|
321
|
+
}
|
|
322
|
+
}
|