less-rails-jasny-bootstrap 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +36 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +7 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +81 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/jasny/bootstrap/fileinput.js +198 -0
- data/app/assets/javascripts/jasny/bootstrap/inputmask.js +360 -0
- data/app/assets/javascripts/jasny/bootstrap/offcanvas.js +318 -0
- data/app/assets/javascripts/jasny/bootstrap/rowlink.js +86 -0
- data/app/assets/javascripts/jasny/bootstrap/transition.js +50 -0
- data/app/assets/javascripts/jasny/jasny-bootstrap.js +5 -0
- data/app/assets/stylesheets/jasny/jasny-bootstrap.less +1 -0
- data/app/frameworks/jasny/bootstrap/alerts-fixed.less +39 -0
- data/app/frameworks/jasny/bootstrap/build/jasny-bootstrap.less +5 -0
- data/app/frameworks/jasny/bootstrap/build/mixins.less +61 -0
- data/app/frameworks/jasny/bootstrap/build/variables.less +216 -0
- data/app/frameworks/jasny/bootstrap/button-labels.less +38 -0
- data/app/frameworks/jasny/bootstrap/fileinput.less +122 -0
- data/app/frameworks/jasny/bootstrap/grid-container-smooth.less +10 -0
- data/app/frameworks/jasny/bootstrap/jasny-bootstrap.less +18 -0
- data/app/frameworks/jasny/bootstrap/nav-tab-alignment.less +97 -0
- data/app/frameworks/jasny/bootstrap/navmenu.less +273 -0
- data/app/frameworks/jasny/bootstrap/offcanvas.less +48 -0
- data/app/frameworks/jasny/bootstrap/rowlink.less +22 -0
- data/app/frameworks/jasny/bootstrap/variables.less +66 -0
- data/less-rails-jasny-bootstrap.gemspec +26 -0
- data/lib/less-rails-jasny-bootstrap.rb +11 -0
- data/lib/less/rails/jasny/bootstrap.rb +2 -0
- data/lib/less/rails/jasny/bootstrap/engine.rb +15 -0
- data/lib/less/rails/jasny/bootstrap/version.rb +9 -0
- metadata +144 -0
@@ -0,0 +1 @@
|
|
1
|
+
@import "jasny/bootstrap/jasny-bootstrap";
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Fixed alerts
|
2
|
+
// Position to the top or bottom.
|
3
|
+
// ------------------------------------------------
|
4
|
+
|
5
|
+
.alert-fixed-top,
|
6
|
+
.alert-fixed-bottom {
|
7
|
+
position: fixed;
|
8
|
+
width: 100%;
|
9
|
+
z-index: @zindex-alert-fixed;
|
10
|
+
border-radius: 0;
|
11
|
+
margin: 0;
|
12
|
+
left: 0;
|
13
|
+
|
14
|
+
@media (min-width: @alert-fixed-width) {
|
15
|
+
width: @alert-fixed-width;
|
16
|
+
left: 50%;
|
17
|
+
margin-left: (-1 * (@alert-fixed-width / 2));
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.alert-fixed-top {
|
22
|
+
top: 0;
|
23
|
+
border-width: 0 0 1px 0;
|
24
|
+
|
25
|
+
@media (min-width: @alert-fixed-width) {
|
26
|
+
.border-bottom-radius(@alert-border-radius);
|
27
|
+
border-width: 0 1px 1px 1px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.alert-fixed-bottom {
|
32
|
+
bottom: 0;
|
33
|
+
border-width: 1px 0 0 0;
|
34
|
+
|
35
|
+
@media (min-width: @alert-fixed-width) {
|
36
|
+
.border-top-radius(@alert-border-radius);
|
37
|
+
border-width: 1px 1px 0 1px;
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
//
|
2
|
+
// These mixins are used when Jasny Bootstrap is
|
3
|
+
// built without importing Twitter Bootstrap.
|
4
|
+
// --------------------------------------------------
|
5
|
+
|
6
|
+
|
7
|
+
// CSS3 PROPERTIES
|
8
|
+
// --------------------------------------------------
|
9
|
+
|
10
|
+
// Single side border-radius
|
11
|
+
.border-top-radius(@radius) {
|
12
|
+
border-top-right-radius: @radius;
|
13
|
+
border-top-left-radius: @radius;
|
14
|
+
}
|
15
|
+
.border-right-radius(@radius) {
|
16
|
+
border-bottom-right-radius: @radius;
|
17
|
+
border-top-right-radius: @radius;
|
18
|
+
}
|
19
|
+
.border-bottom-radius(@radius) {
|
20
|
+
border-bottom-right-radius: @radius;
|
21
|
+
border-bottom-left-radius: @radius;
|
22
|
+
}
|
23
|
+
.border-left-radius(@radius) {
|
24
|
+
border-bottom-left-radius: @radius;
|
25
|
+
border-top-left-radius: @radius;
|
26
|
+
}
|
27
|
+
|
28
|
+
// Drop shadows
|
29
|
+
.box-shadow(@shadow) {
|
30
|
+
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
|
31
|
+
box-shadow: @shadow;
|
32
|
+
}
|
33
|
+
.transition(@transition) {
|
34
|
+
-webkit-transition: @transition;
|
35
|
+
-o-transition: @transition;
|
36
|
+
transition: @transition;
|
37
|
+
}
|
38
|
+
|
39
|
+
// Transition
|
40
|
+
.transition-property(@transition-property) {
|
41
|
+
-webkit-transition-property: @transition-property;
|
42
|
+
transition-property: @transition-property;
|
43
|
+
}
|
44
|
+
.transition-delay(@transition-delay) {
|
45
|
+
-webkit-transition-delay: @transition-delay;
|
46
|
+
transition-delay: @transition-delay;
|
47
|
+
}
|
48
|
+
.transition-duration(@transition-duration) {
|
49
|
+
-webkit-transition-duration: @transition-duration;
|
50
|
+
transition-duration: @transition-duration;
|
51
|
+
}
|
52
|
+
.transition-timing-function(@timing-function) {
|
53
|
+
-webkit-transition-timing-function: @timing-function;
|
54
|
+
transition-timing-function: @timing-function;
|
55
|
+
}
|
56
|
+
.transition-transform(@transition) {
|
57
|
+
-webkit-transition: -webkit-transform @transition;
|
58
|
+
-moz-transition: -moz-transform @transition;
|
59
|
+
-o-transition: -o-transform @transition;
|
60
|
+
transition: transform @transition;
|
61
|
+
}
|
@@ -0,0 +1,216 @@
|
|
1
|
+
//
|
2
|
+
// These variables are used when Jasny Bootstrap is built
|
3
|
+
// without importing Twitter Bootstrap.
|
4
|
+
// --------------------------------------------------------
|
5
|
+
|
6
|
+
//-- Colors
|
7
|
+
//
|
8
|
+
//## Gray colors for use across Bootstrap.
|
9
|
+
|
10
|
+
@gray-darker: lighten(#000, 13.5%); // #222
|
11
|
+
@gray-dark: lighten(#000, 20%); // #333
|
12
|
+
@gray: lighten(#000, 33.5%); // #555
|
13
|
+
@gray-light: lighten(#000, 60%); // #999
|
14
|
+
@gray-lighter: lighten(#000, 93.5%); // #eee
|
15
|
+
|
16
|
+
//-- Typography
|
17
|
+
//
|
18
|
+
//## Font size and line-height.
|
19
|
+
|
20
|
+
@font-size-base: 14px;
|
21
|
+
@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
|
22
|
+
@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
|
23
|
+
|
24
|
+
//** Unit-less `line-height` for use in components like buttons.
|
25
|
+
@line-height-base: 1.428571429; // 20/14
|
26
|
+
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
|
27
|
+
@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
|
28
|
+
|
29
|
+
|
30
|
+
//== Components
|
31
|
+
//
|
32
|
+
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
|
33
|
+
|
34
|
+
@padding-base-vertical: 6px;
|
35
|
+
@padding-base-horizontal: 12px;
|
36
|
+
|
37
|
+
@padding-large-vertical: 10px;
|
38
|
+
@padding-large-horizontal: 16px;
|
39
|
+
|
40
|
+
@padding-small-vertical: 5px;
|
41
|
+
@padding-small-horizontal: 10px;
|
42
|
+
|
43
|
+
@padding-xs-vertical: 1px;
|
44
|
+
@padding-xs-horizontal: 5px;
|
45
|
+
|
46
|
+
@line-height-large: 1.33;
|
47
|
+
@line-height-small: 1.5;
|
48
|
+
|
49
|
+
@border-radius-base: 4px;
|
50
|
+
@border-radius-large: 6px;
|
51
|
+
@border-radius-small: 3px;
|
52
|
+
|
53
|
+
|
54
|
+
//== Tables
|
55
|
+
//
|
56
|
+
//## Customizes the `.table` component with basic values, each used across all table variations.
|
57
|
+
|
58
|
+
//** Background color used for `.table-hover`.
|
59
|
+
@table-bg-hover: #f5f5f5;
|
60
|
+
|
61
|
+
|
62
|
+
//-- Z-index master list
|
63
|
+
//
|
64
|
+
// Warning: Avoid customizing these values. They're used for a bird's eye view
|
65
|
+
// of components dependent on the z-axis and are designed to all work together.
|
66
|
+
//
|
67
|
+
// Note: These variables are not generated into the Customizer.
|
68
|
+
|
69
|
+
@zindex-navmenu-fixed: 1030;
|
70
|
+
@zindex-alert-fixed: 1035;
|
71
|
+
|
72
|
+
|
73
|
+
//== Media queries breakpoints
|
74
|
+
//
|
75
|
+
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
|
76
|
+
|
77
|
+
// Extra small screen / phone
|
78
|
+
@screen-xs: 480px;
|
79
|
+
|
80
|
+
// Small screen / tablet
|
81
|
+
@screen-sm: 768px;
|
82
|
+
|
83
|
+
// Medium screen / desktop
|
84
|
+
@screen-md: 992px;
|
85
|
+
|
86
|
+
// Large screen / wide desktop
|
87
|
+
@screen-lg: 1200px;
|
88
|
+
|
89
|
+
//-- So media queries don't overlap when required, provide a maximum
|
90
|
+
//
|
91
|
+
// Note: These variables are not generated into the Customizer.
|
92
|
+
@screen-xs-min: @screen-xs;
|
93
|
+
@screen-sm-min: @screen-sm;
|
94
|
+
@screen-md-min: @screen-md;
|
95
|
+
@screen-lg-min: @screen-lg;
|
96
|
+
|
97
|
+
@screen-xs-max: (@screen-sm-min - 1);
|
98
|
+
@screen-sm-max: (@screen-md-min - 1);
|
99
|
+
@screen-md-max: (@screen-lg-min - 1);
|
100
|
+
|
101
|
+
//--
|
102
|
+
@container-lg: ((1140px + @grid-gutter-width));
|
103
|
+
|
104
|
+
//== Grid system
|
105
|
+
//
|
106
|
+
//## Define your custom responsive grid.
|
107
|
+
|
108
|
+
//** Padding between columns. Gets divided in half for the left and right.
|
109
|
+
@grid-gutter-width: 30px;
|
110
|
+
//** Point at which the navbar becomes uncollapsed.
|
111
|
+
@grid-float-breakpoint: 768px;
|
112
|
+
|
113
|
+
//** Maximum with of a smooth container.
|
114
|
+
@container-smooth: @container-lg;
|
115
|
+
|
116
|
+
//== Navbar
|
117
|
+
//
|
118
|
+
//##
|
119
|
+
|
120
|
+
// Basics of a navbar
|
121
|
+
@navbar-height: 50px;
|
122
|
+
@navbar-padding-horizontal: floor((@grid-gutter-width / 2));
|
123
|
+
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
|
124
|
+
|
125
|
+
|
126
|
+
//== Navmenu
|
127
|
+
//
|
128
|
+
//##
|
129
|
+
|
130
|
+
// Basics of a navmenu
|
131
|
+
@navmenu-width: 300px;
|
132
|
+
@navmenu-margin-vertical: (0.5 * @line-height-computed);
|
133
|
+
@navmenu-default-color: #777;
|
134
|
+
@navmenu-default-bg: #f8f8f8;
|
135
|
+
@navmenu-default-border: darken(@navmenu-default-bg, 6.5%);
|
136
|
+
|
137
|
+
// Navmenu links
|
138
|
+
@navmenu-default-link-color: #777;
|
139
|
+
@navmenu-default-link-hover-color: #333;
|
140
|
+
@navmenu-default-link-hover-bg: transparent;
|
141
|
+
@navmenu-default-link-active-color: #555;
|
142
|
+
@navmenu-default-link-active-bg: darken(@navmenu-default-bg, 6.5%);
|
143
|
+
@navmenu-default-link-disabled-color: #ccc;
|
144
|
+
@navmenu-default-link-disabled-bg: transparent;
|
145
|
+
|
146
|
+
// Navmenu brand label
|
147
|
+
@navmenu-default-brand-color: @navmenu-default-link-color;
|
148
|
+
@navmenu-default-brand-hover-color: darken(@navmenu-default-link-color, 10%);
|
149
|
+
@navmenu-default-brand-hover-bg: transparent;
|
150
|
+
|
151
|
+
|
152
|
+
// Inverted navmenu
|
153
|
+
//
|
154
|
+
// Reset inverted navmenu basics
|
155
|
+
@navmenu-inverse-color: @gray-light;
|
156
|
+
@navmenu-inverse-bg: #222;
|
157
|
+
@navmenu-inverse-border: darken(@navmenu-inverse-bg, 10%);
|
158
|
+
|
159
|
+
// Inverted navmenu links
|
160
|
+
@navmenu-inverse-link-color: @gray-light;
|
161
|
+
@navmenu-inverse-link-hover-color: #fff;
|
162
|
+
@navmenu-inverse-link-hover-bg: transparent;
|
163
|
+
@navmenu-inverse-link-active-color: @navmenu-inverse-link-hover-color;
|
164
|
+
@navmenu-inverse-link-active-bg: darken(@navmenu-inverse-bg, 10%);
|
165
|
+
@navmenu-inverse-link-disabled-color: #444;
|
166
|
+
@navmenu-inverse-link-disabled-bg: transparent;
|
167
|
+
|
168
|
+
// Inverted navmenu brand label
|
169
|
+
@navmenu-inverse-brand-color: @navmenu-inverse-link-color;
|
170
|
+
@navmenu-inverse-brand-hover-color: #fff;
|
171
|
+
@navmenu-inverse-brand-hover-bg: transparent;
|
172
|
+
|
173
|
+
// Inverted navmenu search
|
174
|
+
// Normal navmenu needs no special styles or vars
|
175
|
+
@navmenu-inverse-search-bg: lighten(@navmenu-inverse-bg, 25%);
|
176
|
+
@navmenu-inverse-search-bg-focus: #fff;
|
177
|
+
@navmenu-inverse-search-border: @navmenu-inverse-bg;
|
178
|
+
@navmenu-inverse-search-placeholder-color: #ccc;
|
179
|
+
|
180
|
+
|
181
|
+
//== Navs
|
182
|
+
//
|
183
|
+
//##
|
184
|
+
|
185
|
+
@nav-link-padding: 10px 15px;
|
186
|
+
@nav-tabs-active-link-hover-border-color: #ddd;
|
187
|
+
@nav-tabs-border-color: #ddd;
|
188
|
+
|
189
|
+
|
190
|
+
//== Form states and alerts
|
191
|
+
//
|
192
|
+
//## Define colors for form feedback states and, by default, alerts.
|
193
|
+
|
194
|
+
@state-success-text: #3c763d;
|
195
|
+
@state-success-bg: #dff0d8;
|
196
|
+
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
|
197
|
+
|
198
|
+
@state-info-text: #31708f;
|
199
|
+
@state-info-bg: #d9edf7;
|
200
|
+
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
|
201
|
+
|
202
|
+
@state-warning-text: #8a6d3b;
|
203
|
+
@state-warning-bg: #fcf8e3;
|
204
|
+
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
|
205
|
+
|
206
|
+
@state-danger-text: #a94442;
|
207
|
+
@state-danger-bg: #f2dede;
|
208
|
+
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
|
209
|
+
|
210
|
+
|
211
|
+
//== Alerts
|
212
|
+
//
|
213
|
+
//## Define alert colors, border radius, and padding.
|
214
|
+
|
215
|
+
@alert-border-radius: @border-radius-base;
|
216
|
+
@alert-fixed-width: @screen-md;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// Labels for buttons
|
2
|
+
// --------------------------------------------------
|
3
|
+
|
4
|
+
.button-label-size(@padding-vertical; @padding-horizontal; @border-radius) {
|
5
|
+
padding: @padding-vertical @padding-horizontal;
|
6
|
+
left: (-1 * @padding-horizontal);
|
7
|
+
border-radius: (@border-radius - 1px) 0 0 (@border-radius - 1px);
|
8
|
+
|
9
|
+
&.btn-label-right {
|
10
|
+
left: auto;
|
11
|
+
right: (-1 * @padding-horizontal);
|
12
|
+
border-radius: 0 (@border-radius - 1px) (@border-radius - 1px) 0;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
.btn-labeled {
|
18
|
+
padding-top: 0;
|
19
|
+
padding-bottom: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
.btn-label {
|
23
|
+
position: relative;
|
24
|
+
background: transparent;
|
25
|
+
background: rgba(0, 0, 0, 0.15);
|
26
|
+
display: inline-block;
|
27
|
+
.button-label-size(@padding-base-vertical; @padding-base-horizontal; @border-radius-base);
|
28
|
+
}
|
29
|
+
|
30
|
+
.btn-lg .btn-label {
|
31
|
+
.button-label-size(@padding-large-vertical; @padding-large-horizontal; @border-radius-large);
|
32
|
+
}
|
33
|
+
.btn-sm .btn-label {
|
34
|
+
.button-label-size(@padding-small-vertical; @padding-small-horizontal; @border-radius-small);
|
35
|
+
}
|
36
|
+
.btn-xs .btn-label {
|
37
|
+
.button-label-size(1px; 5px; @border-radius-small);
|
38
|
+
}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
// Fileinput.less
|
2
|
+
// CSS for file upload button and fileinput widget
|
3
|
+
// ------------------------------------------------
|
4
|
+
|
5
|
+
.btn-file {
|
6
|
+
overflow: hidden;
|
7
|
+
position: relative;
|
8
|
+
vertical-align: middle;
|
9
|
+
> input {
|
10
|
+
position: absolute;
|
11
|
+
top: 0;
|
12
|
+
right: 0;
|
13
|
+
margin: 0;
|
14
|
+
opacity: 0;
|
15
|
+
filter: alpha(opacity=0);
|
16
|
+
font-size: 23px;
|
17
|
+
height: 100%;
|
18
|
+
width: 100%;
|
19
|
+
direction: ltr;
|
20
|
+
cursor: pointer;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.fileinput {
|
25
|
+
margin-bottom: 9px;
|
26
|
+
display: inline-block;
|
27
|
+
.form-control {
|
28
|
+
padding-top: 7px;
|
29
|
+
padding-bottom: 5px;
|
30
|
+
display: inline-block;
|
31
|
+
margin-bottom: 0px;
|
32
|
+
vertical-align: middle;
|
33
|
+
cursor: text;
|
34
|
+
}
|
35
|
+
.thumbnail {
|
36
|
+
overflow: hidden;
|
37
|
+
display: inline-block;
|
38
|
+
margin-bottom: 5px;
|
39
|
+
vertical-align: middle;
|
40
|
+
text-align: center;
|
41
|
+
> img {
|
42
|
+
max-height: 100%;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
.btn {
|
46
|
+
vertical-align: middle;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
.fileinput-exists .fileinput-new,
|
50
|
+
.fileinput-new .fileinput-exists {
|
51
|
+
display: none;
|
52
|
+
}
|
53
|
+
.fileinput-inline .fileinput-controls {
|
54
|
+
display: inline;
|
55
|
+
}
|
56
|
+
|
57
|
+
.fileinput-filename {
|
58
|
+
vertical-align: middle;
|
59
|
+
display: inline-block;
|
60
|
+
overflow: hidden;
|
61
|
+
}
|
62
|
+
.form-control .fileinput-filename {
|
63
|
+
vertical-align: bottom;
|
64
|
+
}
|
65
|
+
|
66
|
+
.fileinput.input-group {
|
67
|
+
display: table;
|
68
|
+
|
69
|
+
> * {
|
70
|
+
position: relative;
|
71
|
+
z-index: 2;
|
72
|
+
}
|
73
|
+
> .btn-file {
|
74
|
+
z-index: 1;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
// Not 100% correct, but helps in typical use case
|
79
|
+
.fileinput-new.input-group .btn-file,
|
80
|
+
.fileinput-new .input-group .btn-file {
|
81
|
+
border-radius: 0 @border-radius-base @border-radius-base 0;
|
82
|
+
|
83
|
+
&.btn-xs,
|
84
|
+
&.btn-sm {
|
85
|
+
border-radius: 0 @border-radius-small @border-radius-small 0;
|
86
|
+
}
|
87
|
+
&.btn-lg {
|
88
|
+
border-radius: 0 @border-radius-large @border-radius-large 0;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
.form-group.has-warning .fileinput {
|
93
|
+
.fileinput-preview {
|
94
|
+
color: @state-warning-text;
|
95
|
+
}
|
96
|
+
.thumbnail {
|
97
|
+
border-color: @state-warning-border;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
.form-group.has-error .fileinput {
|
101
|
+
.fileinput-preview {
|
102
|
+
color: @state-danger-text;
|
103
|
+
}
|
104
|
+
.thumbnail {
|
105
|
+
border-color: @state-danger-border;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
.form-group.has-success .fileinput {
|
109
|
+
.fileinput-preview {
|
110
|
+
color: @state-success-text;
|
111
|
+
}
|
112
|
+
.thumbnail {
|
113
|
+
border-color: @state-success-border;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
// Input group fixes
|
119
|
+
|
120
|
+
.input-group-addon:not(:first-child) {
|
121
|
+
border-left: 0;
|
122
|
+
}
|