compass-bootstrap 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.mkdn CHANGED
@@ -32,7 +32,7 @@ this will make available all the classes and styles from bootstrap
32
32
 
33
33
  If you only want to add some bootstrap styles to your files, add:
34
34
 
35
- @import 'compass_bootstrap_mixins';
35
+ @import 'compass_bootstrap_mixins';
36
36
 
37
37
  And now you can use the mixins on your own classes:
38
38
 
@@ -46,9 +46,15 @@ this plugin includes a mixin called bt-column, that you can use instead of add t
46
46
  Using btn mixin to your styles
47
47
  ==============================
48
48
 
49
- bt-btn($from-color,$to-color,[$txt-color(optional)]);
49
+ bt-btn($from-color,$to-color,[$txt-color(optional)]);
50
50
 
51
51
  this mixin will add the styles from btn bootstrap class, this had 3 params
52
+
52
53
  $from-color: defines the color where background starts.
53
54
  $to-color: defines the color where background ends.
54
- $txt-color: default white, this define the text color
55
+ $txt-color: default white, this define the text color
56
+
57
+ ## TODO
58
+
59
+ * port more classes to mixins
60
+
@@ -1,4 +1,4 @@
1
1
  require 'compass'
2
2
  require "compass-bootstrap/version"
3
3
 
4
- Compass::Frameworks.register("bootstrap", :path => "#{File.dirname(__FILE__)}/..")
4
+ Compass::Frameworks.register("compass-bootstrap", :path => "#{File.dirname(__FILE__)}/..")
@@ -1,5 +1,5 @@
1
1
  module Compass
2
2
  module Bootstrap
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * this is a port to SCSS version of the bootstrap less
3
+
4
+ * ==========================================
5
+ * Bootstrap @VERSION
6
+ *
7
+ * Copyright 2011 Twitter, Inc
8
+ * Licensed under the Apache License v2.0
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
12
+ * Date: @DATE
13
+ */
14
+
15
+ // CSS Reset
16
+ @import "reset.scss";
17
+
18
+ // Core
19
+ @import "preboot.scss";
20
+ @import "scaffolding.scss";
21
+
22
+ // Styled patterns and elements
23
+ @import "type.scss";
24
+ @import "forms.scss";
25
+ @import "tables.scss";
26
+ @import "patterns.scss";
@@ -0,0 +1,393 @@
1
+ /* Forms.less
2
+ * Base styles for various input types, form layouts, and states
3
+ * ------------------------------------------------------------- */
4
+
5
+
6
+ // FORM STYLES
7
+ // -----------
8
+
9
+ form {
10
+ margin-bottom: $baseline;
11
+ }
12
+
13
+ // Groups of fields with labels on top (legends)
14
+ fieldset {
15
+ margin-bottom: $baseline;
16
+ padding-top: $baseline;
17
+ legend {
18
+ display: block;
19
+ margin-left: 150px;
20
+ font-size: 20px;
21
+ line-height: 1;
22
+ *margin: 0 0 5px 145px; /* IE6-7 */
23
+ *line-height: 1.5; /* IE6-7 */
24
+ color: $grayDark;
25
+ }
26
+ }
27
+
28
+ // Parent element that clears floats and wraps labels and fields together
29
+ form .clearfix {
30
+ margin-bottom: $baseline;
31
+ }
32
+
33
+ // Set font for forms
34
+ label,
35
+ input,
36
+ select,
37
+ textarea {
38
+ @include sans-serif(normal,13px,normal);
39
+ }
40
+
41
+ // Float labels left
42
+ label {
43
+ padding-top: 6px;
44
+ font-size: 13px;
45
+ line-height: 18px;
46
+ float: left;
47
+ width: 130px;
48
+ text-align: right;
49
+ color: $grayDark;
50
+ }
51
+
52
+ // Shift over the inside div to align all label's relevant content
53
+ div.input {
54
+ margin-left: 150px;
55
+ }
56
+
57
+ // Checkboxs and radio buttons
58
+ input[type=checkbox],
59
+ input[type=radio] {
60
+ cursor: pointer;
61
+ }
62
+
63
+ // Inputs, Textareas, Selects
64
+ input,
65
+ textarea,
66
+ select,
67
+ .uneditable-input {
68
+ display: inline-block;
69
+ width: 210px;
70
+ height: $baseline;
71
+ padding: 4px;
72
+ font-size: 13px;
73
+ line-height: $baseline;
74
+ color: $gray;
75
+ border: 1px solid #ccc;
76
+ @include border-radius(3px);
77
+ }
78
+
79
+ /* mini reset for non-html5 file types */
80
+ input[type=checkbox],
81
+ input[type=radio] {
82
+ width: auto;
83
+ height: auto;
84
+ padding: 0;
85
+ margin: 3px 0;
86
+ *margin-top: 0; /* IE6-7 */
87
+ line-height: normal;
88
+ border: none;
89
+ }
90
+
91
+ input[type=file] {
92
+ background-color: #fff;
93
+ padding: initial;
94
+ border: initial;
95
+ line-height: initial;
96
+ @include bt-box-shadow(none);
97
+ }
98
+
99
+ input[type=button],
100
+ input[type=reset],
101
+ input[type=submit] {
102
+ width: auto;
103
+ height: auto;
104
+ }
105
+
106
+ select,
107
+ input[type=file] {
108
+ height: $baseline * 1.5;
109
+ line-height: $baseline * 1.5;
110
+ }
111
+
112
+ textarea {
113
+ height: auto;
114
+ }
115
+
116
+ .uneditable-input {
117
+ background-color: #eee;
118
+ display: block;
119
+ border-color: #ccc;
120
+ @include bt-box-shadow(inset 0 1px 2px rgba(0,0,0,.075));
121
+ }
122
+
123
+ // Placeholder text gets special styles; can't be bundled together though for some reason
124
+ :-moz-placeholder {
125
+ color: $grayLight;
126
+ }
127
+ ::-webkit-input-placeholder {
128
+ color: $grayLight;
129
+ }
130
+
131
+ // Focus states
132
+ input,
133
+ select, textarea {
134
+ $transition: border linear .2s, box-shadow linear .2s;
135
+ @include transition($transition);
136
+ @include bt-box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
137
+ }
138
+ input:focus,
139
+ textarea:focus {
140
+ outline: none;
141
+ border-color: rgba(82,168,236,.8);
142
+ $shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
143
+ @include bt-box-shadow($shadow);
144
+ }
145
+
146
+ // Error styles
147
+ form div.error {
148
+ background: lighten($red, 57%);
149
+ padding: 10px 0;
150
+ margin: -10px 0 10px;
151
+ @include border-radius(4px);
152
+ $error-text: desaturate(lighten($red, 25%), 25%);
153
+ > label,
154
+ span.help-inline,
155
+ span.help-block {
156
+ color: $red;
157
+ }
158
+ input,
159
+ textarea {
160
+ border-color: $error-text;
161
+ @include bt-box-shadow(0 0 3px rgba(171,41,32,.25));
162
+ &:focus {
163
+ border-color: darken($error-text, 10%);
164
+ @include bt-box-shadow(0 0 6px rgba(171,41,32,.5));
165
+ }
166
+ }
167
+ .input-prepend,
168
+ .input-append {
169
+ span.add-on {
170
+ background: lighten($red, 50%);
171
+ border-color: $error-text;
172
+ color: darken($error-text, 10%);
173
+ }
174
+ }
175
+ }
176
+
177
+ // Form element sizes
178
+ .input-mini, input.mini, textarea.mini, select.mini {
179
+ width: 60px;
180
+ }
181
+ .input-small, input.small, textarea.small, select.small {
182
+ width: 90px;
183
+ }
184
+ .input-medium, input.medium, textarea.medium, select.medium {
185
+ width: 150px;
186
+ }
187
+ .input-large, input.large, textarea.large, select.large {
188
+ width: 210px;
189
+ }
190
+ .input-xlarge, input.xlarge, textarea.xlarge, select.xlarge {
191
+ width: 270px;
192
+ }
193
+ .input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge {
194
+ width: 530px;
195
+ }
196
+ textarea.xxlarge {
197
+ overflow-y: scroll;
198
+ }
199
+
200
+ // Turn off focus for disabled (read-only) form elements
201
+ input[readonly]:focus,
202
+ textarea[readonly]:focus,
203
+ input.disabled {
204
+ background: #f5f5f5;
205
+ border-color: #ddd;
206
+ @include bt-box-shadow(none);
207
+ }
208
+
209
+ // Actions (the buttons)
210
+ .actions {
211
+ background: #f5f5f5;
212
+ margin-top: $baseline;
213
+ margin-bottom: $baseline;
214
+ padding: ($baseline - 1) 20px $baseline 150px;
215
+ border-top: 1px solid #ddd;
216
+ @include border-radius(0 0 3px 3px);
217
+ .secondary-action {
218
+ float: right;
219
+ a {
220
+ line-height: 30px;
221
+ &:hover {
222
+ text-decoration: underline;
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ // Help Text
229
+ .help-inline,
230
+ .help-block {
231
+ font-size: 12px;
232
+ line-height: $baseline;
233
+ color: $grayLight;
234
+ }
235
+ .help-inline {
236
+ padding-left: 5px;
237
+ *position: relative; /* IE6-7 */
238
+ *top: -5px; /* IE6-7 */
239
+ }
240
+
241
+ // Big blocks of help text
242
+ .help-block {
243
+ display: block;
244
+ max-width: 600px;
245
+ }
246
+
247
+ // Inline Fields (input fields that appear as inline objects
248
+ .inline-inputs {
249
+ color: $gray;
250
+ span, input {
251
+ display: inline-block;
252
+ }
253
+ input.mini {
254
+ width: 60px;
255
+ }
256
+ input.small {
257
+ width: 90px;
258
+ }
259
+ span {
260
+ padding: 0 2px 0 1px;
261
+ }
262
+ }
263
+
264
+ // Allow us to put symbols and text within the input field for a cleaner look
265
+ .input-prepend,
266
+ .input-append {
267
+ input {
268
+ @include border-radius(0 3px 3px 0);
269
+ }
270
+ .add-on {
271
+ background: #f5f5f5;
272
+ float: left;
273
+ display: block;
274
+ width: auto;
275
+ min-width: 16px;
276
+ padding: 4px 4px 4px 5px;
277
+ color: $grayLight;
278
+ font-weight: normal;
279
+ line-height: 18px;
280
+ height: 18px;
281
+ text-align: center;
282
+ text-shadow: 0 1px 0 #fff;
283
+ border: 1px solid #ccc;
284
+ border-right-width: 0;
285
+ @include border-radius(3px 0 0 3px);
286
+ }
287
+ .active {
288
+ background: lighten($green, 30);
289
+ border-color: $green;
290
+ }
291
+ }
292
+ .input-prepend {
293
+ .add-on {
294
+ *margin-top: 1px; /* IE6-7 */
295
+ }
296
+ }
297
+ .input-append {
298
+ input {
299
+ float: left;
300
+ @include border-radius(3px 0 0 3px);
301
+ }
302
+ .add-on {
303
+ @include border-radius(0 3px 3px 0);
304
+ border-right-width: 1px;
305
+ border-left-width: 0;
306
+ }
307
+ }
308
+
309
+ // Stacked options for forms (radio buttons or checkboxes)
310
+ .inputs-list {
311
+ margin: 0 0 5px;
312
+ width: 100%;
313
+ li {
314
+ display: block;
315
+ padding: 0;
316
+ width: 100%;
317
+ label {
318
+ display: block;
319
+ float: none;
320
+ width: auto;
321
+ padding: 0;
322
+ line-height: $baseline;
323
+ text-align: left;
324
+ white-space: normal;
325
+ strong {
326
+ color: $gray;
327
+ }
328
+ small {
329
+ font-size: 12px;
330
+ font-weight: normal;
331
+ }
332
+ }
333
+ ul.inputs-list {
334
+ margin-left: 25px;
335
+ margin-bottom: 10px;
336
+ padding-top: 0;
337
+ }
338
+ &:first-child {
339
+ padding-top: 5px;
340
+ }
341
+ }
342
+ input[type=radio],
343
+ input[type=checkbox] {
344
+ margin-bottom: 0;
345
+ }
346
+ }
347
+
348
+ // Stacked forms
349
+ .form-stacked {
350
+ padding-left: 20px;
351
+ fieldset {
352
+ padding-top: $baseline / 2;
353
+ }
354
+ legend {
355
+ margin-left: 0;
356
+ }
357
+ label {
358
+ display: block;
359
+ float: none;
360
+ width: auto;
361
+ font-weight: bold;
362
+ text-align: left;
363
+ line-height: 20px;
364
+ padding-top: 0;
365
+ }
366
+ .clearfix {
367
+ margin-bottom: $baseline / 2;
368
+ div.input {
369
+ margin-left: 0;
370
+ }
371
+ }
372
+ .inputs-list {
373
+ margin-bottom: 0;
374
+ li {
375
+ padding-top: 0;
376
+ label {
377
+ font-weight: normal;
378
+ padding-top: 0;
379
+ }
380
+ }
381
+ }
382
+ div.error {
383
+ padding-top: 10px;
384
+ padding-bottom: 10px;
385
+ padding-left: 10px;
386
+ margin-top: 0;
387
+ margin-left: -10px;
388
+ }
389
+ .actions {
390
+ margin-left: -20px;
391
+ padding-left: 20px;
392
+ }
393
+ }