tagmanager-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,105 +1,178 @@
1
1
  //
2
- // Bootstrap tagmanager
2
+ // Bootstrap TagManager
3
3
  // --------------------------------------------------
4
4
 
5
- .myTag {
6
- background: none repeat scroll 0 0 $successBackground;
7
- border: 1px solid $linkColor;
8
- border-radius: 3px 3px 3px 3px;
9
- color: $linkColor;
10
- // to be tested
11
- display: block;
12
- float: left;
13
-
14
- font-family: $sansFontFamily;
15
- font-size: $baseFontSize;
16
- margin-bottom: 5px;
17
- margin-right: 5px;
18
- //padding-top: 6px;
19
- //padding-bottom: 5px;
20
- padding: 4px 5px;
21
- text-decoration: none;
5
+ // Tag Variables
6
+ // --------------------------------------------------
22
7
 
23
- vertical-align: middle;
24
- line-height: $baseLineHeight;
25
- height: $baseLineHeight;
26
- -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
27
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
28
- }
29
- .myTagError {
30
- background-color: $btnDangerBackground;
31
- }
32
- .myTagRemover {
33
- color: $gray;
34
- }
35
- .myTagRemover:hover {
36
- text-decoration: none;
37
- }
38
- .tagManager {
39
- border-radius: 3px 3px 3px 3px;
40
- margin-top:0;
41
- }
8
+ // Colors
9
+ // -------------------------
10
+
11
+ $tagText: $gray;
12
+ $tagBackground: #f5f5f5;
13
+ $tagBorder: #bbb;
14
+
15
+ $tagWarningText: #945203;
16
+ $tagWarningBackground: #f2c889;
17
+ $tagWarningBorder: #f0a12f;
18
+
19
+ $tagErrorText: #84212e;
20
+ $tagErrorBackground: #e69ca6;
21
+ $tagErrorBorder: #d24a5d;
42
22
 
43
- .myFramedTag {
44
- background: none repeat scroll 0 0 $successBackground;
45
- border: 1px solid $linkColor;
46
- border-radius: 3px 3px 3px 3px;
47
- color: $linkColor;
48
- //display: block;
49
- //float: left;
23
+ $tagSuccessText: #638421;
24
+ $tagSuccessBackground: #cde69c;
25
+ $tagSuccessBorder: #a5d24a;
26
+
27
+ $tagInfoText: #4594b5;
28
+ $tagInfoBackground: #c5eefa;
29
+ $tagInfoBorder: #5dc8f7;
30
+
31
+ $tagInverseText: #ccc;
32
+ $tagInverseBackground: $gray;
33
+ $tagInverseBorder: $grayDark;
34
+
35
+ $tagDisabledText: #aaa;
36
+ $tagDisabledBackground: #e6e6e6;
37
+ $tagDisabledBorder: #ccc;
38
+
39
+ // Sizing
40
+ // -------------------------
41
+
42
+ $tagFontSize: 13px;
43
+ $tagFontSizeLarge: $tagFontSize * 1.25; // ~16px
44
+ $tagFontSizeSmall: $tagFontSize * 0.85; // ~11px
45
+ $tagFontSizeMini: $tagFontSize * 0.75; // ~10px
46
+
47
+ $tagPadding: 4px;
48
+ $tagMargin: 5px;
49
+
50
+ // Tag Classes
51
+ // --------------------------------------------------
52
+
53
+ // Base tag class
54
+ // -------------------------
55
+
56
+ .tm-tag {
57
+ color: $tagText;
58
+ background-color: $tagBackground;
59
+ border: $tagBorder 1px solid;
60
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
61
+ display: inline-block;
62
+ border-radius: $borderRadiusSmall;
50
63
  font-family: $sansFontFamily;
51
- font-size: $baseFontSize;
52
- margin-bottom: 5px;
53
- margin-right: 5px;
54
- //padding-top: 6px;
55
- //padding-bottom: 5px;
56
- padding: 5px 4px 4px 4px;
64
+ font-size: $tagFontSize;
65
+ margin: 0 $tagMargin $tagMargin 0;
66
+ padding: $tagPadding;
57
67
  text-decoration: none;
58
- white-space: nowrap;
59
-
60
- vertical-align: middle;
61
- line-height: $baseLineHeight;
62
- //height:18px;
68
+ transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
63
69
  -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
64
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
70
+ -webkit-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
71
+ vertical-align: middle;
72
+
73
+ // Remove button
74
+ // -------------------------
75
+
76
+ .tm-tag-remove {
77
+ color: $black;
78
+ font-weight: bold;
79
+ margin-left: $tagPadding;
80
+ opacity: 0.2;
81
+ &:hover {
82
+ color: $black;
83
+ text-decoration: none;
84
+ opacity: 0.4;
85
+ }
86
+ }
87
+
88
+ // Semantic Colors
89
+ // -------------------------
90
+
91
+ &.tm-tag-warning {
92
+ color: $tagWarningText;
93
+ background-color: $tagWarningBackground;
94
+ border-color: $tagWarningBorder;
95
+ }
96
+ &.tm-tag-error {
97
+ color: $tagErrorText;
98
+ background-color: $tagErrorBackground;
99
+ border-color: $tagErrorBorder;
100
+ }
101
+ &.tm-tag-success {
102
+ color: $tagSuccessText;
103
+ background-color: $tagSuccessBackground;
104
+ border-color: $tagSuccessBorder;
105
+ }
106
+ &.tm-tag-info {
107
+ color: $tagInfoText;
108
+ background-color: $tagInfoBackground;
109
+ border-color: $tagInfoBorder;
110
+ }
111
+ &.tm-tag-inverse {
112
+ color: $tagInverseText;
113
+ background-color: $tagInverseBackground;
114
+ border-color: $tagInverseBorder;
115
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) inset;
116
+ .tm-tag-remove {
117
+ color: $white;
118
+ }
119
+ }
120
+
121
+ // Sizes
122
+ // -------------------------
123
+
124
+ &.tm-tag-large {
125
+ font-size: $tagFontSizeLarge;
126
+ border-radius: $baseBorderRadius;
127
+ padding: 11px 7px;
128
+ }
129
+ &.tm-tag-small {
130
+ font-size: $tagFontSizeSmall;
131
+ border-radius: $borderRadiusSmall;
132
+ padding: 2px 4px;
133
+ }
134
+ &.tm-tag-mini {
135
+ font-size: $tagFontSizeMini;
136
+ border-radius: 2px;
137
+ padding: 0px 2px;
138
+ }
139
+
140
+ // Miscellaneous Styles
141
+ // -------------------------
142
+
143
+ &.tm-tag-plain {
144
+ color: $textColor;
145
+ box-shadow: none;
146
+ background: none;
147
+ border: none;
148
+ }
149
+ &.tm-tag-disabled {
150
+ color: $tagDisabledText;
151
+ background-color: $tagDisabledBackground;
152
+ border-color: $tagDisabledBorder;
153
+ box-shadow: none;
154
+ .tm-tag-remove {
155
+ display: none;
156
+ }
157
+ }
65
158
  }
66
159
 
67
- .myMinTag {
68
- background: none repeat scroll 0 0 $successBackground;
69
- border: 1px solid $linkColor;
70
- border-radius: 3px 3px 3px 3px;
71
- color: $linkColor;
72
- //display: block;
73
- //float: left;
74
- font-family: $sansFontFamily;
75
- font-size: $baseFontSize;
76
- margin-bottom: 5px;
77
- margin-right: 5px;
78
- //padding-top: 6px;
79
- //padding-bottom: 5px;
80
- padding: 2px 4px 2px 4px;
81
- text-decoration: none;
160
+ // Forms
161
+ // --------------------------------------------------
82
162
 
83
- vertical-align: middle;
84
- line-height: $baseLineHeight;
85
- //height:18px;
86
- -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
87
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
163
+ // Input style (Recommended)
164
+ // -------------------------
165
+
166
+ input[type="text"].tm-input {
167
+ margin-bottom: $tagMargin;
88
168
  }
89
169
 
90
- .myMinNonTag {
91
- font-family: $sansFontFamily;
92
- font-size: $baseFontSize;
93
- margin-bottom: 5px;
94
- margin-right: 5px;
95
- //padding-top: 6px;
96
- //padding-bottom: 5px;
97
- padding: 2px 4px 2px 4px;
98
- text-decoration: none;
170
+ // Form wrappers (Optional)
171
+ // -------------------------
99
172
 
100
- vertical-align: middle;
101
- line-height: 18px;
102
- //height:18px;
103
- -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
104
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
173
+ .control-group.tm-group {
174
+ margin-bottom: ($baseLineHeight / 2) - $tagMargin;
175
+ }
176
+ .form-horizontal .control-group.tm-group {
177
+ margin-bottom: $baseLineHeight - $tagMargin;
105
178
  }
metadata CHANGED
@@ -1,20 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tagmanager-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias L. Maier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-27 00:00:00.000000000 Z
11
+ date: 2013-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  - - <
@@ -24,7 +24,7 @@ dependencies:
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ! '>='
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
30
  - - <
@@ -59,12 +59,12 @@ require_paths:
59
59
  - lib
60
60
  required_ruby_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ! '>='
62
+ - - '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ! '>='
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: 1.3.6
70
70
  requirements: []