modularis 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile.lock +2 -2
  3. data/README.md +2 -4
  4. data/lib/modularis/version.rb +1 -1
  5. metadata +1 -91
  6. data/docs/CHANGELOG.md +0 -260
  7. data/docs/Capfile +0 -4
  8. data/docs/Gemfile +0 -13
  9. data/docs/Gemfile.lock +0 -45
  10. data/docs/Procfile +0 -2
  11. data/docs/README.md +0 -1
  12. data/docs/_sidebar-components.html.erb +0 -115
  13. data/docs/_sidebar.html.erb +0 -115
  14. data/docs/changelog.html.erb +0 -33
  15. data/docs/compile.rb +0 -34
  16. data/docs/components/alert-boxes.html.erb +0 -204
  17. data/docs/components/block-grid.html.erb +0 -132
  18. data/docs/components/breadcrumbs.html.erb +0 -156
  19. data/docs/components/button-groups.html.erb +0 -230
  20. data/docs/components/buttons.html.erb +0 -222
  21. data/docs/components/clearing.html.erb +0 -152
  22. data/docs/components/custom-forms.html.erb +0 -309
  23. data/docs/components/dropdown-buttons.html.erb +0 -235
  24. data/docs/components/dropdown.html.erb +0 -188
  25. data/docs/components/flex-video.html.erb +0 -95
  26. data/docs/components/forms.html.erb +0 -477
  27. data/docs/components/global.html.erb +0 -92
  28. data/docs/components/grid.html.erb +0 -366
  29. data/docs/components/inline-lists.html.erb +0 -91
  30. data/docs/components/joyride.html.erb +0 -183
  31. data/docs/components/keystrokes.html.erb +0 -76
  32. data/docs/components/kitchen-sink.html.erb +0 -870
  33. data/docs/components/labels.html.erb +0 -102
  34. data/docs/components/magellan.html.erb +0 -86
  35. data/docs/components/orbit.html.erb +0 -276
  36. data/docs/components/pagination.html.erb +0 -183
  37. data/docs/components/panels.html.erb +0 -123
  38. data/docs/components/pricing-tables.html.erb +0 -156
  39. data/docs/components/progress-bars.html.erb +0 -123
  40. data/docs/components/reveal.html.erb +0 -162
  41. data/docs/components/section.html.erb +0 -496
  42. data/docs/components/side-nav.html.erb +0 -124
  43. data/docs/components/split-buttons.html.erb +0 -220
  44. data/docs/components/sub-nav.html.erb +0 -122
  45. data/docs/components/switch.html.erb +0 -290
  46. data/docs/components/tables.html.erb +0 -125
  47. data/docs/components/thumbnails.html.erb +0 -89
  48. data/docs/components/tooltips.html.erb +0 -75
  49. data/docs/components/top-bar.html.erb +0 -283
  50. data/docs/components/type.html.erb +0 -396
  51. data/docs/components/visibility.html.erb +0 -110
  52. data/docs/config/deploy.rb +0 -36
  53. data/docs/config.ru +0 -12
  54. data/docs/controller.rb +0 -53
  55. data/docs/css/_coderay.scss +0 -116
  56. data/docs/css/_settings.scss +0 -1
  57. data/docs/css/docs.scss +0 -185
  58. data/docs/css/normalize.scss +0 -396
  59. data/docs/css/qunit-composite.css +0 -13
  60. data/docs/css/qunit.css +0 -235
  61. data/docs/faq.html.erb +0 -63
  62. data/docs/img/demos/demo1-th.jpg +0 -0
  63. data/docs/img/demos/demo1.jpg +0 -0
  64. data/docs/img/demos/demo2-th.jpg +0 -0
  65. data/docs/img/demos/demo2.jpg +0 -0
  66. data/docs/img/demos/demo3-th.jpg +0 -0
  67. data/docs/img/demos/demo3.jpg +0 -0
  68. data/docs/img/demos/demo4-th.jpg +0 -0
  69. data/docs/img/demos/demo4.jpg +0 -0
  70. data/docs/img/demos/demo5-th.jpg +0 -0
  71. data/docs/img/demos/demo5.jpg +0 -0
  72. data/docs/index.html.erb +0 -285
  73. data/docs/javascript.html.erb +0 -134
  74. data/docs/js/docs.js +0 -3
  75. data/docs/js/qunit-composite.js +0 -105
  76. data/docs/js/qunit.js +0 -1977
  77. data/docs/js/tests/tabs/simple_tabs.html +0 -57
  78. data/docs/js/tests/tabs/simple_tabs.js +0 -54
  79. data/docs/js/tests/tooltips/tooltips.html +0 -39
  80. data/docs/js/tests/tooltips/tooltips.js +0 -11
  81. data/docs/layout.html.erb +0 -128
  82. data/docs/media-queries.html.erb +0 -96
  83. data/docs/rails.html.erb +0 -76
  84. data/docs/rtl.html.erb +0 -53
  85. data/docs/sass.html.erb +0 -1295
  86. data/docs/support.html.erb +0 -143
  87. data/docs/test/_test-scripts.html.erb +0 -36
  88. data/docs/test/cards.html.erb +0 -77
  89. data/docs/test/flexbox-grid.html.erb +0 -68
  90. data/docs/test/flip-nav.html.erb +0 -54
  91. data/docs/test/layout.html.erb +0 -15
  92. data/docs/test/off-canvas1.html.erb +0 -64
  93. data/docs/test/off-canvas2.html.erb +0 -75
  94. data/docs/test/off-canvas3.html.erb +0 -65
  95. data/docs/test_layout.html.erb +0 -128
@@ -1,156 +0,0 @@
1
- <% @side_nav = "nav" %>
2
-
3
- <div class="row">
4
- <div class="large-9 push-3 columns">
5
-
6
- <% @page_title = "Breadcrumbs" %>
7
- <div class="row">
8
- <div class="large-12 columns">
9
- <h2><%= @page_title %></h2>
10
- <h4 class="subheader">Breadcrumbs come in handy to show a navigation trail for users clicking through a site or app. They'll conform to 100% of the container width you put them in.</h4>
11
- </div>
12
- </div>
13
-
14
- <div class="row">
15
- <div class="large-12 columns">
16
- <ul class="breadcrumbs">
17
- <li><a href="#">Home</a></li>
18
- <li><a href="#">Features</a></li>
19
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
20
- <li class="current"><a href="#">Cloning</a></li>
21
- </ul>
22
-
23
- <hr>
24
-
25
- <h3>Build With Predefined HTML Classes</h3>
26
- <p>There are two ways to build breadcrumbs in Modularis 4: with our predefined HTML classes or with our structure and mixins. Building breadcrumbs using our predefined class is easy. You'll need an <code>&lt;ul class="breadcrumbs"&gt;</code> with <code>&lt;li&gt;</code> elements inside. You have access to two state classes: <code>&lt;li class="unavailable"&gt;</code> and <code>&lt;li class="current"&gt;</code> to control link intentions. The default markup looks like this:</p>
27
-
28
- <%= code_example '
29
- <ul class="breadcrumbs">
30
- <li><a href="#">Home</a></li>
31
- <li><a href="#">Features</a></li>
32
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
33
- <li class="current"><a href="#">Cloning</a></li>
34
- </ul>
35
-
36
- <!-- You can also use this markup -->
37
- <nav class="breadcrumbs">
38
- <a href="#">Home</a>
39
- <a href="#">Features</a>
40
- <a class="unavailable" href="#">Gene Splicing</a>
41
- <a class="current" href="#">Cloning</a>
42
- </nav>', :html %>
43
-
44
- <p>For these styles to come across, make sure you have the <strong>default Modularis CSS package</strong> or that you've selected <strong>breadcrumbs from a custom package</strong>. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
45
-
46
- <hr>
47
-
48
- <h3>Build with Mixins</h3>
49
- <p>We've included SCSS mixins used to style breadcrumbs. To use these mixins, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/_modularis-global.scss">_modularis-global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_global.scss">_global.scss</a> and <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_breadcrumbs.scss">_breadcrumbs.scss</a> from Github and throw them into a Modularis folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
50
-
51
- <%= code_example '
52
- @import "modularis/modularis-global", "modularis/components/global", "modularis/components/breadcrumbs";
53
- ', :css %>
54
-
55
- <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
56
-
57
- <%= code_example '
58
- <ul class="your-class-name">
59
- <li><a href="#">Home</a></li>
60
- <li><a href="#">Features</a></li>
61
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
62
- <li class="current"><a href="#">Cloning</a></li>
63
- </ul>', :html %>
64
-
65
- <h5>Container Mixin</h5>
66
- <p>You can build your breadcrumbs using our global mixin by including it on your custom class or ID in your stylesheet. The container mixin will create the necessary style for the <code>&lt;ul&gt;</code>. The global mixin looks like this:</p>
67
-
68
- <%= code_example '
69
- .your-class-name { @include crumb-container; }
70
- ', :css %>
71
-
72
- <ul class="crumb-container">
73
- <li><a href="#">Home</a></li>
74
- <li><a href="#">Features</a></li>
75
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
76
- <li class="current"><a href="#">Cloning</a></li>
77
- </ul>
78
-
79
- <h5>Crumbs Mixin</h5>
80
- <p>Use this mixin to apply the list item and link styles to items inside the breadcrumb container. You attach this mixin to the list items inside of your container.</p>
81
-
82
-
83
- <%= code_example '
84
- .your-class-name {
85
- @include crumb-container;
86
-
87
- li { @include crumbs; }
88
- }
89
- ', :css %>
90
-
91
- <ul class="crumb-container crumbs">
92
- <li><a href="#">Home</a></li>
93
- <li><a href="#">Features</a></li>
94
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
95
- <li class="current"><a href="#">Cloning</a></li>
96
- </ul>
97
-
98
- <h5>Radius Mixin</h5>
99
- <p>We've also created a global radius mixin that you can use to add border-radius to any element you'd like.</p>
100
-
101
- <%= code_example '
102
- .your-class-name {
103
- @include crumb-container;
104
- @include radius($radius);
105
-
106
- li { @include crumbs; }
107
- }
108
- ', :css %>
109
-
110
- <ul class="crumb-container crumbs radius">
111
- <li><a href="#">Home</a></li>
112
- <li><a href="#">Features</a></li>
113
- <li class="unavailable"><a href="#">Gene Splicing</a></li>
114
- <li class="current"><a href="#">Cloning</a></li>
115
- </ul>
116
-
117
- <h5>Default SCSS Variables</h5>
118
- <%= code_example '
119
- /* We use this to set the background color for the breadcrumb container */
120
- $crumb-bg: lighten($secondaryColor, 5%);
121
-
122
- /* We use these to set the padding around the breadcrumbs. */
123
- $crumb-padding: emCalc(6px) emCalc(14px) emCalc(9px);
124
- $crumb-side-padding: emCalc(12px);
125
-
126
- /* We use these to control border styles. */
127
- $crumb-function-factor: 10%;
128
- $crumb-border-size: 1px;
129
- $crumb-border-style: solid;
130
- $crumb-border-color: darken($crumb-bg, $crumb-function-factor);
131
- $crumb-radius: $global-radius;
132
-
133
- /* We use these to set various text styles for breadcrumbs. */
134
- $crumb-font-size: emCalc(11px);
135
- $crumb-font-color: $primary-color;
136
- $crumb-font-color-current: #333;
137
- $crumb-font-color-unavailable: #999;
138
- $crumb-font-transform: uppercase;
139
- $crumb-link-decor: underline;
140
-
141
- /* We use these to control the slash between breadcrumbs */
142
- $crumb-slash-color: #aaa;
143
- $crumb-slash: "/";
144
- ', :css %>
145
-
146
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
147
-
148
- </div>
149
- </div>
150
-
151
- </div>
152
-
153
- <div class="large-3 pull-9 columns">
154
- <%= render "_sidebar-components.html.erb" %>
155
- </div>
156
- </div>
@@ -1,230 +0,0 @@
1
- <% @side_nav = "buttons" %>
2
-
3
- <div class="row">
4
- <div class="large-9 push-3 columns">
5
-
6
- <% @page_title = "Button Groups" %>
7
- <div class="row">
8
- <div class="large-12 columns">
9
- <h2><%= @page_title %></h2>
10
- <h4 class="subheader">Button groups are great when you need to display a group of actions in a bar. These build off the button styles and work perfectly with the grid.</h4>
11
- </div>
12
- </div>
13
-
14
- <div class="row">
15
- <div class="large-12 columns">
16
-
17
- <ul class="button-group">
18
- <li><a href="#" class="small button">Button 1</a></li>
19
- <li><a href="#" class="small button">Button 2</a></li>
20
- <li><a href="#" class="small button">Button 3</a></li>
21
- </ul>
22
- <ul class="button-group radius">
23
- <li><a href="#" class="button secondary">Button 1</a></li>
24
- <li><a href="#" class="button secondary">Button 2</a></li>
25
- <li><a href="#" class="button secondary">Button 3</a></li>
26
- <li><a href="#" class="button secondary">Button 4</a></li>
27
- </ul>
28
- <ul class="button-group round even-3">
29
- <li><a href="#" class="button alert">Button 1</a></li>
30
- <li><a href="#" class="button alert">Button 2</a></li>
31
- <li><a href="#" class="button alert">Button 3</a></li>
32
- </ul>
33
- <ul class="button-group round even-3">
34
- <li><input type="submit" class="button success" value="Button 1"></li>
35
- <li><input type="submit" class="button success" value="Button 2"></li>
36
- <li><input type="submit" class="button success" value="Button 3"></li>
37
- </ul>
38
-
39
- <hr>
40
-
41
- <h3>Build With Predefined HTML Classes</h3>
42
- <p>There are two ways to build button groups in Modularis 4: with our predefined HTML classes or with our structure and mixins. Building button groups using our predefined classes is a breeze, you'll just wrap a <a href="buttons.html">button</a> inside an <code>&lt;ul&gt;</code>.</p>
43
-
44
- <p>The button styles will work the same as they do when building a single button, but they'll float next to each other to create a group. You also have access to the same radius classes as buttons, only they'll go on the unordered list instead of the button. You can even make sure the buttons take up even space within the container you put them in.</p>
45
-
46
- <ul class="disc">
47
- <li>The radius classes: <code>.radius</code> or <code>.round</code>.</li>
48
- <li>The even classes: <code>.even-2</code> through <code>.even-8</code> to control the even widths.</li>
49
- </ul>
50
-
51
- <%= code_example '
52
- <!-- A default button-group with small buttons inside -->
53
- <ul class="button-group">
54
- <li><a href="#" class="small button">Button 1</a></li>
55
- <li><a href="#" class="small button">Button 2</a></li>
56
- <li><a href="#" class="small button">Button 3</a></li>
57
- </ul>
58
-
59
- <!-- A round, even-3 button-group with default alert buttons inside. -->
60
- <!-- Do not put the radius classes on the buttons themselves. -->
61
- <ul class="button-group round even-3">
62
- <li><a href="#" class="button alert">Button 1</a></li>
63
- <li><a href="#" class="button alert">Button 2</a></li>
64
- <li><a href="#" class="button alert">Button 3</a></li>
65
- </ul>
66
- ', :html %>
67
-
68
- <h5>Button Bars</h5>
69
- <p>A button bar is a group of button groups (I N C E P T I O N), perfect for situations where you want groups of actions that are all related to a similar element or page. Simply wrap two or more button groups in a <code>.button-bar</code> and Modularis takes care of the rest.</p>
70
-
71
- <%= code_example '
72
- <div class="button-bar">
73
- <ul class="button-group">
74
- <li><a href="#" class="small button">Button 1</a></li>
75
- <li><a href="#" class="small button">Button 2</a></li>
76
- <li><a href="#" class="small button">Button 3</a></li>
77
- </ul>
78
- <ul class="button-group">
79
- <li><a href="#" class="small button">Button 1</a></li>
80
- <li><a href="#" class="small button">Button 2</a></li>
81
- <li><a href="#" class="small button">Button 3</a></li>
82
- </ul>
83
- </div>
84
- ', :html %>
85
- <div class="button-bar">
86
- <ul class="button-group">
87
- <li><a href="#" class="small button">Button 1</a></li>
88
- <li><a href="#" class="small button">Button 2</a></li>
89
- <li><a href="#" class="small button">Button 3</a></li>
90
- </ul>
91
- <ul class="button-group secondary">
92
- <li><a href="#" class="small button">Button 1</a></li>
93
- <li><a href="#" class="small button">Button 2</a></li>
94
- <li><a href="#" class="small button">Button 3</a></li>
95
- </ul>
96
- </div>
97
-
98
-
99
- <p>For any of these styles to take effect, make sure you have the <strong>default Modularis CSS package</strong> or that you've selected <strong>buttons and button-groups from a custom package</strong>. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
100
-
101
- <hr>
102
-
103
- <h3>Build with Mixins</h3>
104
- <p>We've included SCSS mixins used to style button groups. To use these mixins, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/_modularis-global.scss">_modularis-global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_global.scss">_global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_buttons.scss">_buttons.scss</a> and <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_button-groups.scss">_button-groups.scss</a> from Github and throw them into a Modularis folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
105
-
106
- <%= code_example '
107
- @import "modularis/modularis-global", "modularis/components/global", "modularis/components/buttons", "modularis/components/button-groups";
108
- ', :css %>
109
-
110
- <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
111
-
112
- <%= code_example '
113
- <ul class="your-class-name">
114
- <li><a href="#" class="your-button-class">Button 1</a></li>
115
- <li><a href="#" class="your-button-class">Button 2</a></li>
116
- <li><a href="#" class="your-button-class">Button 3</a></li>
117
- </ul>
118
- ', :html %>
119
-
120
- <h5>Container Mixin</h5>
121
- <p>Since button groups need to be within a list to work properly, you'll need to create some styles for the list container that you use.</p>
122
-
123
- <%= code_example '
124
- .your-class-name { @include button-group-container; }
125
- ', :css %>
126
-
127
- <p>You'll also need to make sure to include some styles for your buttons inside the group. Either use a class you've already styled, or apply it specifically here.</p>
128
-
129
- <%= code_example '
130
- .your-class-name { @include button-group-container;
131
- .your-button-class { @include button; }
132
- }
133
- ', :css %>
134
-
135
- <ul class="button-group-docs">
136
- <li><a href="#" class="button-class">Button 1</a></li>
137
- <li><a href="#" class="button-class">Button 2</a></li>
138
- <li><a href="#" class="button-class">Button 3</a></li>
139
- </ul>
140
-
141
- <h5>Style Mixin</h5>
142
- <p>With this mixin, you'll be able to make the rest of the button-group, including: radius, even with styles and floats. You'll apply this mixin to the <code>&lt;li&gt;</code> elements of the button group list.</p>
143
-
144
- <%= code_example '
145
- .your-class-name { @include button-group-container;
146
- .your-button-class { @include button; }
147
-
148
- & > li { @include button-group-style($radius, $even, $float); }
149
- }
150
-
151
- /* This controls the radius of the left and right edges. */
152
- /* Set to true or px value */
153
- $radius: false
154
-
155
- /* This makes the buttons take up even space in their container */
156
- /* Set to the number of buttons in the group */
157
- $even: false
158
-
159
- /* Controls how the buttons in the group floatm set to left or right */
160
- $float: left
161
- ', :css %>
162
-
163
- <ul class="button-group-docs list">
164
- <li><a href="#" class="button-class">Button 1</a></li>
165
- <li><a href="#" class="button-class">Button 2</a></li>
166
- <li><a href="#" class="button-class">Button 3</a></li>
167
- </ul>
168
-
169
- <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
170
- <p>Sometimes you want to add a nice fancy shine to the edge of your buttons. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the buttons a fade effect.</p>
171
-
172
- <%= code_example '
173
- .your-class-name { @include button-group-container;
174
- .your-button-class {
175
- @include button;
176
- @include inset-shadow;
177
- @include single-transition;
178
- }
179
-
180
- & > li { @include button-group-style(true); }
181
- }
182
- ', :css %>
183
-
184
- <ul class="button-group-docs list extras">
185
- <li><a href="#" class="button-class">Button 1</a></li>
186
- <li><a href="#" class="button-class">Button 2</a></li>
187
- <li><a href="#" class="button-class">Button 3</a></li>
188
- </ul>
189
-
190
- <h5>Building Button Bars</h5>
191
- <p>You can also build button bars with mixin options.</p>
192
- <%= code_example '
193
- <div class="your-bar-class-name">
194
- <ul class="your-class-name">
195
- <li><a href="#" class="your-button-class">Button 1</a></li>
196
- <li><a href="#" class="your-button-class">Button 2</a></li>
197
- <li><a href="#" class="your-button-class">Button 3</a></li>
198
- </ul>
199
- <ul class="your-class-name">
200
- <li><a href="#" class="your-button-class">Button 1</a></li>
201
- <li><a href="#" class="your-button-class">Button 2</a></li>
202
- <li><a href="#" class="your-button-class">Button 3</a></li>
203
- </ul>
204
- </div>
205
- ', :html %>
206
-
207
- <%= code_example '
208
- .your-bar-class-name { @include clearfix;
209
- .your-button-class { @include button-group-container(false,true); }
210
- }
211
- ', :css %>
212
-
213
- <h5>Default SCSS Variables</h5>
214
- <%= code_example '
215
- /* We use this to set the margin below button groups. */
216
- $button-bar-margin-right: emCalc(10px);
217
- ', :css %>
218
-
219
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
220
-
221
- </div>
222
- </div>
223
-
224
- </div>
225
-
226
- <div class="large-3 pull-9 columns">
227
- <%= render "_sidebar-components.html.erb" %>
228
- </div>
229
- </div>
230
-
@@ -1,222 +0,0 @@
1
- <% @side_nav = "buttons" %>
2
-
3
- <div class="row">
4
- <div class="large-9 push-3 columns">
5
-
6
- <% @page_title = "Buttons" %>
7
- <div class="row">
8
- <div class="large-12 columns">
9
- <h2><%= @page_title %></h2>
10
- <h4 class="subheader">Buttons are a convenient tool when it comes to more traditional actions. To that end, Modularis has a lot of easy to use button styles that you can customize or override to fit your needs.</h4>
11
- </div>
12
- </div>
13
-
14
- <div class="row">
15
- <div class="large-12 columns">
16
-
17
- <div class="row">
18
- <div class="small-6 large-6 columns">
19
- <a href="#" class="tiny button">.tiny.button</a><br>
20
- <a href="#" class="small button">.small.button</a><br>
21
- <a href="#" class="button">.button</a><br>
22
- </div>
23
- <div class="small-6 large-6 columns">
24
- <a href="#" class="tiny button secondary">.tiny.secondary</a><br>
25
- <a href="#" class="small button success radius">.small.success.radius</a><br>
26
- <a href="#" class="button alert round disabled">.round.disabled</a><br>
27
- </div>
28
- </div>
29
- <a href="#" class="large button expand">.large.button.expand</a>
30
-
31
- <hr>
32
-
33
- <h3>Build With Predefined HTML Classes</h3>
34
- <p>There are two ways to build buttons in Modularis 4: with our predefined HTML classes or with our structure and mixins. Building buttons using our predefined classes is simple, you'll need an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code> or <code>&lt;input&gt;</code> with a class of <code>.button</code>. This will create a default medium button. You can also use size, color and radius classes to control more of the style.</p>
35
-
36
- <p>The class options:</p>
37
- <ul class="disc">
38
- <li>The size classes include: <code>.tiny, .small, .medium</code> or <code>.large</code></li>
39
- <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
40
- <li>The radius classes include: <code>.radius</code> or <code>.round</code></li>
41
- <li>You can also add <code>.disabled</code> to any button and it will look and act disabled</li>
42
- </ul>
43
-
44
- <%= code_example '
45
- <!-- Size Classes -->
46
- <a href="#" class="button">Default Button</a>
47
- <a href="#" class="tiny button">Tiny Button</a>
48
- <a href="#" class="small button">Small Button</a>
49
- <a href="#" class="large button">Large Button</a>
50
-
51
- <!-- Color Classes -->
52
- <a href="#" class="button secondary">Secondary Button</a>
53
- <a href="#" class="button success">Success Button</a>
54
- <a href="#" class="button alert">Alert Button</a>
55
-
56
- <!-- Radius Classes -->
57
- <a href="#" class="button radius">Radius Button</a>
58
- <a href="#" class="button round">Round Button</a>
59
-
60
- <!-- Disabled Class -->
61
- <a href="#" class="button disabled">Disabled Button</a>
62
- ', :html %>
63
-
64
- <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Modularis CSS package</strong> or that you've selected <strong>button from a custom package</strong>. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
65
-
66
- <hr>
67
-
68
- <h3>Build with Mixins</h3>
69
- <p>We've included SCSS mixins used to style buttons. To use these mixins, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/_modularis-global.scss">_modularis-global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_global.scss">_global.scss</a> and <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_buttons.scss">_buttons.scss</a> from Github and throw them into a Modularis folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
70
-
71
- <%= code_example '
72
- @import "modularis/modularis-global", "modularis/components/global", "modularis/components/buttons";
73
- ', :css %>
74
-
75
- <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
76
-
77
- <%= code_example '
78
- <a href="#" class="your-class-name">Button Text</a>
79
- ', :html %>
80
-
81
- <h5>Quick Mixin</h5>
82
- <p>You can quickly build an entire button using our global mixin by including it on your custom class or ID in your stylesheet. The global mixin will create the necessary style for the button. The global mixin looks like this:</p>
83
-
84
- <%= code_example '
85
- /* Using the default styles */
86
- .your-class-name { @include button; }
87
- ', :css %>
88
-
89
- <a href="#" class="button">Default Button</a>
90
-
91
- <p>There are also <strong>six options</strong> you can customize on the fly when writing this mixin. These controls things like: background color, border color, text color, size and state. Setting any of these options to <strong>false</strong> will negate those styles.</p>
92
-
93
- <%= code_example '
94
- /* Using the available options */
95
- .your-class-name {
96
- @include button($padding, $bg, $radius, $full-width, $disabled, $is-input);
97
- }
98
-
99
- /* This controls padding around the buttons. Use a variable or em value */
100
- $padding: $button-med
101
-
102
- /* This controls button color. Set to one of our variables or a custom hex value */
103
- $bg: $primary-color
104
-
105
- /* This controls button radius. Set to a variable, true/false, or custom px value */
106
- $radius: false
107
-
108
- /* This whether button is full-width. Set to true or false */
109
- $full-width: false
110
-
111
- /* This controls whether disabled styles are used. Set to true or false */
112
- $disabled: false
113
-
114
- /* This controls padding for inputs, they are a little different */
115
- $is-input: false
116
- ', :css %>
117
-
118
- <a href="#" class="custom buttony">Custom Button</a>
119
-
120
- <h5>Base Mixin</h5>
121
- <p>You also have access to a few internal mixins that can create parts of the button as needed. The base mixin will create a button base that only include structural styles.</p>
122
-
123
- <%= code_example '
124
- .your-class-name { @include button-base; }
125
- ', :css %>
126
-
127
- <a href="#" class="button-base">Button Base</a>
128
-
129
- <h5>Size Mixin</h5>
130
- <p>The size mixin will let you control the padding, which adjusts text size. You can also choose whether the button is full-width or an input button.</p>
131
-
132
- <%= code_example '
133
- .your-class-name {
134
- @include button-base;
135
- @include button-size($padding, $full-width, $is-input);
136
- }
137
- ', :css %>
138
-
139
- <a href="#" class="button-base size">Button Base &amp; Size</a>
140
-
141
- <h5>Style Mixin</h5>
142
- <p>The last internal mixin you have access to for buttons is the style mixin. This will help you style background color, text, border and radius.</p>
143
-
144
- <%= code_example '
145
- .your-class-name {
146
- @include button-base;
147
- @include button-size;
148
- @include button-style($bg, $radius, $disabled);
149
- }
150
- ', :css %>
151
-
152
- <a href="#" class="button-base size style">Button Base, Size &amp; Style</a>
153
-
154
- <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
155
- <p>Sometimes you want to add a nice fancy shine to the edge of your button. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the button a nice zero-fade.</p>
156
-
157
- <%= code_example '
158
- .your-class-name {
159
- @include button-base;
160
- @include button-size;
161
- @include button-style;
162
- @include radius;
163
- @include single-transition;
164
- @include inset-shadow($active);
165
- }
166
-
167
- /* This controls whether or not you get the depressed look on tap/click. */
168
- /* Set to true or false, defaults to true. */
169
- $active: true
170
- ', :css %>
171
-
172
- <a href="#" class="button-base size style radius shine">Button Base, Size, Style &amp; Shine</a>
173
-
174
- <h5>Default SCSS Variables</h5>
175
- <%= code_example '
176
- /* We use these to build padding for buttons. */
177
- $button-med: emCalc(12px);
178
- $button-tny: emCalc(7px);
179
- $button-sml: emCalc(9px);
180
- $button-lrg: emCalc(16px);
181
-
182
- /* We use this to control the display property. */
183
- $button-display: inline-block;
184
- $button-margin-bottom: emCalc(20px);
185
-
186
- /* We use these to control button text styles. */
187
- $button-font-color: #fff;
188
- $button-font-color-alt: #333;
189
- $button-font-med: emCalc(16px);
190
- $button-font-tny: emCalc(11px);
191
- $button-font-sml: emCalc(13px);
192
- $button-font-lrg: emCalc(20px);
193
- $button-font-weight: bold;
194
- $button-font-align: center;
195
-
196
- /* We use these to control various hover effects. */
197
- $button-function-factor: 10%;
198
-
199
- /* We use these to control button border styles. */
200
- $button-border-width: 1px;
201
- $button-border-style: solid;
202
- $button-border-color: darken($primary-color, $button-function-factor);
203
-
204
- /* We use this to set the default radius used throughout the core. */
205
- $button-radius: $global-radius;
206
-
207
- /* We use this to set default opacity for disabled buttons. */
208
- $button-disabled-opacity: 0.6;
209
- ', :css %>
210
-
211
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_modularis-global.scss</strong>.</p>
212
-
213
- </div>
214
- </div>
215
-
216
- </div>
217
-
218
- <div class="large-3 pull-9 columns">
219
- <%= render "_sidebar-components.html.erb" %>
220
- </div>
221
-
222
- </div>