bootswatch-theme-rails 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bootswatch-theme-rails/version.rb +1 -1
  3. data/vendor/assets/stylesheets/amelia.css +0 -1
  4. data/vendor/assets/stylesheets/amelia/loader.css.less +3 -50
  5. data/vendor/assets/stylesheets/cerulean.css +1 -2
  6. data/vendor/assets/stylesheets/cerulean/loader.css.less +3 -50
  7. data/vendor/assets/stylesheets/cosmo.css +1 -2
  8. data/vendor/assets/stylesheets/cosmo/bootswatch.css.less +0 -2
  9. data/vendor/assets/stylesheets/cosmo/loader.css.less +2 -49
  10. data/vendor/assets/stylesheets/cupid.css +0 -1
  11. data/vendor/assets/stylesheets/cupid/bootswatch.css.less +0 -2
  12. data/vendor/assets/stylesheets/cupid/loader.css.less +3 -50
  13. data/vendor/assets/stylesheets/cyborg.css +0 -1
  14. data/vendor/assets/stylesheets/cyborg/bootswatch.css.less +0 -2
  15. data/vendor/assets/stylesheets/cyborg/loader.css.less +3 -50
  16. data/vendor/assets/stylesheets/flatly.css +0 -1
  17. data/vendor/assets/stylesheets/flatly/loader.css.less +3 -50
  18. data/vendor/assets/stylesheets/journal.css +0 -1
  19. data/vendor/assets/stylesheets/journal/loader.css.less +2 -49
  20. data/vendor/assets/stylesheets/lumen.css +0 -1
  21. data/vendor/assets/stylesheets/lumen/bootswatch.css.less +0 -2
  22. data/vendor/assets/stylesheets/lumen/loader.css.less +2 -49
  23. data/vendor/assets/stylesheets/readable.css +0 -1
  24. data/vendor/assets/stylesheets/readable/loader.css.less +2 -49
  25. data/vendor/assets/stylesheets/shared/base.less +4 -0
  26. data/vendor/assets/stylesheets/shared/bootstrap.less +36 -0
  27. data/vendor/assets/stylesheets/simplex.css +0 -1
  28. data/vendor/assets/stylesheets/simplex/loader.css.less +2 -49
  29. data/vendor/assets/stylesheets/slate.css +0 -1
  30. data/vendor/assets/stylesheets/slate/loader.css.less +2 -49
  31. data/vendor/assets/stylesheets/spacelab.css +0 -1
  32. data/vendor/assets/stylesheets/spacelab/loader.css.less +2 -49
  33. data/vendor/assets/stylesheets/superhero.css +0 -1
  34. data/vendor/assets/stylesheets/superhero/loader.css.less +3 -50
  35. data/vendor/assets/stylesheets/united.css +0 -1
  36. data/vendor/assets/stylesheets/united/loader.css.less +2 -49
  37. data/vendor/assets/stylesheets/yeti.css +0 -1
  38. data/vendor/assets/stylesheets/yeti/loader.css.less +2 -49
  39. metadata +12 -26
  40. data/vendor/assets/stylesheets/amelia/base.less +0 -10
  41. data/vendor/assets/stylesheets/cerulean/base.less +0 -10
  42. data/vendor/assets/stylesheets/cosmo/base.less +0 -10
  43. data/vendor/assets/stylesheets/cupid/base.less +0 -10
  44. data/vendor/assets/stylesheets/cyborg/base.less +0 -10
  45. data/vendor/assets/stylesheets/flatly/base.less +0 -10
  46. data/vendor/assets/stylesheets/journal/base.less +0 -10
  47. data/vendor/assets/stylesheets/lumen/base.less +0 -10
  48. data/vendor/assets/stylesheets/readable/base.less +0 -10
  49. data/vendor/assets/stylesheets/simplex/base.less +0 -10
  50. data/vendor/assets/stylesheets/slate/base.less +0 -10
  51. data/vendor/assets/stylesheets/spacelab/base.less +0 -10
  52. data/vendor/assets/stylesheets/superhero/base.less +0 -10
  53. data/vendor/assets/stylesheets/superhero/mixins.less +0 -929
  54. data/vendor/assets/stylesheets/united/base.less +0 -10
  55. data/vendor/assets/stylesheets/yeti/base.less +0 -10
@@ -1,5 +1,4 @@
1
1
  /* Yeti
2
2
  * Bootswatch
3
3
  *= require yeti/loader
4
- *= require yeti/bootswatch
5
4
  */
@@ -1,50 +1,3 @@
1
- // Yeti
2
- // Bootswatch
3
- // loader.css.less
4
- // Customize the modules loaded here
5
-
6
- // @import "twitter/bootstrap/variables";
1
+ @import 'shared/base';
7
2
  @import "yeti/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
11
-
12
- @import "twitter/bootstrap/normalize";
13
- @import "twitter/bootstrap/print";
14
- @import "twitter/bootstrap/scaffolding";
15
- @import "twitter/bootstrap/type";
16
- @import "twitter/bootstrap/code";
17
- @import "twitter/bootstrap/grid";
18
- @import "twitter/bootstrap/tables";
19
- @import "twitter/bootstrap/forms";
20
- @import "twitter/bootstrap/buttons";
21
- @import "twitter/bootstrap/component-animations";
22
- @import "twitter/bootstrap/glyphicons";
23
- @import "twitter/bootstrap/dropdowns";
24
- @import "twitter/bootstrap/button-groups";
25
- @import "twitter/bootstrap/input-groups";
26
- @import "twitter/bootstrap/navs";
27
- @import "twitter/bootstrap/navbar";
28
- @import "twitter/bootstrap/breadcrumbs";
29
- @import "twitter/bootstrap/pagination";
30
- @import "twitter/bootstrap/pager";
31
- @import "twitter/bootstrap/labels";
32
- @import "twitter/bootstrap/badges";
33
- @import "twitter/bootstrap/jumbotron";
34
- @import "twitter/bootstrap/thumbnails";
35
- @import "twitter/bootstrap/alerts";
36
- @import "twitter/bootstrap/progress-bars";
37
- @import "twitter/bootstrap/media";
38
- @import "twitter/bootstrap/list-group";
39
- @import "twitter/bootstrap/panels";
40
- @import "twitter/bootstrap/wells";
41
- @import "twitter/bootstrap/close";
42
- @import "twitter/bootstrap/modals";
43
- @import "twitter/bootstrap/tooltip";
44
- @import "twitter/bootstrap/popovers";
45
- @import "twitter/bootstrap/carousel";
46
- @import "twitter/bootstrap/utilities";
47
- @import "twitter/bootstrap/responsive-utilities";
48
-
49
-
50
- // @import "twitter/bootstrap/theme";
3
+ @import "yeti/bootswatch.css";
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch-theme-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-09 00:00:00.000000000 Z
11
+ date: 2014-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: assets for bootswatch themes
@@ -45,7 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - .gitignore
48
+ - ".gitignore"
49
49
  - Gemfile
50
50
  - LICENSE.txt
51
51
  - README.md
@@ -56,79 +56,65 @@ files:
56
56
  - lib/bootswatch-theme-rails/railtie.rb
57
57
  - lib/bootswatch-theme-rails/version.rb
58
58
  - vendor/assets/stylesheets/amelia.css
59
- - vendor/assets/stylesheets/amelia/base.less
60
59
  - vendor/assets/stylesheets/amelia/bootswatch.css.less
61
60
  - vendor/assets/stylesheets/amelia/loader.css.less
62
61
  - vendor/assets/stylesheets/amelia/variables.less
63
62
  - vendor/assets/stylesheets/cerulean.css
64
- - vendor/assets/stylesheets/cerulean/base.less
65
63
  - vendor/assets/stylesheets/cerulean/bootswatch.css.less
66
64
  - vendor/assets/stylesheets/cerulean/loader.css.less
67
65
  - vendor/assets/stylesheets/cerulean/variables.less
68
66
  - vendor/assets/stylesheets/cosmo.css
69
- - vendor/assets/stylesheets/cosmo/base.less
70
67
  - vendor/assets/stylesheets/cosmo/bootswatch.css.less
71
68
  - vendor/assets/stylesheets/cosmo/loader.css.less
72
69
  - vendor/assets/stylesheets/cosmo/variables.less
73
70
  - vendor/assets/stylesheets/cupid.css
74
- - vendor/assets/stylesheets/cupid/base.less
75
71
  - vendor/assets/stylesheets/cupid/bootswatch.css.less
76
72
  - vendor/assets/stylesheets/cupid/loader.css.less
77
73
  - vendor/assets/stylesheets/cupid/variables.less
78
74
  - vendor/assets/stylesheets/cyborg.css
79
- - vendor/assets/stylesheets/cyborg/base.less
80
75
  - vendor/assets/stylesheets/cyborg/bootswatch.css.less
81
76
  - vendor/assets/stylesheets/cyborg/loader.css.less
82
77
  - vendor/assets/stylesheets/cyborg/variables.less
83
78
  - vendor/assets/stylesheets/flatly.css
84
- - vendor/assets/stylesheets/flatly/base.less
85
79
  - vendor/assets/stylesheets/flatly/bootswatch.css.less
86
80
  - vendor/assets/stylesheets/flatly/loader.css.less
87
81
  - vendor/assets/stylesheets/flatly/variables.less
88
82
  - vendor/assets/stylesheets/journal.css
89
- - vendor/assets/stylesheets/journal/base.less
90
83
  - vendor/assets/stylesheets/journal/bootswatch.css.less
91
84
  - vendor/assets/stylesheets/journal/loader.css.less
92
85
  - vendor/assets/stylesheets/journal/variables.less
93
86
  - vendor/assets/stylesheets/lumen.css
94
- - vendor/assets/stylesheets/lumen/base.less
95
87
  - vendor/assets/stylesheets/lumen/bootswatch.css.less
96
88
  - vendor/assets/stylesheets/lumen/loader.css.less
97
89
  - vendor/assets/stylesheets/lumen/variables.less
98
90
  - vendor/assets/stylesheets/readable.css
99
- - vendor/assets/stylesheets/readable/base.less
100
91
  - vendor/assets/stylesheets/readable/bootswatch.css.less
101
92
  - vendor/assets/stylesheets/readable/loader.css.less
102
93
  - vendor/assets/stylesheets/readable/variables.less
94
+ - vendor/assets/stylesheets/shared/base.less
95
+ - vendor/assets/stylesheets/shared/bootstrap.less
103
96
  - vendor/assets/stylesheets/shared/mixins.less
104
97
  - vendor/assets/stylesheets/simplex.css
105
- - vendor/assets/stylesheets/simplex/base.less
106
98
  - vendor/assets/stylesheets/simplex/bootswatch.css.less
107
99
  - vendor/assets/stylesheets/simplex/loader.css.less
108
100
  - vendor/assets/stylesheets/simplex/variables.less
109
101
  - vendor/assets/stylesheets/slate.css
110
- - vendor/assets/stylesheets/slate/base.less
111
102
  - vendor/assets/stylesheets/slate/bootswatch.css.less
112
103
  - vendor/assets/stylesheets/slate/loader.css.less
113
104
  - vendor/assets/stylesheets/slate/variables.less
114
105
  - vendor/assets/stylesheets/spacelab.css
115
- - vendor/assets/stylesheets/spacelab/base.less
116
106
  - vendor/assets/stylesheets/spacelab/bootswatch.css.less
117
107
  - vendor/assets/stylesheets/spacelab/loader.css.less
118
108
  - vendor/assets/stylesheets/spacelab/variables.less
119
109
  - vendor/assets/stylesheets/superhero.css
120
- - vendor/assets/stylesheets/superhero/base.less
121
110
  - vendor/assets/stylesheets/superhero/bootswatch.css.less
122
111
  - vendor/assets/stylesheets/superhero/loader.css.less
123
- - vendor/assets/stylesheets/superhero/mixins.less
124
112
  - vendor/assets/stylesheets/superhero/variables.less
125
113
  - vendor/assets/stylesheets/united.css
126
- - vendor/assets/stylesheets/united/base.less
127
114
  - vendor/assets/stylesheets/united/bootswatch.css.less
128
115
  - vendor/assets/stylesheets/united/loader.css.less
129
116
  - vendor/assets/stylesheets/united/variables.less
130
117
  - vendor/assets/stylesheets/yeti.css
131
- - vendor/assets/stylesheets/yeti/base.less
132
118
  - vendor/assets/stylesheets/yeti/bootswatch.css.less
133
119
  - vendor/assets/stylesheets/yeti/loader.css.less
134
120
  - vendor/assets/stylesheets/yeti/variables.less
@@ -142,17 +128,17 @@ require_paths:
142
128
  - lib
143
129
  required_ruby_version: !ruby/object:Gem::Requirement
144
130
  requirements:
145
- - - '>='
131
+ - - ">="
146
132
  - !ruby/object:Gem::Version
147
133
  version: '0'
148
134
  required_rubygems_version: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - '>='
136
+ - - ">="
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
139
  requirements: []
154
140
  rubyforge_project:
155
- rubygems_version: 2.1.11
141
+ rubygems_version: 2.2.2
156
142
  signing_key:
157
143
  specification_version: 4
158
144
  summary: assets for bootswatch themes
@@ -1,10 +0,0 @@
1
- // Amelia
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "amelia/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Cerulean
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "cerulean/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Cosmo
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "cosmo/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Cupid
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "cupid/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Cyborg
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "cyborg/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Flatly
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "flatly/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Journal
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "journal/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Lumen
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "lumen/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Readable
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "readable/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Simplex
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "simplex/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Slate
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "slate/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Spacelab
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "spacelab/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,10 +0,0 @@
1
- // Superhero
2
- // Bootswatch
3
- // base.less
4
- // allows access to core variables and mixins inside bootswatch.css.less
5
-
6
- // @import "twitter/bootstrap/variables";
7
- @import "superhero/variables";
8
-
9
- // @import "twitter/bootstrap/mixins";
10
- @import "shared/mixins";
@@ -1,929 +0,0 @@
1
- // Superhero
2
- // Bootswatch
3
-
4
- //
5
- // Mixins
6
- // --------------------------------------------------
7
-
8
-
9
- // Utilities
10
- // -------------------------
11
-
12
- // Clearfix
13
- // Source: http://nicolasgallagher.com/micro-clearfix-hack/
14
- //
15
- // For modern browsers
16
- // 1. The space content is one way to avoid an Opera bug when the
17
- // contenteditable attribute is included anywhere else in the document.
18
- // Otherwise it causes space to appear at the top and bottom of elements
19
- // that are clearfixed.
20
- // 2. The use of `table` rather than `block` is only necessary if using
21
- // `:before` to contain the top-margins of child elements.
22
- .clearfix() {
23
- &:before,
24
- &:after {
25
- content: " "; // 1
26
- display: table; // 2
27
- }
28
- &:after {
29
- clear: both;
30
- }
31
- }
32
-
33
- // WebKit-style focus
34
- .tab-focus() {
35
- // Default
36
- outline: thin dotted;
37
- // WebKit
38
- outline: 5px auto -webkit-focus-ring-color;
39
- outline-offset: -2px;
40
- }
41
-
42
- // Center-align a block level element
43
- .center-block() {
44
- display: block;
45
- margin-left: auto;
46
- margin-right: auto;
47
- }
48
-
49
- // Sizing shortcuts
50
- .size(@width; @height) {
51
- width: @width;
52
- height: @height;
53
- }
54
- .square(@size) {
55
- .size(@size; @size);
56
- }
57
-
58
- // Placeholder text
59
- .placeholder(@color: @input-color-placeholder) {
60
- &:-moz-placeholder { color: @color; } // Firefox 4-18
61
- &::-moz-placeholder { color: @color; // Firefox 19+
62
- opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
63
- &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
64
- &::-webkit-input-placeholder { color: @color; } // Safari and Chrome
65
- }
66
-
67
- // Text overflow
68
- // Requires inline-block or block for proper styling
69
- .text-overflow() {
70
- overflow: hidden;
71
- text-overflow: ellipsis;
72
- white-space: nowrap;
73
- }
74
-
75
- // CSS image replacement
76
- //
77
- // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
78
- // mixins being reused as classes with the same name, this doesn't hold up. As
79
- // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
80
- // that we cannot chain the mixins together in Less, so they are repeated.
81
- //
82
- // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
83
-
84
- // Deprecated as of v3.0.1 (will be removed in v4)
85
- .hide-text() {
86
- font: ~"0/0" a;
87
- color: transparent;
88
- text-shadow: none;
89
- background-color: transparent;
90
- border: 0;
91
- }
92
- // New mixin to use as of v3.0.1
93
- .text-hide() {
94
- .hide-text();
95
- }
96
-
97
-
98
-
99
- // CSS3 PROPERTIES
100
- // --------------------------------------------------
101
-
102
- // Single side border-radius
103
- .border-top-radius(@radius) {
104
- border-top-right-radius: @radius;
105
- border-top-left-radius: @radius;
106
- }
107
- .border-right-radius(@radius) {
108
- border-bottom-right-radius: @radius;
109
- border-top-right-radius: @radius;
110
- }
111
- .border-bottom-radius(@radius) {
112
- border-bottom-right-radius: @radius;
113
- border-bottom-left-radius: @radius;
114
- }
115
- .border-left-radius(@radius) {
116
- border-bottom-left-radius: @radius;
117
- border-top-left-radius: @radius;
118
- }
119
-
120
- // Drop shadows
121
- //
122
- // Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
123
- // supported browsers that have box shadow capabilities now support the
124
- // standard `box-shadow` property.
125
- .box-shadow(@shadow) {
126
- -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
127
- box-shadow: @shadow;
128
- }
129
-
130
- // Transitions
131
- .transition(@transition) {
132
- -webkit-transition: @transition;
133
- transition: @transition;
134
- }
135
- .transition-property(@transition-property) {
136
- -webkit-transition-property: @transition-property;
137
- transition-property: @transition-property;
138
- }
139
- .transition-delay(@transition-delay) {
140
- -webkit-transition-delay: @transition-delay;
141
- transition-delay: @transition-delay;
142
- }
143
- .transition-duration(@transition-duration) {
144
- -webkit-transition-duration: @transition-duration;
145
- transition-duration: @transition-duration;
146
- }
147
- .transition-transform(@transition) {
148
- -webkit-transition: -webkit-transform @transition;
149
- -moz-transition: -moz-transform @transition;
150
- -o-transition: -o-transform @transition;
151
- transition: transform @transition;
152
- }
153
-
154
- // Transformations
155
- .rotate(@degrees) {
156
- -webkit-transform: rotate(@degrees);
157
- -ms-transform: rotate(@degrees); // IE9 only
158
- transform: rotate(@degrees);
159
- }
160
- .scale(@ratio; @ratio-y...) {
161
- -webkit-transform: scale(@ratio, @ratio-y);
162
- -ms-transform: scale(@ratio, @ratio-y); // IE9 only
163
- transform: scale(@ratio, @ratio-y);
164
- }
165
- .translate(@x; @y) {
166
- -webkit-transform: translate(@x, @y);
167
- -ms-transform: translate(@x, @y); // IE9 only
168
- transform: translate(@x, @y);
169
- }
170
- .skew(@x; @y) {
171
- -webkit-transform: skew(@x, @y);
172
- -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
173
- transform: skew(@x, @y);
174
- }
175
- .translate3d(@x; @y; @z) {
176
- -webkit-transform: translate3d(@x, @y, @z);
177
- transform: translate3d(@x, @y, @z);
178
- }
179
-
180
- .rotateX(@degrees) {
181
- -webkit-transform: rotateX(@degrees);
182
- -ms-transform: rotateX(@degrees); // IE9 only
183
- transform: rotateX(@degrees);
184
- }
185
- .rotateY(@degrees) {
186
- -webkit-transform: rotateY(@degrees);
187
- -ms-transform: rotateY(@degrees); // IE9 only
188
- transform: rotateY(@degrees);
189
- }
190
- .perspective(@perspective) {
191
- -webkit-perspective: @perspective;
192
- -moz-perspective: @perspective;
193
- perspective: @perspective;
194
- }
195
- .perspective-origin(@perspective) {
196
- -webkit-perspective-origin: @perspective;
197
- -moz-perspective-origin: @perspective;
198
- perspective-origin: @perspective;
199
- }
200
- .transform-origin(@origin) {
201
- -webkit-transform-origin: @origin;
202
- -moz-transform-origin: @origin;
203
- -ms-transform-origin: @origin; // IE9 only
204
- transform-origin: @origin;
205
- }
206
-
207
- // Animations
208
- .animation(@animation) {
209
- -webkit-animation: @animation;
210
- animation: @animation;
211
- }
212
- .animation-name(@name) {
213
- -webkit-animation-name: @name;
214
- animation-name: @name;
215
- }
216
- .animation-duration(@duration) {
217
- -webkit-animation-duration: @duration;
218
- animation-duration: @duration;
219
- }
220
- .animation-timing-function(@timing-function) {
221
- -webkit-animation-timing-function: @timing-function;
222
- animation-timing-function: @timing-function;
223
- }
224
- .animation-delay(@delay) {
225
- -webkit-animation-delay: @delay;
226
- animation-delay: @delay;
227
- }
228
- .animation-iteration-count(@iteration-count) {
229
- -webkit-animation-iteration-count: @iteration-count;
230
- animation-iteration-count: @iteration-count;
231
- }
232
- .animation-direction(@direction) {
233
- -webkit-animation-direction: @direction;
234
- animation-direction: @direction;
235
- }
236
-
237
- // Backface visibility
238
- // Prevent browsers from flickering when using CSS 3D transforms.
239
- // Default value is `visible`, but can be changed to `hidden`
240
- .backface-visibility(@visibility){
241
- -webkit-backface-visibility: @visibility;
242
- -moz-backface-visibility: @visibility;
243
- backface-visibility: @visibility;
244
- }
245
-
246
- // Box sizing
247
- .box-sizing(@boxmodel) {
248
- -webkit-box-sizing: @boxmodel;
249
- -moz-box-sizing: @boxmodel;
250
- box-sizing: @boxmodel;
251
- }
252
-
253
- // User select
254
- // For selecting text on the page
255
- .user-select(@select) {
256
- -webkit-user-select: @select;
257
- -moz-user-select: @select;
258
- -ms-user-select: @select; // IE10+
259
- -o-user-select: @select;
260
- user-select: @select;
261
- }
262
-
263
- // Resize anything
264
- .resizable(@direction) {
265
- resize: @direction; // Options: horizontal, vertical, both
266
- overflow: auto; // Safari fix
267
- }
268
-
269
- // CSS3 Content Columns
270
- .content-columns(@column-count; @column-gap: @grid-gutter-width) {
271
- -webkit-column-count: @column-count;
272
- -moz-column-count: @column-count;
273
- column-count: @column-count;
274
- -webkit-column-gap: @column-gap;
275
- -moz-column-gap: @column-gap;
276
- column-gap: @column-gap;
277
- }
278
-
279
- // Optional hyphenation
280
- .hyphens(@mode: auto) {
281
- word-wrap: break-word;
282
- -webkit-hyphens: @mode;
283
- -moz-hyphens: @mode;
284
- -ms-hyphens: @mode; // IE10+
285
- -o-hyphens: @mode;
286
- hyphens: @mode;
287
- }
288
-
289
- // Opacity
290
- .opacity(@opacity) {
291
- opacity: @opacity;
292
- // IE8 filter
293
- @opacity-ie: (@opacity * 100);
294
- filter: ~"alpha(opacity=@{opacity-ie})";
295
- }
296
-
297
-
298
-
299
- // GRADIENTS
300
- // --------------------------------------------------
301
-
302
- #gradient {
303
-
304
- // Horizontal gradient, from left to right
305
- //
306
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
307
- // Color stops are not available in IE9 and below.
308
- .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
309
- background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+
310
- background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
311
- background-repeat: repeat-x;
312
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
313
- }
314
-
315
- // Vertical gradient, from top to bottom
316
- //
317
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
318
- // Color stops are not available in IE9 and below.
319
- .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
320
- background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
321
- background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
322
- background-repeat: repeat-x;
323
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
324
- }
325
-
326
- .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
327
- background-repeat: repeat-x;
328
- background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
329
- background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
330
- }
331
- .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
332
- background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
333
- background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
334
- background-repeat: no-repeat;
335
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
336
- }
337
- .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
338
- background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
339
- background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
340
- background-repeat: no-repeat;
341
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
342
- }
343
- .radial(@inner-color: #555; @outer-color: #333) {
344
- background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
345
- background-image: radial-gradient(circle, @inner-color, @outer-color);
346
- background-repeat: no-repeat;
347
- }
348
- .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
349
- background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
350
- background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
351
- }
352
- }
353
-
354
- // Reset filters for IE
355
- //
356
- // When you need to remove a gradient background, do not forget to use this to reset
357
- // the IE filter for IE9 and below.
358
- .reset-filter() {
359
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
360
- }
361
-
362
-
363
-
364
- // Retina images
365
- //
366
- // Short retina mixin for setting background-image and -size
367
-
368
- .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
369
- background-image: asset-url("@{file-1x}");
370
-
371
- @media
372
- only screen and (-webkit-min-device-pixel-ratio: 2),
373
- only screen and ( min--moz-device-pixel-ratio: 2),
374
- only screen and ( -o-min-device-pixel-ratio: 2/1),
375
- only screen and ( min-device-pixel-ratio: 2),
376
- only screen and ( min-resolution: 192dpi),
377
- only screen and ( min-resolution: 2dppx) {
378
- background-image: asset-url("@{file-2x}");
379
- background-size: @width-1x @height-1x;
380
- }
381
- }
382
-
383
-
384
- // Responsive image
385
- //
386
- // Keep images from scaling beyond the width of their parents.
387
-
388
- .img-responsive(@display: block) {
389
- display: @display;
390
- max-width: 100%; // Part 1: Set a maximum relative to the parent
391
- height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
392
- }
393
-
394
-
395
- // COMPONENT MIXINS
396
- // --------------------------------------------------
397
-
398
- // Horizontal dividers
399
- // -------------------------
400
- // Dividers (basically an hr) within dropdowns and nav lists
401
- .nav-divider(@color: #e5e5e5) {
402
- height: 1px;
403
- margin: ((@line-height-computed / 2) - 1) 0;
404
- overflow: hidden;
405
- background-color: @color;
406
- }
407
-
408
- // Panels
409
- // -------------------------
410
- .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
411
- border-color: @border;
412
-
413
- & > .panel-heading {
414
- color: @heading-text-color;
415
- background-color: @heading-bg-color;
416
- border-color: @heading-border;
417
-
418
- + .panel-collapse .panel-body {
419
- border-top-color: @border;
420
- }
421
- }
422
- & > .panel-footer {
423
- + .panel-collapse .panel-body {
424
- border-bottom-color: @border;
425
- }
426
- }
427
- }
428
-
429
- // Alerts
430
- // -------------------------
431
- .alert-variant(@background; @border; @text-color) {
432
- background-color: @background;
433
- border-color: @border;
434
- color: @text-color;
435
-
436
- hr {
437
- border-top-color: darken(@border, 5%);
438
- }
439
- .alert-link {
440
- color: darken(@text-color, 10%);
441
- }
442
- }
443
-
444
- // Tables
445
- // -------------------------
446
- .table-row-variant(@state; @background) {
447
- // Exact selectors below required to override `.table-striped` and prevent
448
- // inheritance to nested tables.
449
- .table > thead > tr,
450
- .table > tbody > tr,
451
- .table > tfoot > tr {
452
- > td.@{state},
453
- > th.@{state},
454
- &.@{state} > td,
455
- &.@{state} > th {
456
- background-color: @background;
457
- }
458
- }
459
-
460
- // Hover states for `.table-hover`
461
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
462
- .table-hover > tbody > tr {
463
- > td.@{state}:hover,
464
- > th.@{state}:hover,
465
- &.@{state}:hover > td,
466
- &.@{state}:hover > th {
467
- background-color: darken(@background, 5%);
468
- }
469
- }
470
- }
471
-
472
- // List Groups
473
- // -------------------------
474
- .list-group-item-variant(@state; @background; @color) {
475
- .list-group-item-@{state} {
476
- color: @color;
477
- background-color: @background;
478
-
479
- a& {
480
- color: @color;
481
-
482
- .list-group-item-heading { color: inherit; }
483
-
484
- &:hover,
485
- &:focus {
486
- color: @color;
487
- background-color: darken(@background, 5%);
488
- }
489
- &.active,
490
- &.active:hover,
491
- &.active:focus {
492
- color: #fff;
493
- background-color: @color;
494
- border-color: @color;
495
- }
496
- }
497
- }
498
- }
499
-
500
- // Button variants
501
- // -------------------------
502
- // Easily pump out default styles, as well as :hover, :focus, :active,
503
- // and disabled options for all buttons
504
- .button-variant(@color; @background; @border) {
505
- color: @color;
506
- background-color: @background;
507
- border-color: @border;
508
-
509
- &:hover,
510
- &:focus,
511
- &:active,
512
- &.active,
513
- .open .dropdown-toggle& {
514
- color: @color;
515
- background-color: darken(@background, 8%);
516
- border-color: darken(@border, 12%);
517
- }
518
- &:active,
519
- &.active,
520
- .open .dropdown-toggle& {
521
- background-image: none;
522
- }
523
- &.disabled,
524
- &[disabled],
525
- fieldset[disabled] & {
526
- &,
527
- &:hover,
528
- &:focus,
529
- &:active,
530
- &.active {
531
- background-color: @background;
532
- border-color: @border;
533
- }
534
- }
535
-
536
- .badge {
537
- color: @background;
538
- background-color: @color;
539
- }
540
- }
541
-
542
- // Button sizes
543
- // -------------------------
544
- .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
545
- padding: @padding-vertical @padding-horizontal;
546
- font-size: @font-size;
547
- line-height: @line-height;
548
- border-radius: @border-radius;
549
- }
550
-
551
- // Pagination
552
- // -------------------------
553
- .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
554
- > li {
555
- > a,
556
- > span {
557
- padding: @padding-vertical @padding-horizontal;
558
- font-size: @font-size;
559
- }
560
- &:first-child {
561
- > a,
562
- > span {
563
- .border-left-radius(@border-radius);
564
- }
565
- }
566
- &:last-child {
567
- > a,
568
- > span {
569
- .border-right-radius(@border-radius);
570
- }
571
- }
572
- }
573
- }
574
-
575
- // Labels
576
- // -------------------------
577
- .label-variant(@color) {
578
- background-color: @color;
579
- &[href] {
580
- &:hover,
581
- &:focus {
582
- background-color: darken(@color, 10%);
583
- }
584
- }
585
- }
586
-
587
- // Contextual backgrounds
588
- // -------------------------
589
- .bg-variant(@color) {
590
- background-color: @color;
591
- a&:hover {
592
- background-color: darken(@color, 10%);
593
- }
594
- }
595
-
596
- // Typography
597
- // -------------------------
598
- .text-emphasis-variant(@color) {
599
- color: @color;
600
- a&:hover {
601
- color: darken(@color, 10%);
602
- }
603
- }
604
-
605
- // Navbar vertical align
606
- // -------------------------
607
- // Vertically center elements in the navbar.
608
- // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
609
- .navbar-vertical-align(@element-height) {
610
- margin-top: ((@navbar-height - @element-height) / 2);
611
- margin-bottom: ((@navbar-height - @element-height) / 2);
612
- }
613
-
614
- // Progress bars
615
- // -------------------------
616
- .progress-bar-variant(@color) {
617
- background-color: @color;
618
- .progress-striped & {
619
- #gradient > .striped();
620
- }
621
- }
622
-
623
- // Responsive utilities
624
- // -------------------------
625
- // More easily include all the states for responsive-utilities.less.
626
- .responsive-visibility() {
627
- display: block !important;
628
- table& { display: table; }
629
- tr& { display: table-row !important; }
630
- th&,
631
- td& { display: table-cell !important; }
632
- }
633
-
634
- .responsive-invisibility() {
635
- &,
636
- tr&,
637
- th&,
638
- td& { display: none !important; }
639
- }
640
-
641
-
642
- // Grid System
643
- // -----------
644
-
645
- // Centered container element
646
- .container-fixed() {
647
- margin-right: auto;
648
- margin-left: auto;
649
- padding-left: (@grid-gutter-width / 2);
650
- padding-right: (@grid-gutter-width / 2);
651
- &:extend(.clearfix all);
652
- }
653
-
654
- // Creates a wrapper for a series of columns
655
- .make-row(@gutter: @grid-gutter-width) {
656
- margin-left: (@gutter / -2);
657
- margin-right: (@gutter / -2);
658
- &:extend(.clearfix all);
659
- }
660
-
661
- // Generate the extra small columns
662
- .make-xs-column(@columns; @gutter: @grid-gutter-width) {
663
- position: relative;
664
- float: left;
665
- width: percentage((@columns / @grid-columns));
666
- min-height: 1px;
667
- padding-left: (@gutter / 2);
668
- padding-right: (@gutter / 2);
669
- }
670
- .make-xs-column-offset(@columns) {
671
- @media (min-width: @screen-xs-min) {
672
- margin-left: percentage((@columns / @grid-columns));
673
- }
674
- }
675
- .make-xs-column-push(@columns) {
676
- @media (min-width: @screen-xs-min) {
677
- left: percentage((@columns / @grid-columns));
678
- }
679
- }
680
- .make-xs-column-pull(@columns) {
681
- @media (min-width: @screen-xs-min) {
682
- right: percentage((@columns / @grid-columns));
683
- }
684
- }
685
-
686
-
687
- // Generate the small columns
688
- .make-sm-column(@columns; @gutter: @grid-gutter-width) {
689
- position: relative;
690
- min-height: 1px;
691
- padding-left: (@gutter / 2);
692
- padding-right: (@gutter / 2);
693
-
694
- @media (min-width: @screen-sm-min) {
695
- float: left;
696
- width: percentage((@columns / @grid-columns));
697
- }
698
- }
699
- .make-sm-column-offset(@columns) {
700
- @media (min-width: @screen-sm-min) {
701
- margin-left: percentage((@columns / @grid-columns));
702
- }
703
- }
704
- .make-sm-column-push(@columns) {
705
- @media (min-width: @screen-sm-min) {
706
- left: percentage((@columns / @grid-columns));
707
- }
708
- }
709
- .make-sm-column-pull(@columns) {
710
- @media (min-width: @screen-sm-min) {
711
- right: percentage((@columns / @grid-columns));
712
- }
713
- }
714
-
715
-
716
- // Generate the medium columns
717
- .make-md-column(@columns; @gutter: @grid-gutter-width) {
718
- position: relative;
719
- min-height: 1px;
720
- padding-left: (@gutter / 2);
721
- padding-right: (@gutter / 2);
722
-
723
- @media (min-width: @screen-md-min) {
724
- float: left;
725
- width: percentage((@columns / @grid-columns));
726
- }
727
- }
728
- .make-md-column-offset(@columns) {
729
- @media (min-width: @screen-md-min) {
730
- margin-left: percentage((@columns / @grid-columns));
731
- }
732
- }
733
- .make-md-column-push(@columns) {
734
- @media (min-width: @screen-md-min) {
735
- left: percentage((@columns / @grid-columns));
736
- }
737
- }
738
- .make-md-column-pull(@columns) {
739
- @media (min-width: @screen-md-min) {
740
- right: percentage((@columns / @grid-columns));
741
- }
742
- }
743
-
744
-
745
- // Generate the large columns
746
- .make-lg-column(@columns; @gutter: @grid-gutter-width) {
747
- position: relative;
748
- min-height: 1px;
749
- padding-left: (@gutter / 2);
750
- padding-right: (@gutter / 2);
751
-
752
- @media (min-width: @screen-lg-min) {
753
- float: left;
754
- width: percentage((@columns / @grid-columns));
755
- }
756
- }
757
- .make-lg-column-offset(@columns) {
758
- @media (min-width: @screen-lg-min) {
759
- margin-left: percentage((@columns / @grid-columns));
760
- }
761
- }
762
- .make-lg-column-push(@columns) {
763
- @media (min-width: @screen-lg-min) {
764
- left: percentage((@columns / @grid-columns));
765
- }
766
- }
767
- .make-lg-column-pull(@columns) {
768
- @media (min-width: @screen-lg-min) {
769
- right: percentage((@columns / @grid-columns));
770
- }
771
- }
772
-
773
-
774
- // Framework grid generation
775
- //
776
- // Used only by Bootstrap to generate the correct number of grid classes given
777
- // any value of `@grid-columns`.
778
-
779
- .make-grid-columns() {
780
- // Common styles for all sizes of grid columns, widths 1-12
781
- .col(@index) when (@index = 1) { // initial
782
- @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
783
- .col((@index + 1), @item);
784
- }
785
- .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
786
- @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
787
- .col((@index + 1), ~"@{list}, @{item}");
788
- }
789
- .col(@index, @list) when (@index > @grid-columns) { // terminal
790
- @{list} {
791
- position: relative;
792
- // Prevent columns from collapsing when empty
793
- min-height: 1px;
794
- // Inner gutter via padding
795
- padding-left: (@grid-gutter-width / 2);
796
- padding-right: (@grid-gutter-width / 2);
797
- }
798
- }
799
- .col(1); // kickstart it
800
- }
801
-
802
- .make-grid-columns-float(@class) {
803
- .col(@index) when (@index = 1) { // initial
804
- @item: ~".col-@{class}-@{index}";
805
- .col((@index + 1), @item);
806
- }
807
- .col(@index, @list) when (@index =< @grid-columns) { // general
808
- @item: ~".col-@{class}-@{index}";
809
- .col((@index + 1), ~"@{list}, @{item}");
810
- }
811
- .col(@index, @list) when (@index > @grid-columns) { // terminal
812
- @{list} {
813
- float: left;
814
- }
815
- }
816
- .col(1); // kickstart it
817
- }
818
-
819
- .calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) {
820
- .col-@{class}-@{index} {
821
- width: percentage((@index / @grid-columns));
822
- }
823
- }
824
- .calc-grid(@index, @class, @type) when (@type = push) {
825
- .col-@{class}-push-@{index} {
826
- left: percentage((@index / @grid-columns));
827
- }
828
- }
829
- .calc-grid(@index, @class, @type) when (@type = pull) {
830
- .col-@{class}-pull-@{index} {
831
- right: percentage((@index / @grid-columns));
832
- }
833
- }
834
- .calc-grid(@index, @class, @type) when (@type = offset) {
835
- .col-@{class}-offset-@{index} {
836
- margin-left: percentage((@index / @grid-columns));
837
- }
838
- }
839
-
840
- // Basic looping in LESS
841
- .make-grid(@index, @class, @type) when (@index >= 0) {
842
- .calc-grid(@index, @class, @type);
843
- // next iteration
844
- .make-grid((@index - 1), @class, @type);
845
- }
846
-
847
-
848
- // Form validation states
849
- //
850
- // Used in forms.less to generate the form validation CSS for warnings, errors,
851
- // and successes.
852
-
853
- .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
854
- // Color the label and help text
855
- .help-block,
856
- .control-label,
857
- .radio,
858
- .checkbox,
859
- .radio-inline,
860
- .checkbox-inline {
861
- color: @text-color;
862
- }
863
- // Set the border and box shadow on specific inputs to match
864
- .form-control {
865
- border-color: @border-color;
866
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
867
- &:focus {
868
- border-color: darken(@border-color, 10%);
869
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
870
- .box-shadow(@shadow);
871
- }
872
- }
873
- // Set validation states also for addons
874
- .input-group-addon {
875
- color: @text-color;
876
- border-color: @border-color;
877
- background-color: @background-color;
878
- }
879
- // Optional feedback icon
880
- .form-control-feedback {
881
- color: @text-color;
882
- }
883
- }
884
-
885
- // Form control focus state
886
- //
887
- // Generate a customized focus state and for any input with the specified color,
888
- // which defaults to the `@input-focus-border` variable.
889
- //
890
- // We highly encourage you to not customize the default value, but instead use
891
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
892
- // WebKit's default styles, but applicable to a wider range of browsers. Its
893
- // usability and accessibility should be taken into account with any change.
894
- //
895
- // Example usage: change the default blue border and shadow to white for better
896
- // contrast against a dark gray background.
897
-
898
- .form-control-focus(@color: @input-border-focus) {
899
- @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
900
- &:focus {
901
- border-color: @color;
902
- outline: 0;
903
- .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
904
- }
905
- }
906
-
907
- // Form control sizing
908
- //
909
- // Relative text size, padding, and border-radii changes for form controls. For
910
- // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
911
- // element gets special love because it's special, and that's a fact!
912
-
913
- .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
914
- height: @input-height;
915
- padding: @padding-vertical @padding-horizontal;
916
- font-size: @font-size;
917
- line-height: @line-height;
918
- border-radius: @border-radius;
919
-
920
- select& {
921
- height: @input-height;
922
- line-height: @input-height;
923
- }
924
-
925
- textarea&,
926
- select[multiple]& {
927
- height: auto;
928
- }
929
- }