compass_twitter_bootstrap 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Overview
|
2
|
+
|
3
|
+
## 0.1.6
|
4
|
+
* Start of a less to scss converter
|
5
|
+
* Added change log
|
6
|
+
|
7
|
+
## 0.1.5
|
8
|
+
* Upgraded to twitter bootstrap version 1.3
|
9
|
+
* Asset Pipeline (thanks to ascrazy)
|
10
|
+
|
11
|
+
## 0.1.4
|
12
|
+
Upgraded to twitter bootstrap version 1.2
|
13
|
+
|
14
|
+
## 0.1.3
|
15
|
+
* fix firefox button:hover bug
|
16
|
+
|
17
|
+
## 0.1.2
|
18
|
+
* Added homepage link
|
19
|
+
* Updated app name
|
20
|
+
|
21
|
+
## 0.1.1
|
22
|
+
initial version
|
data/lib/convert.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
class Convert
|
2
|
+
def process
|
3
|
+
less_files.each do |name, file|
|
4
|
+
file = open_git_file(file)
|
5
|
+
file = convert(file)
|
6
|
+
save_file(name, file)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def less_files
|
13
|
+
{
|
14
|
+
'_reset' => 'https://raw.github.com/twitter/bootstrap/master/lib/reset.less',
|
15
|
+
'_variables' => 'https://raw.github.com/twitter/bootstrap/master/lib/variables.less',
|
16
|
+
'_scaffolding' => 'https://raw.github.com/twitter/bootstrap/master/lib/scaffolding.less',
|
17
|
+
'_type' => 'https://raw.github.com/twitter/bootstrap/1.3-wip/lib/type.less',
|
18
|
+
'_forms' => 'https://raw.github.com/twitter/bootstrap/master/lib/forms.less',
|
19
|
+
'_tables' => 'https://raw.github.com/twitter/bootstrap/master/lib/tables.less',
|
20
|
+
'_patterns' => 'https://raw.github.com/twitter/bootstrap/1.3-wip/lib/patterns.less'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def convert(file)
|
25
|
+
file = replace_vars(file)
|
26
|
+
file = replace_fonts(file)
|
27
|
+
file = replace_grads(file)
|
28
|
+
file = replace_mixins(file)
|
29
|
+
file = replace_includes(file)
|
30
|
+
file = replace_spin(file)
|
31
|
+
|
32
|
+
file
|
33
|
+
end
|
34
|
+
|
35
|
+
def open_git_file(file)
|
36
|
+
URI.parse(file).read
|
37
|
+
end
|
38
|
+
|
39
|
+
def save_file(name, content)
|
40
|
+
f = File.new("#{name}.scss", "w")
|
41
|
+
f.write(content)
|
42
|
+
f.close
|
43
|
+
end
|
44
|
+
|
45
|
+
def replace_vars(less)
|
46
|
+
less.gsub(/@/, '$')
|
47
|
+
end
|
48
|
+
|
49
|
+
def replace_fonts(less)
|
50
|
+
less.gsub(/#font \> \.([\w-]+)/, '@include \1')
|
51
|
+
end
|
52
|
+
|
53
|
+
def replace_grads(less)
|
54
|
+
less.gsub(/#gradient \> \.([\w-]+)/, '@include gradient-\1')
|
55
|
+
end
|
56
|
+
|
57
|
+
def replace_mixins(less)
|
58
|
+
less.gsub(/^\.([\w-]*)(\(.*\))([\s\{]+)$/, '@mixin \1\2\3')
|
59
|
+
end
|
60
|
+
|
61
|
+
def replace_includes(less)
|
62
|
+
less.gsub(/\.([\w-]*)(\(.*\));?/, '@include \1\2;')
|
63
|
+
end
|
64
|
+
|
65
|
+
def replace_spin(less)
|
66
|
+
less.gsub(/spin/, 'adjust-hue')
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
@@ -65,7 +65,7 @@
|
|
65
65
|
float: left;
|
66
66
|
margin: 5px 0 0 0;
|
67
67
|
position: relative;
|
68
|
-
@include opacity(
|
68
|
+
@include opacity(1);
|
69
69
|
}
|
70
70
|
// Todo: remove from v2.0 when ready, added for legacy
|
71
71
|
form.pull-right {
|
@@ -235,7 +235,7 @@ a.menu:after,
|
|
235
235
|
border-left: 4px solid transparent;
|
236
236
|
border-right: 4px solid transparent;
|
237
237
|
border-top: 4px solid $white;
|
238
|
-
@include opacity(
|
238
|
+
@include opacity(0.5);
|
239
239
|
}
|
240
240
|
// The dropdown menu (ul)
|
241
241
|
// .menu-dropdown for backwards compatibility
|
@@ -566,7 +566,7 @@ footer {
|
|
566
566
|
cursor: default;
|
567
567
|
background-image: none;
|
568
568
|
@include reset-filter();
|
569
|
-
@include opacity(65);
|
569
|
+
@include opacity(0.65);
|
570
570
|
@include box-shadow(none);
|
571
571
|
}
|
572
572
|
&[disabled] {
|
@@ -575,7 +575,7 @@ footer {
|
|
575
575
|
cursor: default;
|
576
576
|
background-image: none;
|
577
577
|
@include reset-filter();
|
578
|
-
@include opacity(65);
|
578
|
+
@include opacity(0.65);
|
579
579
|
@include box-shadow(none);
|
580
580
|
}
|
581
581
|
|
@@ -616,11 +616,11 @@ input[type=submit].btn {
|
|
616
616
|
font-weight: bold;
|
617
617
|
line-height: $baseline * .75;
|
618
618
|
text-shadow: 0 1px 0 rgba(255,255,255,1);
|
619
|
-
@include opacity(
|
619
|
+
@include opacity(0.2);
|
620
620
|
&:hover {
|
621
621
|
color: $black;
|
622
622
|
text-decoration: none;
|
623
|
-
@include opacity(
|
623
|
+
@include opacity(0.4);
|
624
624
|
}
|
625
625
|
}
|
626
626
|
|
@@ -781,7 +781,7 @@ input[type=submit].btn {
|
|
781
781
|
}
|
782
782
|
|
783
783
|
.modal-backdrop, .modal-backdrop.fade.in {
|
784
|
-
@include opacity(
|
784
|
+
@include opacity(0.8);
|
785
785
|
}
|
786
786
|
|
787
787
|
.modal {
|
@@ -873,9 +873,9 @@ input[type=submit].btn {
|
|
873
873
|
padding: 5px;
|
874
874
|
font-size: 11px;
|
875
875
|
z-index: 1000;
|
876
|
-
@include opacity(
|
876
|
+
@include opacity(0.8);
|
877
877
|
&.fade.in {
|
878
|
-
@include opacity(
|
878
|
+
@include opacity(0.8);
|
879
879
|
}
|
880
880
|
&.above .twipsy-arrow { @include popover-arrow-above(); }
|
881
881
|
&.left .twipsy-arrow { @include popover-arrow-left(); }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass_twitter_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: compass
|
16
|
-
requirement: &
|
16
|
+
requirement: &70259875295220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70259875295220
|
25
25
|
description: Compass/SCSS version of the twitter bootstrap
|
26
26
|
email:
|
27
27
|
- vrwaller@gmail.com
|
@@ -30,12 +30,14 @@ extensions: []
|
|
30
30
|
extra_rdoc_files: []
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
|
+
- CHANGELOG.md
|
33
34
|
- Gemfile
|
34
35
|
- README.md
|
35
36
|
- Rakefile
|
36
37
|
- compass_twitter_bootstrap.gemspec
|
37
38
|
- lib/compass_twitter_bootstrap.rb
|
38
39
|
- lib/compass_twitter_bootstrap/version.rb
|
40
|
+
- lib/convert.rb
|
39
41
|
- stylesheets/_compass_twitter_bootstrap.scss
|
40
42
|
- stylesheets/compass_twitter_bootstrap/_forms.scss
|
41
43
|
- stylesheets/compass_twitter_bootstrap/_mixins.scss
|
@@ -59,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
61
|
version: '0'
|
60
62
|
segments:
|
61
63
|
- 0
|
62
|
-
hash:
|
64
|
+
hash: -1959339387086933232
|
63
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
66
|
none: false
|
65
67
|
requirements:
|
@@ -68,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
70
|
version: '0'
|
69
71
|
segments:
|
70
72
|
- 0
|
71
|
-
hash:
|
73
|
+
hash: -1959339387086933232
|
72
74
|
requirements: []
|
73
75
|
rubyforge_project:
|
74
76
|
rubygems_version: 1.8.10
|