underoos 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/.rvmrc +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +143 -0
- data/LICENSE +26 -0
- data/Procfile +1 -0
- data/README.md +13 -0
- data/Rakefile +12 -0
- data/app/assets/javascripts/styleguide.js +132 -0
- data/app/assets/javascripts/underoos.js +18 -0
- data/app/assets/stylesheets/base/_button-btn-mixin.sass +72 -0
- data/app/assets/stylesheets/base/_elements.sass +61 -0
- data/app/assets/stylesheets/base/_forms.sass +362 -0
- data/app/assets/stylesheets/base/_helpers.sass +54 -0
- data/app/assets/stylesheets/base/_normalize.sass +114 -0
- data/app/assets/stylesheets/base/_scaffold.sass +51 -0
- data/app/assets/stylesheets/base/_tables.sass +99 -0
- data/app/assets/stylesheets/base/_transitions.sass +17 -0
- data/app/assets/stylesheets/base/_typography.sass +185 -0
- data/app/assets/stylesheets/components/_accordions.sass +17 -0
- data/app/assets/stylesheets/components/_breadcrumbs.sass +22 -0
- data/app/assets/stylesheets/components/_button-groups.sass +46 -0
- data/app/assets/stylesheets/components/_carets.sass +24 -0
- data/app/assets/stylesheets/components/_carousels.sass +18 -0
- data/app/assets/stylesheets/components/_close.sass +25 -0
- data/app/assets/stylesheets/components/_decals.sass +27 -0
- data/app/assets/stylesheets/components/_dropdowns.sass +85 -0
- data/app/assets/stylesheets/components/_media.sass +33 -0
- data/app/assets/stylesheets/components/_modals.sass +28 -0
- data/app/assets/stylesheets/components/_nav-lists.sass +22 -0
- data/app/assets/stylesheets/components/_navbars.sass +105 -0
- data/app/assets/stylesheets/components/_notifications.sass +108 -0
- data/app/assets/stylesheets/components/_paddles.sass +34 -0
- data/app/assets/stylesheets/components/_pagination.sass +41 -0
- data/app/assets/stylesheets/components/_pills.sass +64 -0
- data/app/assets/stylesheets/components/_popovers.sass +55 -0
- data/app/assets/stylesheets/components/_progress-bars.sass +29 -0
- data/app/assets/stylesheets/components/_tabs.sass +93 -0
- data/app/assets/stylesheets/components/_tooltips.sass +46 -0
- data/app/assets/stylesheets/components/_wells.sass +16 -0
- data/app/assets/stylesheets/layouts/_containers.sass +15 -0
- data/app/assets/stylesheets/layouts/_print.sass +48 -0
- data/app/assets/stylesheets/layouts/_queries.sass +121 -0
- data/app/assets/stylesheets/layouts/_upgrades.sass +64 -0
- data/app/assets/stylesheets/mixins/_arrows.sass +40 -0
- data/app/assets/stylesheets/mixins/_clearfixins.sass +15 -0
- data/app/assets/stylesheets/mixins/_coloring.sass +6 -0
- data/app/assets/stylesheets/mixins/_columns.sass +19 -0
- data/app/assets/stylesheets/mixins/_conversions.sass +25 -0
- data/app/assets/stylesheets/mixins/_font-size.sass +6 -0
- data/app/assets/stylesheets/mixins/_image-tools.sass +13 -0
- data/app/assets/stylesheets/mixins/_ir.sass +9 -0
- data/app/assets/stylesheets/mixins/_mixins.sass +14 -0
- data/app/assets/stylesheets/mixins/_tab-focus.sass +7 -0
- data/app/assets/stylesheets/mixins/_timing-equations.sass +29 -0
- data/app/assets/stylesheets/mixins/_visibility.sass +43 -0
- data/app/assets/stylesheets/polyfills/_box-shadow.sass +7 -0
- data/app/assets/stylesheets/polyfills/_box-sizing.sass +8 -0
- data/app/assets/stylesheets/polyfills/_functions.sass +22 -0
- data/app/assets/stylesheets/polyfills/_inline-block.sass +8 -0
- data/app/assets/stylesheets/polyfills/_opacity.sass +6 -0
- data/app/assets/stylesheets/polyfills/_polyfills.sass +10 -0
- data/app/assets/stylesheets/polyfills/_transition.sass +9 -0
- data/app/assets/stylesheets/polyfills/_user-select.sass +8 -0
- data/app/assets/stylesheets/styleguide.sass +199 -0
- data/app/assets/stylesheets/themes/_default.sass +119 -0
- data/app/assets/stylesheets/underoos.sass +52 -0
- data/app/controllers/underoos/styleguides_controller.rb +79 -0
- data/app/views/shared/_upgrades.html.haml +12 -0
- data/app/views/underoos/styleguides/_assets.haml +42 -0
- data/app/views/underoos/styleguides/_components.haml +42 -0
- data/app/views/underoos/styleguides/_elements.haml +242 -0
- data/app/views/underoos/styleguides/_forms.haml +305 -0
- data/app/views/underoos/styleguides/_layouts.haml +76 -0
- data/app/views/underoos/styleguides/_palettes.haml +18 -0
- data/app/views/underoos/styleguides/_resources.haml +27 -0
- data/app/views/underoos/styleguides/_tables.haml +124 -0
- data/app/views/underoos/styleguides/_typography.haml +284 -0
- data/app/views/underoos/styleguides/_utilities.haml +270 -0
- data/app/views/underoos/styleguides/components/_accordions.haml +83 -0
- data/app/views/underoos/styleguides/components/_breadcrumbs.haml +42 -0
- data/app/views/underoos/styleguides/components/_button-groups.haml +162 -0
- data/app/views/underoos/styleguides/components/_carets.haml +28 -0
- data/app/views/underoos/styleguides/components/_close.haml +20 -0
- data/app/views/underoos/styleguides/components/_decals.haml +40 -0
- data/app/views/underoos/styleguides/components/_dropdowns.haml +189 -0
- data/app/views/underoos/styleguides/components/_media.haml +78 -0
- data/app/views/underoos/styleguides/components/_modals.haml +42 -0
- data/app/views/underoos/styleguides/components/_nav-lists.haml +52 -0
- data/app/views/underoos/styleguides/components/_navbars.haml +144 -0
- data/app/views/underoos/styleguides/components/_navs-showcase.haml +27 -0
- data/app/views/underoos/styleguides/components/_notifications.haml +169 -0
- data/app/views/underoos/styleguides/components/_paddles.haml +68 -0
- data/app/views/underoos/styleguides/components/_pagination.haml +64 -0
- data/app/views/underoos/styleguides/components/_popovers.haml +33 -0
- data/app/views/underoos/styleguides/components/_progress-bars.haml +72 -0
- data/app/views/underoos/styleguides/components/_tabs-pills.haml +241 -0
- data/app/views/underoos/styleguides/components/_tooltips.haml +37 -0
- data/app/views/underoos/styleguides/components/_wells.haml +29 -0
- data/app/views/underoos/styleguides/index.html.haml +259 -0
- data/app/views/underoos/styleguides/partials/_form-template.haml +171 -0
- data/app/views/underoos/styleguides/partials/_table-data.haml +33 -0
- data/app/views/underoos/styleguides/partials/_transitions.haml +136 -0
- data/config.ru +38 -0
- data/config/routes.rb +3 -0
- data/features/generator.feature +78 -0
- data/features/step_definitions/underoos_steps.rb +3 -0
- data/features/support/env.rb +9 -0
- data/lib/generators/underoos/assets_generator.rb +33 -0
- data/lib/underoos.rb +5 -0
- data/lib/underoos/engine.rb +8 -0
- data/lib/underoos/version.rb +3 -0
- data/public/apple-touch-icon-114x114-precomposed.png +0 -0
- data/public/apple-touch-icon-57x57-precomposed.png +0 -0
- data/public/apple-touch-icon-72x72-precomposed.png +0 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/script/javascripts +15 -0
- data/underoos.gemspec +29 -0
- data/vendor/assets/javascripts/bootstrap-alert.js +94 -0
- data/vendor/assets/javascripts/bootstrap-button.js +100 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +138 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
- data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
- data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
- data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
- data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
- data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
- data/vendor/assets/javascripts/prettify.js +28 -0
- metadata +246 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.well
|
3
|
+
+box-sizing(border-box)
|
4
|
+
border: 1px solid $component_border
|
5
|
+
border-radius: $radii
|
6
|
+
background-color: transparent
|
7
|
+
margin-bottom: 1.25em
|
8
|
+
padding: 1.25em
|
9
|
+
&.lite
|
10
|
+
background-color: $off_white
|
11
|
+
&.dark
|
12
|
+
background-color: $off_grey
|
13
|
+
&.primary
|
14
|
+
background-color: $primary
|
15
|
+
border-color: darken($primary, 30%)
|
16
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
.container
|
3
|
+
+box-sizing(border-box)
|
4
|
+
+clearfixer
|
5
|
+
max-width: $base_width * 1px
|
6
|
+
margin-left: auto
|
7
|
+
margin-right: auto
|
8
|
+
&.outer
|
9
|
+
padding-left: 1%
|
10
|
+
padding-right: 1%
|
11
|
+
&.fluid, &.fixed
|
12
|
+
max-width: none
|
13
|
+
&.fixed
|
14
|
+
width: $base_width * 1px
|
15
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
// A very basic print stylesheet based off http://html5boilerplate.com/
|
3
|
+
@media print
|
4
|
+
*
|
5
|
+
background: transparent !important
|
6
|
+
box-shadow: none !important
|
7
|
+
color: black !important
|
8
|
+
text-shadow: none !important
|
9
|
+
filter: none !important
|
10
|
+
-ms-filter: none !important
|
11
|
+
|
12
|
+
a, a:visited
|
13
|
+
text-decoration: underline
|
14
|
+
|
15
|
+
a[href]:after
|
16
|
+
content: " (" attr(href) ")"
|
17
|
+
|
18
|
+
abbr[title]:after
|
19
|
+
content: " (" attr(title) ")"
|
20
|
+
|
21
|
+
.ir a:after,
|
22
|
+
a[href^="javascript:"]:after,
|
23
|
+
a[href^="#"]:after
|
24
|
+
content: ""
|
25
|
+
|
26
|
+
pre, blockquote
|
27
|
+
border: 1px solid #999
|
28
|
+
page-break-inside: avoid
|
29
|
+
|
30
|
+
thead
|
31
|
+
display: table-header-group
|
32
|
+
|
33
|
+
tr, img
|
34
|
+
page-break-inside: avoid
|
35
|
+
|
36
|
+
img
|
37
|
+
max-width: 100% !important
|
38
|
+
|
39
|
+
@page
|
40
|
+
margin: 0.5cm
|
41
|
+
|
42
|
+
p, h2, h3
|
43
|
+
orphans: 3
|
44
|
+
widows: 3
|
45
|
+
|
46
|
+
h2, h3
|
47
|
+
page-break-after: avoid
|
48
|
+
|
@@ -0,0 +1,121 @@
|
|
1
|
+
|
2
|
+
// Mixin the container sizes
|
3
|
+
@mixin resize_containers($base_value)
|
4
|
+
.container
|
5
|
+
max-width: $base_value * 1px
|
6
|
+
&.fluid, &.fixed
|
7
|
+
max-width: none
|
8
|
+
&.fixed
|
9
|
+
width: $base_value * 1px
|
10
|
+
|
11
|
+
// Large screens
|
12
|
+
@media (min-width: 1200px)
|
13
|
+
+resize_containers(1200)
|
14
|
+
|
15
|
+
// Default desktop and tablet portrait
|
16
|
+
@media (min-width: 890px)
|
17
|
+
.nav-collapse.collapse
|
18
|
+
height: auto !important
|
19
|
+
overflow: visible !important
|
20
|
+
|
21
|
+
// This is the point where your navigation needs to collapse
|
22
|
+
@media (max-width: 889px)
|
23
|
+
.navbar.fixed
|
24
|
+
position: static
|
25
|
+
.navbar .nav-collapse
|
26
|
+
clear: left
|
27
|
+
.navbar .nav,
|
28
|
+
.navbar .nav > li
|
29
|
+
float: none
|
30
|
+
|
31
|
+
.navbar .dropdown-menu
|
32
|
+
+box-shadow(none)
|
33
|
+
background-color: transparent
|
34
|
+
border: none
|
35
|
+
border-radius: 0
|
36
|
+
position: static
|
37
|
+
top: auto
|
38
|
+
left: auto
|
39
|
+
display: block
|
40
|
+
float: none
|
41
|
+
margin: 0 0.5em
|
42
|
+
padding: 0
|
43
|
+
clip: auto
|
44
|
+
height: auto
|
45
|
+
width: auto
|
46
|
+
max-width: none
|
47
|
+
overflow: visible
|
48
|
+
|
49
|
+
.navbar .dropdown .dropdown-toggle,
|
50
|
+
.navbar .dropdown .dropdown-toggle:hover,
|
51
|
+
.navbar .dropdown .dropdown-toggle:active,
|
52
|
+
.navbar .nav .open > .dropdown-toggle,
|
53
|
+
.navbar .nav .active > .dropdown-toggle,
|
54
|
+
.navbar .nav .open.active > .dropdown-toggle
|
55
|
+
+box-shadow(none)
|
56
|
+
background-color: transparent
|
57
|
+
color: $component_normal
|
58
|
+
padding-bottom: 0.25em
|
59
|
+
text-shadow: none
|
60
|
+
cursor: default
|
61
|
+
|
62
|
+
.navbar .dropdown .caret
|
63
|
+
display: none
|
64
|
+
|
65
|
+
.btn-navbar
|
66
|
+
display: block
|
67
|
+
|
68
|
+
.nav-collapse
|
69
|
+
height: 0
|
70
|
+
overflow: hidden
|
71
|
+
|
72
|
+
.navbar .dropdown-menu .divider
|
73
|
+
display: none
|
74
|
+
|
75
|
+
.navbar form,
|
76
|
+
.navbar .pull-right
|
77
|
+
float: none
|
78
|
+
|
79
|
+
// Portrait tablet and below
|
80
|
+
@media (max-width: 768px)
|
81
|
+
+resize_containers(768)
|
82
|
+
|
83
|
+
// Landscape mobile and below
|
84
|
+
@media (max-width: 480px)
|
85
|
+
+resize_containers(480)
|
86
|
+
|
87
|
+
input[type="checkbox"],
|
88
|
+
input[type="radio"]
|
89
|
+
border: 1px solid #ccc
|
90
|
+
|
91
|
+
.form-horizontal,
|
92
|
+
.default-manage-form
|
93
|
+
li > label
|
94
|
+
float: none
|
95
|
+
padding-top: 0
|
96
|
+
text-align: left
|
97
|
+
width: auto
|
98
|
+
|
99
|
+
.boolean > label,
|
100
|
+
.choice > label,
|
101
|
+
.hint
|
102
|
+
padding-left: 0
|
103
|
+
|
104
|
+
.form-actions,
|
105
|
+
form .buttons
|
106
|
+
padding-left: 0.75em
|
107
|
+
padding-right: 0.75em
|
108
|
+
|
109
|
+
.modal
|
110
|
+
position: absolute
|
111
|
+
margin: 0
|
112
|
+
top: 10px
|
113
|
+
left: 10px
|
114
|
+
right: 10px
|
115
|
+
width: auto
|
116
|
+
|
117
|
+
|
118
|
+
// Portrait mobile
|
119
|
+
@media (max-width: 320px)
|
120
|
+
+resize_containers(320)
|
121
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
// The main container for the upgrade notification
|
3
|
+
#upgrade_notifications
|
4
|
+
display: none
|
5
|
+
color: $white
|
6
|
+
font-weight: bold
|
7
|
+
position: absolute
|
8
|
+
top: 10px
|
9
|
+
left: 10px
|
10
|
+
z-index: 99999
|
11
|
+
|
12
|
+
// Settings for the icon
|
13
|
+
#upgrade_notifications .upgrade-icon
|
14
|
+
background-color: $danger
|
15
|
+
border: 1px solid darken($danger, 10%)
|
16
|
+
cursor: pointer
|
17
|
+
font-size: 1em
|
18
|
+
line-height: 1
|
19
|
+
text-align: center
|
20
|
+
width: 1.2em
|
21
|
+
height: 1.2em
|
22
|
+
|
23
|
+
// Settings for block message
|
24
|
+
#upgrade_notifications .upgrade-notification
|
25
|
+
background-color: $danger
|
26
|
+
border: 1px solid darken($danger, 10%)
|
27
|
+
cursor: default
|
28
|
+
font-size: 0.85em
|
29
|
+
text-align: left
|
30
|
+
display: none
|
31
|
+
margin-top: 0.2em
|
32
|
+
padding: 0.75em
|
33
|
+
position: relative
|
34
|
+
top: 0
|
35
|
+
left: 0
|
36
|
+
width: 200px
|
37
|
+
|
38
|
+
// Make the links readable
|
39
|
+
#upgrade_notifications .upgrade-notification a
|
40
|
+
color: $white
|
41
|
+
text-decoration: underline
|
42
|
+
|
43
|
+
// Show the message on hover
|
44
|
+
#upgrade_notifications .upgrade-icon:hover .upgrade-notification
|
45
|
+
display: block
|
46
|
+
|
47
|
+
// Default all message containers to be hidden
|
48
|
+
#upgrade_notifications .upgrade-container
|
49
|
+
display: none
|
50
|
+
|
51
|
+
// Space out multiple containers
|
52
|
+
#upgrade_notifications .upgrade-container + .upgrade-container
|
53
|
+
margin-top: 1em
|
54
|
+
|
55
|
+
// Show the upgrade notifications if a condition is met
|
56
|
+
html.no-js #upgrade_notifications,
|
57
|
+
html.lt-ie8 #upgrade_notifications
|
58
|
+
display: block
|
59
|
+
|
60
|
+
// Show the correct notification container
|
61
|
+
html.no-js #upgrade_notifications #no_js,
|
62
|
+
html.lt-ie8 #upgrade_notifications #lt_ie8
|
63
|
+
display: block
|
64
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
// Mixins for creating arrows on pseudo elements
|
3
|
+
|
4
|
+
@mixin _arrow
|
5
|
+
position: absolute
|
6
|
+
width: 0
|
7
|
+
height: 0
|
8
|
+
|
9
|
+
// Set `top` and `left` positions from the caller
|
10
|
+
@mixin arrow_north($color:#000, $size:5px)
|
11
|
+
+_arrow
|
12
|
+
border-left: $size solid transparent
|
13
|
+
border-right: $size solid transparent
|
14
|
+
border-bottom: $size solid $color
|
15
|
+
margin-left: -$size
|
16
|
+
|
17
|
+
// Set `bottom` and `left` positions from the caller
|
18
|
+
@mixin arrow_south($color:#000, $size:5px)
|
19
|
+
+_arrow
|
20
|
+
border-left: $size solid transparent
|
21
|
+
border-right: $size solid transparent
|
22
|
+
border-top: $size solid $color
|
23
|
+
margin-left: -$size
|
24
|
+
|
25
|
+
// Set `top` and `right` positions from the caller
|
26
|
+
@mixin arrow_east($color:#000, $size:5px)
|
27
|
+
+_arrow
|
28
|
+
border-top: $size solid transparent
|
29
|
+
border-bottom: $size solid transparent
|
30
|
+
border-left: $size solid $color
|
31
|
+
margin-top: -$size
|
32
|
+
|
33
|
+
// Set `top` and `left` positions from the caller
|
34
|
+
@mixin arrow_west($color:#000, $size:5px)
|
35
|
+
+_arrow
|
36
|
+
border-top: $size solid transparent
|
37
|
+
border-bottom: $size solid transparent
|
38
|
+
border-right: $size solid $color
|
39
|
+
margin-top: -$size
|
40
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
// The [micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/)
|
3
|
+
@mixin clearfixer
|
4
|
+
*zoom: 1
|
5
|
+
&:before, &:after
|
6
|
+
content: ""
|
7
|
+
display: table
|
8
|
+
&:after
|
9
|
+
clear: both
|
10
|
+
|
11
|
+
// The standard `clearfix` found in Compass
|
12
|
+
@mixin clearfix
|
13
|
+
overflow: hidden
|
14
|
+
*zoom: 1
|
15
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
// The base `column` settings, should be extended by all columns
|
3
|
+
@mixin base-column
|
4
|
+
+box-sizing(border-box)
|
5
|
+
display: block
|
6
|
+
float: left
|
7
|
+
|
8
|
+
// An alternate base `column` which floats elements to the right
|
9
|
+
@mixin base-column-right
|
10
|
+
+box-sizing(border-box)
|
11
|
+
display: block
|
12
|
+
float: right
|
13
|
+
|
14
|
+
// The base `row` settings, should be extended by all rows
|
15
|
+
@mixin base-row
|
16
|
+
+box-sizing(border-box)
|
17
|
+
+clearfixer
|
18
|
+
display: block
|
19
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
// Converts target `px` value to `em` in context constraints of the base font size
|
3
|
+
@function to_em($target_px, $context:$base_font_size)
|
4
|
+
@return ($target_px / $context) * 1em
|
5
|
+
|
6
|
+
// Converts target `px` value to `rem` in context constraints of the user's base font size
|
7
|
+
@function to_rem($target_px, $context:$context_px)
|
8
|
+
@return ($target_px / $context) * 1rem
|
9
|
+
|
10
|
+
// Converts target `px` value to `percentage` in context constraints of the container's width
|
11
|
+
@function to_percent($target_px, $context:$base_width)
|
12
|
+
@return percentage($target_px / $context)
|
13
|
+
|
14
|
+
// Returns the vertical rhythm in pixels calculated from the `$base_vertical` setting
|
15
|
+
@function vertical_pixel($target_px)
|
16
|
+
@return ($base_vertical / $target_px) * 1px
|
17
|
+
|
18
|
+
// Returns the vertical rhythm in em calculated from the `$base_vertical` setting
|
19
|
+
@function vertical_em($target_px)
|
20
|
+
@return to_em(($base_vertical / $target_px), $base_font_size)
|
21
|
+
|
22
|
+
// Returns the vertical rhythm in percent calculated from the `$base_vertical` setting
|
23
|
+
@function vertical_percent($target_px)
|
24
|
+
@return to_percent(($base_vertical / $target_px), $base_font_size)
|
25
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
// Image interpolation from http://stitchcss.com/
|
3
|
+
@mixin sharpen-image
|
4
|
+
image-rendering: -moz-crisp-edges
|
5
|
+
-ms-interpolation-mode: nearest-neighbor
|
6
|
+
|
7
|
+
@mixin high-quality-image
|
8
|
+
image-rendering: optimizeQuality
|
9
|
+
-ms-interpolation-mode: bicubic
|
10
|
+
|
11
|
+
@mixin low-quality-image
|
12
|
+
image-rendering: optimizeSpeed
|
13
|
+
|