dynflow 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/README.md +11 -3
  2. data/doc/pages/.gitignore +7 -0
  3. data/doc/pages/Gemfile +8 -0
  4. data/doc/pages/Rakefile +26 -0
  5. data/doc/pages/_config.yml +38 -0
  6. data/doc/pages/plugins/alert_block.rb +27 -0
  7. data/doc/pages/plugins/div_tag.rb +24 -0
  8. data/doc/pages/plugins/graphviz.rb +121 -0
  9. data/doc/pages/plugins/plantuml.rb +85 -0
  10. data/doc/pages/plugins/play.rb +13 -0
  11. data/doc/pages/plugins/tags.rb +138 -0
  12. data/doc/pages/plugins/toc.rb +20 -0
  13. data/doc/pages/source/.nojekyll +0 -0
  14. data/doc/pages/source/404.md +6 -0
  15. data/doc/pages/source/_includes/disqus.html +25 -0
  16. data/doc/pages/source/_includes/google_analytics.html +12 -0
  17. data/doc/pages/source/_includes/google_plus_one.html +2 -0
  18. data/doc/pages/source/_includes/menu.html +19 -0
  19. data/doc/pages/source/_includes/menu_brand.html +2 -0
  20. data/doc/pages/source/_includes/menu_right.html +1 -0
  21. data/doc/pages/source/_includes/post_item.html +10 -0
  22. data/doc/pages/source/_includes/scroll_to.html +24 -0
  23. data/doc/pages/source/_includes/twitter_sharing.html +9 -0
  24. data/doc/pages/source/_layouts/default.html +70 -0
  25. data/doc/pages/source/_layouts/page.html +47 -0
  26. data/doc/pages/source/_layouts/post.html +19 -0
  27. data/doc/pages/source/_layouts/presentation.html +39 -0
  28. data/doc/pages/source/_layouts/tag_page.html +12 -0
  29. data/doc/pages/source/_sass/_bootstrap-compass.scss +9 -0
  30. data/doc/pages/source/_sass/_bootstrap-mincer.scss +19 -0
  31. data/doc/pages/source/_sass/_bootstrap-sprockets.scss +9 -0
  32. data/doc/pages/source/_sass/_bootstrap-variables.sass +865 -0
  33. data/doc/pages/source/_sass/_bootstrap.scss +50 -0
  34. data/doc/pages/source/_sass/_specific.scss +16 -0
  35. data/doc/pages/source/_sass/_style.scss +172 -0
  36. data/doc/pages/source/_sass/bootstrap/_alerts.scss +73 -0
  37. data/doc/pages/source/_sass/bootstrap/_badges.scss +67 -0
  38. data/doc/pages/source/_sass/bootstrap/_breadcrumbs.scss +26 -0
  39. data/doc/pages/source/_sass/bootstrap/_button-groups.scss +243 -0
  40. data/doc/pages/source/_sass/bootstrap/_buttons.scss +160 -0
  41. data/doc/pages/source/_sass/bootstrap/_carousel.scss +269 -0
  42. data/doc/pages/source/_sass/bootstrap/_close.scss +36 -0
  43. data/doc/pages/source/_sass/bootstrap/_code.scss +69 -0
  44. data/doc/pages/source/_sass/bootstrap/_component-animations.scss +38 -0
  45. data/doc/pages/source/_sass/bootstrap/_dropdowns.scss +214 -0
  46. data/doc/pages/source/_sass/bootstrap/_forms.scss +570 -0
  47. data/doc/pages/source/_sass/bootstrap/_glyphicons.scss +301 -0
  48. data/doc/pages/source/_sass/bootstrap/_grid.scss +84 -0
  49. data/doc/pages/source/_sass/bootstrap/_input-groups.scss +166 -0
  50. data/doc/pages/source/_sass/bootstrap/_jumbotron.scss +50 -0
  51. data/doc/pages/source/_sass/bootstrap/_labels.scss +66 -0
  52. data/doc/pages/source/_sass/bootstrap/_list-group.scss +124 -0
  53. data/doc/pages/source/_sass/bootstrap/_media.scss +61 -0
  54. data/doc/pages/source/_sass/bootstrap/_mixins.scss +39 -0
  55. data/doc/pages/source/_sass/bootstrap/_modals.scss +148 -0
  56. data/doc/pages/source/_sass/bootstrap/_navbar.scss +663 -0
  57. data/doc/pages/source/_sass/bootstrap/_navs.scss +244 -0
  58. data/doc/pages/source/_sass/bootstrap/_normalize.scss +427 -0
  59. data/doc/pages/source/_sass/bootstrap/_pager.scss +54 -0
  60. data/doc/pages/source/_sass/bootstrap/_pagination.scss +88 -0
  61. data/doc/pages/source/_sass/bootstrap/_panels.scss +265 -0
  62. data/doc/pages/source/_sass/bootstrap/_popovers.scss +135 -0
  63. data/doc/pages/source/_sass/bootstrap/_print.scss +107 -0
  64. data/doc/pages/source/_sass/bootstrap/_progress-bars.scss +87 -0
  65. data/doc/pages/source/_sass/bootstrap/_responsive-embed.scss +35 -0
  66. data/doc/pages/source/_sass/bootstrap/_responsive-utilities.scss +177 -0
  67. data/doc/pages/source/_sass/bootstrap/_scaffolding.scss +150 -0
  68. data/doc/pages/source/_sass/bootstrap/_tables.scss +234 -0
  69. data/doc/pages/source/_sass/bootstrap/_theme.scss +273 -0
  70. data/doc/pages/source/_sass/bootstrap/_thumbnails.scss +38 -0
  71. data/doc/pages/source/_sass/bootstrap/_tooltip.scss +103 -0
  72. data/doc/pages/source/_sass/bootstrap/_type.scss +298 -0
  73. data/doc/pages/source/_sass/bootstrap/_utilities.scss +56 -0
  74. data/doc/pages/source/_sass/bootstrap/_variables.scss +862 -0
  75. data/doc/pages/source/_sass/bootstrap/_wells.scss +29 -0
  76. data/doc/pages/source/_sass/bootstrap/mixins/_alerts.scss +14 -0
  77. data/doc/pages/source/_sass/bootstrap/mixins/_background-variant.scss +11 -0
  78. data/doc/pages/source/_sass/bootstrap/mixins/_border-radius.scss +18 -0
  79. data/doc/pages/source/_sass/bootstrap/mixins/_buttons.scss +52 -0
  80. data/doc/pages/source/_sass/bootstrap/mixins/_center-block.scss +7 -0
  81. data/doc/pages/source/_sass/bootstrap/mixins/_clearfix.scss +22 -0
  82. data/doc/pages/source/_sass/bootstrap/mixins/_forms.scss +88 -0
  83. data/doc/pages/source/_sass/bootstrap/mixins/_gradients.scss +58 -0
  84. data/doc/pages/source/_sass/bootstrap/mixins/_grid-framework.scss +81 -0
  85. data/doc/pages/source/_sass/bootstrap/mixins/_grid.scss +122 -0
  86. data/doc/pages/source/_sass/bootstrap/mixins/_hide-text.scss +21 -0
  87. data/doc/pages/source/_sass/bootstrap/mixins/_image.scss +33 -0
  88. data/doc/pages/source/_sass/bootstrap/mixins/_labels.scss +12 -0
  89. data/doc/pages/source/_sass/bootstrap/mixins/_list-group.scss +31 -0
  90. data/doc/pages/source/_sass/bootstrap/mixins/_nav-divider.scss +10 -0
  91. data/doc/pages/source/_sass/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  92. data/doc/pages/source/_sass/bootstrap/mixins/_opacity.scss +8 -0
  93. data/doc/pages/source/_sass/bootstrap/mixins/_pagination.scss +23 -0
  94. data/doc/pages/source/_sass/bootstrap/mixins/_panels.scss +24 -0
  95. data/doc/pages/source/_sass/bootstrap/mixins/_progress-bar.scss +10 -0
  96. data/doc/pages/source/_sass/bootstrap/mixins/_reset-filter.scss +8 -0
  97. data/doc/pages/source/_sass/bootstrap/mixins/_resize.scss +6 -0
  98. data/doc/pages/source/_sass/bootstrap/mixins/_responsive-visibility.scss +21 -0
  99. data/doc/pages/source/_sass/bootstrap/mixins/_size.scss +10 -0
  100. data/doc/pages/source/_sass/bootstrap/mixins/_tab-focus.scss +9 -0
  101. data/doc/pages/source/_sass/bootstrap/mixins/_table-row.scss +28 -0
  102. data/doc/pages/source/_sass/bootstrap/mixins/_text-emphasis.scss +11 -0
  103. data/doc/pages/source/_sass/bootstrap/mixins/_text-overflow.scss +8 -0
  104. data/doc/pages/source/_sass/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  105. data/doc/pages/source/atom.xml +32 -0
  106. data/doc/pages/source/bootstrap/config.json +429 -0
  107. data/doc/pages/source/bootstrap/css/bootstrap-theme.css +479 -0
  108. data/doc/pages/source/bootstrap/css/bootstrap-theme.min.css +10 -0
  109. data/doc/pages/source/bootstrap/css/bootstrap.css +6564 -0
  110. data/doc/pages/source/bootstrap/css/bootstrap.min.css +10 -0
  111. data/doc/pages/source/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  112. data/doc/pages/source/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
  113. data/doc/pages/source/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  114. data/doc/pages/source/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  115. data/doc/pages/source/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  116. data/doc/pages/source/bootstrap/js/bootstrap.js +2309 -0
  117. data/doc/pages/source/bootstrap/js/bootstrap.min.js +12 -0
  118. data/doc/pages/source/css/app.scss +10 -0
  119. data/doc/pages/source/css/syntax.css +60 -0
  120. data/doc/pages/source/documentation/index.md +977 -0
  121. data/doc/pages/source/faq/index.md +16 -0
  122. data/doc/pages/source/images/dynflow-logos.svg +423 -0
  123. data/doc/pages/source/images/logo-long.png +0 -0
  124. data/doc/pages/source/images/logo-long.svg +116 -0
  125. data/doc/pages/source/images/logo-square.png +0 -0
  126. data/doc/pages/source/images/logo-square.svg +75 -0
  127. data/doc/pages/source/images/noise.png +0 -0
  128. data/doc/pages/source/images/screenshot.png +0 -0
  129. data/doc/pages/source/index.md +64 -0
  130. data/doc/pages/source/media/index.md +20 -0
  131. data/doc/pages/source/projects/index.md +32 -0
  132. data/dynflow.gemspec +2 -3
  133. data/examples/sub_plans.rb +37 -0
  134. data/lib/dynflow/action.rb +28 -8
  135. data/lib/dynflow/action/polling.rb +6 -5
  136. data/lib/dynflow/action/with_sub_plans.rb +162 -0
  137. data/lib/dynflow/execution_plan.rb +25 -7
  138. data/lib/dynflow/execution_plan/steps/abstract.rb +5 -2
  139. data/lib/dynflow/execution_plan/steps/plan_step.rb +6 -2
  140. data/lib/dynflow/execution_plan/steps/run_step.rb +4 -0
  141. data/lib/dynflow/persistence.rb +5 -0
  142. data/lib/dynflow/persistence_adapters/sequel.rb +12 -2
  143. data/lib/dynflow/persistence_adapters/sequel_migrations/003_parent_action.rb +9 -0
  144. data/lib/dynflow/version.rb +1 -1
  145. data/lib/dynflow/web_console.rb +21 -7
  146. data/lib/dynflow/world.rb +26 -2
  147. data/test/action_test.rb +107 -0
  148. data/test/persistance_adapters_test.rb +2 -2
  149. data/test/test_helper.rb +1 -1
  150. data/web/views/flow_step.erb +3 -0
  151. metadata +137 -4
@@ -0,0 +1,69 @@
1
+ //
2
+ // Code (inline and block)
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Inline and block code styles
7
+ code,
8
+ kbd,
9
+ pre,
10
+ samp {
11
+ font-family: $font-family-monospace;
12
+ }
13
+
14
+ // Inline code
15
+ code {
16
+ padding: 2px 4px;
17
+ font-size: 90%;
18
+ color: $code-color;
19
+ background-color: $code-bg;
20
+ border-radius: $border-radius-base;
21
+ }
22
+
23
+ // User input typically entered via keyboard
24
+ kbd {
25
+ padding: 2px 4px;
26
+ font-size: 90%;
27
+ color: $kbd-color;
28
+ background-color: $kbd-bg;
29
+ border-radius: $border-radius-small;
30
+ box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
31
+
32
+ kbd {
33
+ padding: 0;
34
+ font-size: 100%;
35
+ font-weight: bold;
36
+ box-shadow: none;
37
+ }
38
+ }
39
+
40
+ // Blocks of code
41
+ pre {
42
+ display: block;
43
+ padding: (($line-height-computed - 1) / 2);
44
+ margin: 0 0 ($line-height-computed / 2);
45
+ font-size: ($font-size-base - 1); // 14px to 13px
46
+ line-height: $line-height-base;
47
+ word-break: break-all;
48
+ word-wrap: break-word;
49
+ color: $pre-color;
50
+ background-color: $pre-bg;
51
+ border: 1px solid $pre-border-color;
52
+ border-radius: $border-radius-base;
53
+
54
+ // Account for some code outputs that place code tags in pre tags
55
+ code {
56
+ padding: 0;
57
+ font-size: inherit;
58
+ color: inherit;
59
+ white-space: pre-wrap;
60
+ background-color: transparent;
61
+ border-radius: 0;
62
+ }
63
+ }
64
+
65
+ // Enable scrollable blocks of code
66
+ .pre-scrollable {
67
+ max-height: $pre-scrollable-max-height;
68
+ overflow-y: scroll;
69
+ }
@@ -0,0 +1,38 @@
1
+ //
2
+ // Component animations
3
+ // --------------------------------------------------
4
+
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9
+
10
+ .fade {
11
+ opacity: 0;
12
+ @include transition(opacity .15s linear);
13
+ &.in {
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ .collapse {
19
+ display: none;
20
+ visibility: hidden;
21
+
22
+ &.in { display: block; visibility: visible; }
23
+ // [converter] extracted tr&.in to tr.collapse.in
24
+ // [converter] extracted tbody&.in to tbody.collapse.in
25
+ }
26
+
27
+ tr.collapse.in { display: table-row; }
28
+
29
+ tbody.collapse.in { display: table-row-group; }
30
+
31
+ .collapsing {
32
+ position: relative;
33
+ height: 0;
34
+ overflow: hidden;
35
+ @include transition-property(height, visibility);
36
+ @include transition-duration(.35s);
37
+ @include transition-timing-function(ease);
38
+ }
@@ -0,0 +1,214 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Dropdown arrow/caret
7
+ .caret {
8
+ display: inline-block;
9
+ width: 0;
10
+ height: 0;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: $caret-width-base solid;
14
+ border-right: $caret-width-base solid transparent;
15
+ border-left: $caret-width-base solid transparent;
16
+ }
17
+
18
+ // The dropdown wrapper (div)
19
+ .dropup,
20
+ .dropdown {
21
+ position: relative;
22
+ }
23
+
24
+ // Prevent the focus on the dropdown toggle when closing dropdowns
25
+ .dropdown-toggle:focus {
26
+ outline: 0;
27
+ }
28
+
29
+ // The dropdown menu (ul)
30
+ .dropdown-menu {
31
+ position: absolute;
32
+ top: 100%;
33
+ left: 0;
34
+ z-index: $zindex-dropdown;
35
+ display: none; // none by default, but block on "open" of the menu
36
+ float: left;
37
+ min-width: 160px;
38
+ padding: 5px 0;
39
+ margin: 2px 0 0; // override default ul
40
+ list-style: none;
41
+ font-size: $font-size-base;
42
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
43
+ background-color: $dropdown-bg;
44
+ border: 1px solid $dropdown-fallback-border; // IE8 fallback
45
+ border: 1px solid $dropdown-border;
46
+ border-radius: $border-radius-base;
47
+ @include box-shadow(0 6px 12px rgba(0,0,0,.175));
48
+ background-clip: padding-box;
49
+
50
+ // Aligns the dropdown menu to right
51
+ //
52
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
53
+ &.pull-right {
54
+ right: 0;
55
+ left: auto;
56
+ }
57
+
58
+ // Dividers (basically an hr) within the dropdown
59
+ .divider {
60
+ @include nav-divider($dropdown-divider-bg);
61
+ }
62
+
63
+ // Links within the dropdown menu
64
+ > li > a {
65
+ display: block;
66
+ padding: 3px 20px;
67
+ clear: both;
68
+ font-weight: normal;
69
+ line-height: $line-height-base;
70
+ color: $dropdown-link-color;
71
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
72
+ }
73
+ }
74
+
75
+ // Hover/Focus state
76
+ .dropdown-menu > li > a {
77
+ &:hover,
78
+ &:focus {
79
+ text-decoration: none;
80
+ color: $dropdown-link-hover-color;
81
+ background-color: $dropdown-link-hover-bg;
82
+ }
83
+ }
84
+
85
+ // Active state
86
+ .dropdown-menu > .active > a {
87
+ &,
88
+ &:hover,
89
+ &:focus {
90
+ color: $dropdown-link-active-color;
91
+ text-decoration: none;
92
+ outline: 0;
93
+ background-color: $dropdown-link-active-bg;
94
+ }
95
+ }
96
+
97
+ // Disabled state
98
+ //
99
+ // Gray out text and ensure the hover/focus state remains gray
100
+
101
+ .dropdown-menu > .disabled > a {
102
+ &,
103
+ &:hover,
104
+ &:focus {
105
+ color: $dropdown-link-disabled-color;
106
+ }
107
+
108
+ // Nuke hover/focus effects
109
+ &:hover,
110
+ &:focus {
111
+ text-decoration: none;
112
+ background-color: transparent;
113
+ background-image: none; // Remove CSS gradient
114
+ @include reset-filter;
115
+ cursor: $cursor-disabled;
116
+ }
117
+ }
118
+
119
+ // Open state for the dropdown
120
+ .open {
121
+ // Show the menu
122
+ > .dropdown-menu {
123
+ display: block;
124
+ }
125
+
126
+ // Remove the outline when :focus is triggered
127
+ > a {
128
+ outline: 0;
129
+ }
130
+ }
131
+
132
+ // Menu positioning
133
+ //
134
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
135
+ // menu with the parent.
136
+ .dropdown-menu-right {
137
+ left: auto; // Reset the default from `.dropdown-menu`
138
+ right: 0;
139
+ }
140
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
141
+ // aligned nav component. To enable the undoing of that, we provide an override
142
+ // to restore the default dropdown menu alignment.
143
+ //
144
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
145
+ // `.pull-right` nav component.
146
+ .dropdown-menu-left {
147
+ left: 0;
148
+ right: auto;
149
+ }
150
+
151
+ // Dropdown section headers
152
+ .dropdown-header {
153
+ display: block;
154
+ padding: 3px 20px;
155
+ font-size: $font-size-small;
156
+ line-height: $line-height-base;
157
+ color: $dropdown-header-color;
158
+ white-space: nowrap; // as with > li > a
159
+ }
160
+
161
+ // Backdrop to catch body clicks on mobile, etc.
162
+ .dropdown-backdrop {
163
+ position: fixed;
164
+ left: 0;
165
+ right: 0;
166
+ bottom: 0;
167
+ top: 0;
168
+ z-index: ($zindex-dropdown - 10);
169
+ }
170
+
171
+ // Right aligned dropdowns
172
+ .pull-right > .dropdown-menu {
173
+ right: 0;
174
+ left: auto;
175
+ }
176
+
177
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
178
+ //
179
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
180
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
181
+
182
+ .dropup,
183
+ .navbar-fixed-bottom .dropdown {
184
+ // Reverse the caret
185
+ .caret {
186
+ border-top: 0;
187
+ border-bottom: $caret-width-base solid;
188
+ content: "";
189
+ }
190
+ // Different positioning for bottom up menu
191
+ .dropdown-menu {
192
+ top: auto;
193
+ bottom: 100%;
194
+ margin-bottom: 2px;
195
+ }
196
+ }
197
+
198
+
199
+ // Component alignment
200
+ //
201
+ // Reiterate per navbar.less and the modified component alignment there.
202
+
203
+ @media (min-width: $grid-float-breakpoint) {
204
+ .navbar-right {
205
+ .dropdown-menu {
206
+ right: 0; left: auto;
207
+ }
208
+ // Necessary for overrides of the default right aligned menu.
209
+ // Will remove come v4 in all likelihood.
210
+ .dropdown-menu-left {
211
+ left: 0; right: auto;
212
+ }
213
+ }
214
+ }
@@ -0,0 +1,570 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Normalize non-controls
7
+ //
8
+ // Restyle and baseline non-control form elements.
9
+
10
+ fieldset {
11
+ padding: 0;
12
+ margin: 0;
13
+ border: 0;
14
+ // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
15
+ // so we reset that to ensure it behaves more like a standard block element.
16
+ // See https://github.com/twbs/bootstrap/issues/12359.
17
+ min-width: 0;
18
+ }
19
+
20
+ legend {
21
+ display: block;
22
+ width: 100%;
23
+ padding: 0;
24
+ margin-bottom: $line-height-computed;
25
+ font-size: ($font-size-base * 1.5);
26
+ line-height: inherit;
27
+ color: $legend-color;
28
+ border: 0;
29
+ border-bottom: 1px solid $legend-border-color;
30
+ }
31
+
32
+ label {
33
+ display: inline-block;
34
+ max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
35
+ margin-bottom: 5px;
36
+ font-weight: bold;
37
+ }
38
+
39
+
40
+ // Normalize form controls
41
+ //
42
+ // While most of our form styles require extra classes, some basic normalization
43
+ // is required to ensure optimum display with or without those classes to better
44
+ // address browser inconsistencies.
45
+
46
+ // Override content-box in Normalize (* isn't specific enough)
47
+ input[type="search"] {
48
+ @include box-sizing(border-box);
49
+ }
50
+
51
+ // Position radios and checkboxes better
52
+ input[type="radio"],
53
+ input[type="checkbox"] {
54
+ margin: 4px 0 0;
55
+ margin-top: 1px \9; // IE8-9
56
+ line-height: normal;
57
+ }
58
+
59
+ // Set the height of file controls to match text inputs
60
+ input[type="file"] {
61
+ display: block;
62
+ }
63
+
64
+ // Make range inputs behave like textual form controls
65
+ input[type="range"] {
66
+ display: block;
67
+ width: 100%;
68
+ }
69
+
70
+ // Make multiple select elements height not fixed
71
+ select[multiple],
72
+ select[size] {
73
+ height: auto;
74
+ }
75
+
76
+ // Focus for file, radio, and checkbox
77
+ input[type="file"]:focus,
78
+ input[type="radio"]:focus,
79
+ input[type="checkbox"]:focus {
80
+ @include tab-focus;
81
+ }
82
+
83
+ // Adjust output element
84
+ output {
85
+ display: block;
86
+ padding-top: ($padding-base-vertical + 1);
87
+ font-size: $font-size-base;
88
+ line-height: $line-height-base;
89
+ color: $input-color;
90
+ }
91
+
92
+
93
+ // Common form controls
94
+ //
95
+ // Shared size and type resets for form controls. Apply `.form-control` to any
96
+ // of the following form controls:
97
+ //
98
+ // select
99
+ // textarea
100
+ // input[type="text"]
101
+ // input[type="password"]
102
+ // input[type="datetime"]
103
+ // input[type="datetime-local"]
104
+ // input[type="date"]
105
+ // input[type="month"]
106
+ // input[type="time"]
107
+ // input[type="week"]
108
+ // input[type="number"]
109
+ // input[type="email"]
110
+ // input[type="url"]
111
+ // input[type="search"]
112
+ // input[type="tel"]
113
+ // input[type="color"]
114
+
115
+ .form-control {
116
+ display: block;
117
+ width: 100%;
118
+ height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
119
+ padding: $padding-base-vertical $padding-base-horizontal;
120
+ font-size: $font-size-base;
121
+ line-height: $line-height-base;
122
+ color: $input-color;
123
+ background-color: $input-bg;
124
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
125
+ border: 1px solid $input-border;
126
+ border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
127
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
128
+ @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
129
+
130
+ // Customize the `:focus` state to imitate native WebKit styles.
131
+ @include form-control-focus;
132
+
133
+ // Placeholder
134
+ @include placeholder;
135
+
136
+ // Disabled and read-only inputs
137
+ //
138
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
139
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
140
+ // don't honor that edge case; we style them as disabled anyway.
141
+ &[disabled],
142
+ &[readonly],
143
+ fieldset[disabled] & {
144
+ cursor: $cursor-disabled;
145
+ background-color: $input-bg-disabled;
146
+ opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
147
+ }
148
+
149
+ // [converter] extracted textarea& to textarea.form-control
150
+ }
151
+
152
+ // Reset height for `textarea`s
153
+ textarea.form-control {
154
+ height: auto;
155
+ }
156
+
157
+
158
+ // Search inputs in iOS
159
+ //
160
+ // This overrides the extra rounded corners on search inputs in iOS so that our
161
+ // `.form-control` class can properly style them. Note that this cannot simply
162
+ // be added to `.form-control` as it's not specific enough. For details, see
163
+ // https://github.com/twbs/bootstrap/issues/11586.
164
+
165
+ input[type="search"] {
166
+ -webkit-appearance: none;
167
+ }
168
+
169
+
170
+ // Special styles for iOS temporal inputs
171
+ //
172
+ // In Mobile Safari, setting `display: block` on temporal inputs causes the
173
+ // text within the input to become vertically misaligned. As a workaround, we
174
+ // set a pixel line-height that matches the given height of the input, but only
175
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
176
+
177
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
178
+ input[type="date"],
179
+ input[type="time"],
180
+ input[type="datetime-local"],
181
+ input[type="month"] {
182
+ line-height: $input-height-base;
183
+
184
+ &.input-sm,
185
+ .input-group-sm & {
186
+ line-height: $input-height-small;
187
+ }
188
+
189
+ &.input-lg,
190
+ .input-group-lg & {
191
+ line-height: $input-height-large;
192
+ }
193
+ }
194
+ }
195
+
196
+
197
+ // Form groups
198
+ //
199
+ // Designed to help with the organization and spacing of vertical forms. For
200
+ // horizontal forms, use the predefined grid classes.
201
+
202
+ .form-group {
203
+ margin-bottom: 15px;
204
+ }
205
+
206
+
207
+ // Checkboxes and radios
208
+ //
209
+ // Indent the labels to position radios/checkboxes as hanging controls.
210
+
211
+ .radio,
212
+ .checkbox {
213
+ position: relative;
214
+ display: block;
215
+ margin-top: 10px;
216
+ margin-bottom: 10px;
217
+
218
+ label {
219
+ min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
220
+ padding-left: 20px;
221
+ margin-bottom: 0;
222
+ font-weight: normal;
223
+ cursor: pointer;
224
+ }
225
+ }
226
+ .radio input[type="radio"],
227
+ .radio-inline input[type="radio"],
228
+ .checkbox input[type="checkbox"],
229
+ .checkbox-inline input[type="checkbox"] {
230
+ position: absolute;
231
+ margin-left: -20px;
232
+ margin-top: 4px \9;
233
+ }
234
+
235
+ .radio + .radio,
236
+ .checkbox + .checkbox {
237
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
238
+ }
239
+
240
+ // Radios and checkboxes on same line
241
+ .radio-inline,
242
+ .checkbox-inline {
243
+ display: inline-block;
244
+ padding-left: 20px;
245
+ margin-bottom: 0;
246
+ vertical-align: middle;
247
+ font-weight: normal;
248
+ cursor: pointer;
249
+ }
250
+ .radio-inline + .radio-inline,
251
+ .checkbox-inline + .checkbox-inline {
252
+ margin-top: 0;
253
+ margin-left: 10px; // space out consecutive inline controls
254
+ }
255
+
256
+ // Apply same disabled cursor tweak as for inputs
257
+ // Some special care is needed because <label>s don't inherit their parent's `cursor`.
258
+ //
259
+ // Note: Neither radios nor checkboxes can be readonly.
260
+ input[type="radio"],
261
+ input[type="checkbox"] {
262
+ &[disabled],
263
+ &.disabled,
264
+ fieldset[disabled] & {
265
+ cursor: $cursor-disabled;
266
+ }
267
+ }
268
+ // These classes are used directly on <label>s
269
+ .radio-inline,
270
+ .checkbox-inline {
271
+ &.disabled,
272
+ fieldset[disabled] & {
273
+ cursor: $cursor-disabled;
274
+ }
275
+ }
276
+ // These classes are used on elements with <label> descendants
277
+ .radio,
278
+ .checkbox {
279
+ &.disabled,
280
+ fieldset[disabled] & {
281
+ label {
282
+ cursor: $cursor-disabled;
283
+ }
284
+ }
285
+ }
286
+
287
+
288
+ // Static form control text
289
+ //
290
+ // Apply class to a `p` element to make any string of text align with labels in
291
+ // a horizontal form layout.
292
+
293
+ .form-control-static {
294
+ // Size it appropriately next to real form controls
295
+ padding-top: ($padding-base-vertical + 1);
296
+ padding-bottom: ($padding-base-vertical + 1);
297
+ // Remove default margin from `p`
298
+ margin-bottom: 0;
299
+
300
+ &.input-lg,
301
+ &.input-sm {
302
+ padding-left: 0;
303
+ padding-right: 0;
304
+ }
305
+ }
306
+
307
+
308
+ // Form control sizing
309
+ //
310
+ // Build on `.form-control` with modifier classes to decrease or increase the
311
+ // height and font-size of form controls.
312
+ //
313
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
314
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
315
+
316
+ @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
317
+ .form-group-sm {
318
+
319
+ @include input-size('.form-control', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
320
+
321
+ .form-control-static {
322
+ height: $input-height-small;
323
+ padding: $padding-small-vertical $padding-small-horizontal;
324
+ font-size: $font-size-small;
325
+ line-height: $line-height-small;
326
+ }
327
+ }
328
+
329
+ @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
330
+ .form-group-lg {
331
+
332
+ @include input-size('.form-control', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
333
+
334
+ .form-control-static {
335
+ height: $input-height-large;
336
+ padding: $padding-large-vertical $padding-large-horizontal;
337
+ font-size: $font-size-large;
338
+ line-height: $line-height-large;
339
+ }
340
+ }
341
+
342
+
343
+ // Form control feedback states
344
+ //
345
+ // Apply contextual and semantic states to individual form controls.
346
+
347
+ .has-feedback {
348
+ // Enable absolute positioning
349
+ position: relative;
350
+
351
+ // Ensure icons don't overlap text
352
+ .form-control {
353
+ padding-right: ($input-height-base * 1.25);
354
+ }
355
+ }
356
+ // Feedback icon (requires .glyphicon classes)
357
+ .form-control-feedback {
358
+ position: absolute;
359
+ top: 0;
360
+ right: 0;
361
+ z-index: 2; // Ensure icon is above input groups
362
+ display: block;
363
+ width: $input-height-base;
364
+ height: $input-height-base;
365
+ line-height: $input-height-base;
366
+ text-align: center;
367
+ pointer-events: none;
368
+ }
369
+ .input-lg + .form-control-feedback {
370
+ width: $input-height-large;
371
+ height: $input-height-large;
372
+ line-height: $input-height-large;
373
+ }
374
+ .input-sm + .form-control-feedback {
375
+ width: $input-height-small;
376
+ height: $input-height-small;
377
+ line-height: $input-height-small;
378
+ }
379
+
380
+ // Feedback states
381
+ .has-success {
382
+ @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
383
+ }
384
+ .has-warning {
385
+ @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
386
+ }
387
+ .has-error {
388
+ @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
389
+ }
390
+
391
+ // Reposition feedback icon if input has visible label above
392
+ .has-feedback label {
393
+
394
+ & ~ .form-control-feedback {
395
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
396
+ }
397
+ &.sr-only ~ .form-control-feedback {
398
+ top: 0;
399
+ }
400
+ }
401
+
402
+
403
+ // Help text
404
+ //
405
+ // Apply to any element you wish to create light text for placement immediately
406
+ // below a form control. Use for general help, formatting, or instructional text.
407
+
408
+ .help-block {
409
+ display: block; // account for any element using help-block
410
+ margin-top: 5px;
411
+ margin-bottom: 10px;
412
+ color: lighten($text-color, 25%); // lighten the text some for contrast
413
+ }
414
+
415
+
416
+ // Inline forms
417
+ //
418
+ // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
419
+ // forms begin stacked on extra small (mobile) devices and then go inline when
420
+ // viewports reach <768px.
421
+ //
422
+ // Requires wrapping inputs and labels with `.form-group` for proper display of
423
+ // default HTML form controls and our custom form controls (e.g., input groups).
424
+ //
425
+ // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
426
+
427
+ // [converter] extracted from `.form-inline` for libsass compatibility
428
+ @mixin form-inline {
429
+
430
+ // Kick in the inline
431
+ @media (min-width: $screen-sm-min) {
432
+ // Inline-block all the things for "inline"
433
+ .form-group {
434
+ display: inline-block;
435
+ margin-bottom: 0;
436
+ vertical-align: middle;
437
+ }
438
+
439
+ // In navbar-form, allow folks to *not* use `.form-group`
440
+ .form-control {
441
+ display: inline-block;
442
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
443
+ vertical-align: middle;
444
+ }
445
+
446
+ // Make static controls behave like regular ones
447
+ .form-control-static {
448
+ display: inline-block;
449
+ }
450
+
451
+ .input-group {
452
+ display: inline-table;
453
+ vertical-align: middle;
454
+
455
+ .input-group-addon,
456
+ .input-group-btn,
457
+ .form-control {
458
+ width: auto;
459
+ }
460
+ }
461
+
462
+ // Input groups need that 100% width though
463
+ .input-group > .form-control {
464
+ width: 100%;
465
+ }
466
+
467
+ .control-label {
468
+ margin-bottom: 0;
469
+ vertical-align: middle;
470
+ }
471
+
472
+ // Remove default margin on radios/checkboxes that were used for stacking, and
473
+ // then undo the floating of radios and checkboxes to match.
474
+ .radio,
475
+ .checkbox {
476
+ display: inline-block;
477
+ margin-top: 0;
478
+ margin-bottom: 0;
479
+ vertical-align: middle;
480
+
481
+ label {
482
+ padding-left: 0;
483
+ }
484
+ }
485
+ .radio input[type="radio"],
486
+ .checkbox input[type="checkbox"] {
487
+ position: relative;
488
+ margin-left: 0;
489
+ }
490
+
491
+ // Re-override the feedback icon.
492
+ .has-feedback .form-control-feedback {
493
+ top: 0;
494
+ }
495
+ }
496
+ }
497
+ // [converter] extracted as `@mixin form-inline` for libsass compatibility
498
+ .form-inline {
499
+ @include form-inline;
500
+ }
501
+
502
+
503
+
504
+ // Horizontal forms
505
+ //
506
+ // Horizontal forms are built on grid classes and allow you to create forms with
507
+ // labels on the left and inputs on the right.
508
+
509
+ .form-horizontal {
510
+
511
+ // Consistent vertical alignment of radios and checkboxes
512
+ //
513
+ // Labels also get some reset styles, but that is scoped to a media query below.
514
+ .radio,
515
+ .checkbox,
516
+ .radio-inline,
517
+ .checkbox-inline {
518
+ margin-top: 0;
519
+ margin-bottom: 0;
520
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
521
+ }
522
+ // Account for padding we're adding to ensure the alignment and of help text
523
+ // and other content below items
524
+ .radio,
525
+ .checkbox {
526
+ min-height: ($line-height-computed + ($padding-base-vertical + 1));
527
+ }
528
+
529
+ // Make form groups behave like rows
530
+ .form-group {
531
+ @include make-row;
532
+ }
533
+
534
+ // Reset spacing and right align labels, but scope to media queries so that
535
+ // labels on narrow viewports stack the same as a default form example.
536
+ @media (min-width: $screen-sm-min) {
537
+ .control-label {
538
+ text-align: right;
539
+ margin-bottom: 0;
540
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
541
+ }
542
+ }
543
+
544
+ // Validation states
545
+ //
546
+ // Reposition the icon because it's now within a grid column and columns have
547
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
548
+ .has-feedback .form-control-feedback {
549
+ right: ($grid-gutter-width / 2);
550
+ }
551
+
552
+ // Form group sizes
553
+ //
554
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
555
+ // inputs and labels within a `.form-group`.
556
+ .form-group-lg {
557
+ @media (min-width: $screen-sm-min) {
558
+ .control-label {
559
+ padding-top: (($padding-large-vertical * $line-height-large) + 1);
560
+ }
561
+ }
562
+ }
563
+ .form-group-sm {
564
+ @media (min-width: $screen-sm-min) {
565
+ .control-label {
566
+ padding-top: ($padding-small-vertical + 1);
567
+ }
568
+ }
569
+ }
570
+ }