bootswatch-rails 0.4.0 → 0.5.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.
Files changed (34) hide show
  1. checksums.yaml +15 -0
  2. data/CONVERSION.md +10 -0
  3. data/HISTORY.md +7 -1
  4. data/README.md +1 -0
  5. data/Rakefile +1 -0
  6. data/lib/bootswatch-rails/version.rb +1 -1
  7. data/rearranges +131 -0
  8. data/vendor/assets/stylesheets/bootswatch/amelia/_bootswatch.scss +86 -40
  9. data/vendor/assets/stylesheets/bootswatch/amelia/_variables.scss +22 -24
  10. data/vendor/assets/stylesheets/bootswatch/cerulean/_bootswatch.scss +1 -1
  11. data/vendor/assets/stylesheets/bootswatch/cerulean/_variables.scss +1 -1
  12. data/vendor/assets/stylesheets/bootswatch/cosmo/_bootswatch.scss +1 -1
  13. data/vendor/assets/stylesheets/bootswatch/cosmo/_variables.scss +1 -1
  14. data/vendor/assets/stylesheets/bootswatch/cyborg/_bootswatch.scss +9 -1
  15. data/vendor/assets/stylesheets/bootswatch/cyborg/_variables.scss +1 -1
  16. data/vendor/assets/stylesheets/bootswatch/flatly/_bootswatch.scss +515 -0
  17. data/vendor/assets/stylesheets/bootswatch/flatly/_variables.scss +300 -0
  18. data/vendor/assets/stylesheets/bootswatch/journal/_bootswatch.scss +1 -1
  19. data/vendor/assets/stylesheets/bootswatch/journal/_variables.scss +2 -1
  20. data/vendor/assets/stylesheets/bootswatch/readable/_bootswatch.scss +1 -1
  21. data/vendor/assets/stylesheets/bootswatch/readable/_variables.scss +1 -1
  22. data/vendor/assets/stylesheets/bootswatch/simplex/_bootswatch.scss +11 -4
  23. data/vendor/assets/stylesheets/bootswatch/simplex/_variables.scss +1 -1
  24. data/vendor/assets/stylesheets/bootswatch/slate/_bootswatch.scss +14 -5
  25. data/vendor/assets/stylesheets/bootswatch/slate/_variables.scss +2 -2
  26. data/vendor/assets/stylesheets/bootswatch/spacelab/_bootswatch.scss +6 -2
  27. data/vendor/assets/stylesheets/bootswatch/spacelab/_variables.scss +1 -3
  28. data/vendor/assets/stylesheets/bootswatch/spruce/_bootswatch.scss +20 -12
  29. data/vendor/assets/stylesheets/bootswatch/spruce/_variables.scss +3 -3
  30. data/vendor/assets/stylesheets/bootswatch/superhero/_bootswatch.scss +43 -24
  31. data/vendor/assets/stylesheets/bootswatch/superhero/_variables.scss +3 -3
  32. data/vendor/assets/stylesheets/bootswatch/united/_bootswatch.scss +1 -1
  33. data/vendor/assets/stylesheets/bootswatch/united/_variables.scss +1 -1
  34. metadata +9 -9
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjQ4NTMwOTlhOTYxNDM4Y2U3YzlhMGIxMjllZmMzNGMyODQ4MDQ4Nw==
5
+ data.tar.gz: !binary |-
6
+ ZDNiYjgzNzZkOTJjZDFhZjA2NWUyYzc0OWVhNWUzNTQ5NTVmOTYwNQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ Zjc1ZjNhN2FlMTgzMDI3Y2E2Y2VlNjEzNDcxMmRlNzhiYmFiZDQ0ZmI0MDQw
10
+ MGMyNGRlNjA4MDJmNTA4OWQ1Nzg2MzAwZGYxMjlhYTQ0NjBkNjhiNjYyZmYz
11
+ NDEzZmM4ZGE4Mzk3N2NmZDUwMGY2NjVmODE2Y2Q0NGFjZjY3YWQ=
12
+ data.tar.gz: !binary |-
13
+ MzEzMTBkZjAwNDdlODk2OWEzZDJjMzRhNTQ3ZGJmMDUzNGE1ZTMyNjExZTMw
14
+ NjEyZmI4OGY3YzMxZjQ3MWMzYTMyMDJmNzY2MThkZTY1YmU2M2UzM2IwMjJm
15
+ YTQ3YzY2YWFmYTgwZTVhY2ExODBkZGNiMzJhODE5ZmU4ZTFiNWQ=
data/CONVERSION.md ADDED
@@ -0,0 +1,10 @@
1
+ ## Notes on conversion
2
+
3
+ TODO: Automate these
4
+
5
+ 1. Update bootswatch submodule
6
+ 2. Run rake convert
7
+ 3. Run ./rearranges and fix variable declaration orders
8
+ 4. Search *.scss for this regexp: \We\( and remove occurrences of e function
9
+ 5. Search *.scss for this regexp: @include.+!important and move !important into parentheses
10
+ 6. Search *.scss for this regexp: &- and prepend parent selector instead
data/HISTORY.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.5.0 (2013-02-22)
2
+
3
+ * Update all themes to current bootswatch versions (2.3.2)
4
+ * Add Flatly theme
5
+ * Add script for determining variables that need to be rearranged
6
+ * Add list of conversions to do manually (CONVERSION.md)
7
+
1
8
  ## 0.4.0 (2013-02-22)
2
9
 
3
10
  * Update all themes to current bootswatch versions (2.3.0)
@@ -11,7 +18,6 @@
11
18
 
12
19
  * Add !default to all bootswatch variables, making them overridable
13
20
 
14
-
15
21
  ## 0.3.0 (2013-01-13)
16
22
 
17
23
  * Add a converter script for most of the repetitive less/sass conversion work
data/README.md CHANGED
@@ -68,6 +68,7 @@ Included bootswatches
68
68
  * [Cerulean](http://bootswatch.com/cerulean/)
69
69
  * [Cosmo](http://bootswatch.com/cosmo/)
70
70
  * [Cyborg](http://bootswatch.com/cyborg/)
71
+ * [Flatly](http://bootswatch.com/flatly/)
71
72
  * [Journal](http://bootswatch.com/journal/)
72
73
  * [Readable](http://bootswatch.com/readable/)
73
74
  * [Simplex](http://bootswatch.com/simplex/)
data/Rakefile CHANGED
@@ -6,6 +6,7 @@ THEMES = %w(
6
6
  cerulean
7
7
  cosmo
8
8
  cyborg
9
+ flatly
9
10
  journal
10
11
  readable
11
12
  simplex
@@ -1,5 +1,5 @@
1
1
  module Bootswatch
2
2
  module Rails
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
data/rearranges ADDED
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Run this script to see if any variables need to be rearranged
4
+
5
+ body = if ARGV[0]
6
+ File.read(ARGV[0])
7
+ else
8
+ Dir['vendor/assets/stylesheets/bootswatch/*/_variables.scss'].each do |path|
9
+ puts "#{path.split('/')[-2]}:"
10
+ puts `./#{__FILE__} #{path}`
11
+ puts "\n"
12
+ end
13
+ exit(0)
14
+ end
15
+
16
+
17
+ class Variable
18
+ class << self
19
+ attr_accessor :sections
20
+ end
21
+
22
+ def self.from_token(token, section_index)
23
+ if token.strip =~ /\:$/
24
+ new token.strip.chop.strip, section_index: section_index,
25
+ assignment: true
26
+ else
27
+ new token.strip, section_index: section_index
28
+ end
29
+ end
30
+
31
+ def initialize(name, options = {})
32
+ @name = name
33
+ @assignment = true if options[:assignment]
34
+ @section_index = options[:section_index]
35
+ end
36
+
37
+ attr_reader :section_index
38
+
39
+ def assignment?
40
+ @assignment
41
+ end
42
+
43
+ def section
44
+ self.class.sections[@section_index]
45
+ end
46
+
47
+ def section_header
48
+ self.class.sections[@section_index - 1]
49
+ end
50
+
51
+ def section_name
52
+ section_header.split("\n").first.sub('// ', '')
53
+ end
54
+
55
+ def to_s
56
+ @name
57
+ end
58
+
59
+ def ==(other)
60
+ to_s == other.to_s
61
+ end
62
+ end
63
+
64
+ Variable.sections = body.split(/(\/\/\s+\w[^\/]+\/\/\s+-+)/m)
65
+
66
+ tokens = []
67
+ in_section = false
68
+
69
+ Variable.sections.each.with_index do |section, index|
70
+ if in_section
71
+ tokens[index] = section.scan(/\$\w+\s*\:?/)
72
+ in_section = false
73
+ elsif section =~ /(\/\/\s+\w[^\/]+\/\/\s+-+)/m
74
+ tokens[index] = []
75
+ in_section = true
76
+ else
77
+ tokens[index] = []
78
+ end
79
+ end
80
+
81
+ unassigned = []
82
+ assigned = []
83
+
84
+ tokens.each.with_index do |group, index|
85
+ group.each do |token|
86
+ variable = Variable.from_token(token, index)
87
+
88
+ if !variable.assignment? && !assigned.include?(variable)
89
+ unassigned << variable
90
+ end
91
+
92
+ if variable.assignment?
93
+ assigned << variable
94
+ end
95
+ end
96
+ end
97
+
98
+ moves = []
99
+ unassigned.each do |variable|
100
+ assignment = assigned.find{|v| v == variable}
101
+ moves << [
102
+ [ variable.section_name,
103
+ variable.section_header,
104
+ variable.section,
105
+ variable ],
106
+ [ assignment.section_name,
107
+ assignment.section_header,
108
+ assignment.section,
109
+ assignment ]
110
+ ]
111
+ end
112
+
113
+ moves.uniq!
114
+
115
+ moves.each do |move|
116
+ src_sec_name = move.first.first
117
+ dst_sec_name = move.last.first
118
+
119
+ src_var = move.first.last
120
+ dst_var = move.last.last
121
+
122
+ if src_sec_name == dst_sec_name
123
+ puts " Swap lines under #{src_sec_name} section due to #{src_var}"
124
+ else
125
+ puts " Move #{src_sec_name} section under #{dst_sec_name} due to #{src_var}"
126
+ end
127
+ end
128
+
129
+ if moves.empty?
130
+ puts " All good!"
131
+ end
@@ -1,4 +1,4 @@
1
- // Amelia 2.3.0
1
+ // Amelia 2.3.2
2
2
  // Bootswatch
3
3
  // -----------------------------------------------------
4
4
 
@@ -36,7 +36,7 @@ blockquote {
36
36
  }
37
37
 
38
38
  .muted {
39
- color: rgba(255, 255, 255, 0.5);
39
+ color: rgba(255, 255, 255, 0.6);
40
40
  }
41
41
 
42
42
  // SCAFFOLDING
@@ -47,7 +47,7 @@ body {
47
47
  }
48
48
 
49
49
  hr {
50
- border-bottom: 1px solid rgba(255, 255, 255, 0.3);
50
+ border-bottom: none;
51
51
  }
52
52
 
53
53
  .page-header {
@@ -206,59 +206,79 @@ div.subnav {
206
206
  }
207
207
  }
208
208
 
209
+ @media (max-width: 767px) {
210
+
211
+ div.subnav .nav > li + li > a {
212
+ border-top: 1px solid rgba(255, 255, 255, 0.4);
213
+ }
214
+ }
215
+
209
216
  // NAV
210
217
  // -----------------------------------------------------
211
218
 
212
- .nav-tabs li.open > .dropdown-toggle,
213
- .nav-pills li.open > .dropdown-toggle {
214
- background-color: #8AD5DC;
215
- color: $linkColor;
216
- border-color: transparent;
217
- }
219
+ .nav-tabs,
220
+ .nav-pills {
218
221
 
219
- .nav-tabs, .nav-pills {
220
222
  border-color: transparent;
221
223
 
222
- li > a {
224
+
225
+ & > li > a {
223
226
  border-color: transparent;
224
227
  @include border-radius(0);
225
228
  @include box-shadow(0);
226
229
  }
227
230
 
228
- li.active > a,
229
- li.active > a:hover {
230
- color: $textColor;
231
+ & > li > a:hover {
232
+ background-color: #8AD5DC;
233
+ border-color: transparent;
234
+ text-shadow: none;
231
235
  }
232
236
 
233
- li.active > a,
234
- li > a:hover,
235
- li.active > a:hover {
237
+ & > .active > a,
238
+ & > .active > a:hover {
236
239
  background-color: #8AD5DC;
237
240
  border-color: transparent;
241
+ color: $textColor;
238
242
  text-shadow: none;
239
243
  }
240
- }
241
244
 
242
- .nav-tabs, .nav-tabs > li > a {
243
- border-bottom: 1px solid rgba(255, 255, 255, 0.5);
244
- }
245
+ & > .disabled > a,
246
+ & > .disabled > a:hover {
247
+ background: none;
248
+ color: $grayLighter;
249
+ }
250
+
251
+ & > .open > .dropdown-toggle,
252
+ & > .open > .dropdown-toggle {
253
+ background-color: #8AD5DC;
254
+ color: $linkColor;
255
+ border-color: transparent;
256
+ }
257
+
245
258
 
246
- .nav-tabs > li > a {
247
- background-color: #3CB9C6;
248
259
  }
249
260
 
250
- .nav-tabs.nav-stacked {
261
+ .nav-tabs {
251
262
 
252
- li > a:first-child,
253
- li > a:last-child {
254
- @include border-radius(0);
263
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
264
+
265
+ & > li > a {
266
+ background-color: #3CB9C6;
255
267
  }
256
268
 
257
- li > a,
258
- li > a:hover,
259
- li.active > a,
260
- li.active > a:hover {
261
- border-color: transparent;
269
+ &.nav-stacked {
270
+
271
+ li > a:first-child,
272
+ li > a:last-child {
273
+ @include border-radius(0);
274
+ }
275
+
276
+ li > a,
277
+ li > a:hover,
278
+ li.active > a,
279
+ li.active > a:hover {
280
+ border-color: transparent;
281
+ }
262
282
  }
263
283
  }
264
284
 
@@ -294,6 +314,7 @@ div.subnav {
294
314
  }
295
315
 
296
316
  .breadcrumb {
317
+
297
318
  background-color: #3CB9C6;
298
319
  background-image: none;
299
320
 
@@ -305,8 +326,9 @@ div.subnav {
305
326
  color: $white;
306
327
  }
307
328
 
308
- .divider {
309
- color: $linkColor;
329
+ & > li > a.divider,
330
+ & > li > span.divider {
331
+ color: $grayLighter;
310
332
  }
311
333
  }
312
334
 
@@ -382,7 +404,7 @@ div.subnav {
382
404
  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
383
405
  &:active,
384
406
  &.active {
385
- background-color: darken($color, 15%) e("\9");
407
+ background-color: darken($color, 15%);
386
408
  }
387
409
  }
388
410
 
@@ -494,8 +516,8 @@ legend {
494
516
  }
495
517
 
496
518
  legend, label, .help-block, .input-file {
497
- color: $textColor;
498
519
  border: 0px solid transparent;
520
+ color: inherit;
499
521
  }
500
522
 
501
523
  input, textarea, .uneditable-input {
@@ -526,12 +548,28 @@ input, textarea, .search-query, .uneditable-input,
526
548
  border-top: 0px solid transparent;
527
549
  }
528
550
 
551
+ .control-group.warning {
552
+ @include formFieldState($yellow, lighten($yellow, 30%), $warningBackground);
553
+ }
554
+
555
+ .control-group.error {
556
+ @include formFieldState($orange, lighten($orange, 30%), $errorBackground);
557
+ }
558
+
559
+ .control-group.success {
560
+ @include formFieldState($green, lighten($green, 20%), $successBackground);
561
+ }
562
+
563
+ .control-group.info {
564
+ @include formFieldState($purple, lighten($purple, 20%), $infoBackground);
565
+ }
566
+
529
567
  .control-group.warning {
530
568
 
531
569
  .control-label,
532
570
  .help-block,
533
571
  .help-inline {
534
- color: lighten($orange, 30%);
572
+ color: lighten($yellow, 30%);
535
573
  }
536
574
  }
537
575
 
@@ -540,7 +578,7 @@ input, textarea, .search-query, .uneditable-input,
540
578
  .control-label,
541
579
  .help-block,
542
580
  .help-inline {
543
- color: lighten($linkColor, 10%);
581
+ color: lighten($orange, 30%);
544
582
  }
545
583
  }
546
584
 
@@ -552,6 +590,14 @@ input, textarea, .search-query, .uneditable-input,
552
590
  color: lighten($green, 20%);
553
591
  }
554
592
  }
593
+ .control-group.info {
594
+
595
+ .control-label,
596
+ .help-block,
597
+ .help-inline {
598
+ color: lighten($purple, 20%);
599
+ }
600
+ }
555
601
 
556
602
  .input-prepend .add-on,
557
603
  .input-append .add-on {
@@ -701,7 +747,7 @@ input, textarea, .search-query, .uneditable-input,
701
747
  }
702
748
 
703
749
  .modal-body {
704
-
750
+
705
751
  color: $grayDark;
706
752
 
707
753
  h1, h2, h3, h4, h5, h6,
@@ -728,7 +774,7 @@ input, textarea, .search-query, .uneditable-input,
728
774
  }
729
775
 
730
776
  .popover {
731
-
777
+
732
778
  padding: 0;
733
779
  @include border-radius(0);
734
780
  color: $grayDark;
@@ -1,4 +1,4 @@
1
- // Amelia 2.3.0
1
+ // Amelia 2.3.2
2
2
  // Variables
3
3
  // --------------------------------------------------
4
4
 
@@ -33,7 +33,7 @@ $purple: #4D3A7D !default;
33
33
  // Scaffolding
34
34
  // -------------------------
35
35
  $bodyBackground: #003F4D !default;
36
- $textColor: rgba(255, 255, 255, 0.9) !default;
36
+ $textColor: #E1F0F0 !default;
37
37
 
38
38
 
39
39
  // Links
@@ -82,7 +82,6 @@ $tableBackgroundAccent: lighten(#147E88, 15%) !default; // for strip
82
82
  $tableBackgroundHover: rgba(255, 255, 255, 0.4) !default; // for hover
83
83
  $tableBorder: lighten(#147E88, 12%) !default; // table and cell border
84
84
 
85
-
86
85
  // Forms
87
86
  // -------------------------
88
87
  $inputBackground: $white !default;
@@ -138,7 +137,7 @@ $placeholderText: $grayLight !default;
138
137
 
139
138
  // Hr border color
140
139
  // -------------------------
141
- $hrBorder: transparent !default;
140
+ $hrBorder: rgba(255, 255, 255, 0.3) !default;
142
141
 
143
142
 
144
143
  // Horizontal forms & lists
@@ -170,26 +169,6 @@ $navbarLinkBackgroundActive: lighten($navbarBackground, 10%) !default;
170
169
 
171
170
  $navbarBrandColor: $navbarLinkColor !default;
172
171
 
173
- // Inverted navbar
174
- $navbarInverseBackground: $yellow !default;
175
- $navbarInverseBackgroundHighlight: $yellow !default;
176
- $navbarInverseBorder: rgba(0, 0, 0, 0.1) !default;
177
-
178
- $navbarInverseText: $white !default;
179
- $navbarInverseLinkColor: $white !default;
180
- $navbarInverseLinkColorHover: $white !default;
181
- $navbarInverseLinkColorActive: $white !default;
182
- $navbarInverseLinkBackgroundHover: rgba(255, 255, 255, 0.2) !default;
183
- $navbarInverseLinkBackgroundActive: rgba(255, 255, 255, 0.2) !default;
184
-
185
- $navbarInverseSearchBackground: lighten($navbarInverseBackground, 25%) !default;
186
- $navbarInverseSearchBackgroundFocus: $white !default;
187
- $navbarInverseSearchBorder: $navbarInverseBackground !default;
188
- $navbarInverseSearchPlaceholderColor: $white !default;
189
-
190
- $navbarInverseBrandColor: $navbarInverseLinkColor !default;
191
-
192
-
193
172
  // Buttons
194
173
  // -------------------------
195
174
  $btnBackground: $grayLighter !default;
@@ -214,6 +193,25 @@ $btnDangerBackgroundHighlight: $yellow !default;
214
193
  $btnInverseBackground: #27666D !default;
215
194
  $btnInverseBackgroundHighlight: #27666D !default;
216
195
 
196
+ // Inverted navbar
197
+ $navbarInverseBackground: $yellow !default;
198
+ $navbarInverseBackgroundHighlight: $yellow !default;
199
+ $navbarInverseBorder: rgba(0, 0, 0, 0.1) !default;
200
+
201
+ $navbarInverseText: $white !default;
202
+ $navbarInverseLinkColor: $white !default;
203
+ $navbarInverseLinkColorHover: $white !default;
204
+ $navbarInverseLinkColorActive: $white !default;
205
+ $navbarInverseLinkBackgroundHover: rgba(255, 255, 255, 0.2) !default;
206
+ $navbarInverseLinkBackgroundActive: rgba(255, 255, 255, 0.2) !default;
207
+
208
+ $navbarInverseSearchBackground: lighten($navbarInverseBackground, 25%) !default;
209
+ $navbarInverseSearchBackgroundFocus: $white !default;
210
+ $navbarInverseSearchBorder: $navbarInverseBackground !default;
211
+ $navbarInverseSearchPlaceholderColor: $white !default;
212
+
213
+ $navbarInverseBrandColor: $navbarInverseLinkColor !default;
214
+
217
215
 
218
216
  // Pagination
219
217
  // -------------------------