underoos 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +5 -0
- data/Gemfile.lock +21 -7
- data/README.md +85 -10
- data/Rakefile +36 -1
- data/app/assets/javascripts/docs.js +6 -0
- data/app/assets/javascripts/styleguide.coffee +162 -0
- data/app/assets/javascripts/underoos.js +0 -1
- data/app/assets/stylesheets/base/_base.sass +14 -0
- data/app/assets/stylesheets/base/_buttons.sass +68 -0
- data/app/assets/stylesheets/base/_forms.sass +313 -24
- data/app/assets/stylesheets/base/_helpers.sass +27 -13
- data/app/assets/stylesheets/base/_normalize.sass +17 -9
- data/app/assets/stylesheets/base/_scaffold.sass +85 -0
- data/app/assets/stylesheets/base/_tables.sass +77 -0
- data/app/assets/stylesheets/base/_transitions.sass +10 -2
- data/app/assets/stylesheets/base/_typography.sass +183 -21
- data/app/assets/stylesheets/components/_accordions.sass +38 -0
- data/app/assets/stylesheets/components/_breadcrumbs.sass +19 -5
- data/app/assets/stylesheets/components/_button-groups.sass +43 -0
- data/app/assets/stylesheets/components/_carets.sass +13 -2
- data/app/assets/stylesheets/components/_carousels.sass +32 -0
- data/app/assets/stylesheets/components/_close.sass +15 -2
- data/app/assets/stylesheets/components/_components.sass +28 -0
- data/app/assets/stylesheets/components/_decals.sass +14 -0
- data/app/assets/stylesheets/components/_dropdowns.sass +88 -4
- data/app/assets/stylesheets/components/_media.sass +36 -0
- data/app/assets/stylesheets/components/_modals.sass +29 -0
- data/app/assets/stylesheets/components/_nav-lists.sass +20 -0
- data/app/assets/stylesheets/components/_navbars.sass +64 -3
- data/app/assets/stylesheets/components/_notifications.sass +112 -16
- data/app/assets/stylesheets/components/_paddles.sass +26 -0
- data/app/assets/stylesheets/components/_pagination.sass +23 -3
- data/app/assets/stylesheets/components/_pills.sass +80 -0
- data/app/assets/stylesheets/components/_popovers.sass +28 -0
- data/app/assets/stylesheets/components/_progress-bars.sass +33 -1
- data/app/assets/stylesheets/components/_tabs.sass +79 -0
- data/app/assets/stylesheets/components/_tooltips.sass +26 -0
- data/app/assets/stylesheets/components/_wells.sass +9 -0
- data/app/assets/stylesheets/layouts/_containers.sass +12 -0
- data/app/assets/stylesheets/layouts/_layouts.sass +5 -0
- data/app/assets/stylesheets/layouts/_print.sass +5 -1
- data/app/assets/stylesheets/layouts/_queries.sass +18 -15
- data/app/assets/stylesheets/layouts/_upgrades.sass +51 -40
- data/app/assets/stylesheets/mixins/_arrows.sass +13 -1
- data/app/assets/stylesheets/mixins/_clearfixins.sass +18 -4
- data/app/assets/stylesheets/mixins/_coloring.sass +10 -1
- data/app/assets/stylesheets/mixins/_columns.sass +16 -3
- data/app/assets/stylesheets/mixins/_conversions.sass +18 -6
- data/app/assets/stylesheets/mixins/_font-size.sass +16 -1
- data/app/assets/stylesheets/mixins/_image-tools.sass +12 -1
- data/app/assets/stylesheets/mixins/_inline-block.sass +21 -0
- data/app/assets/stylesheets/mixins/_ir.sass +14 -1
- data/app/assets/stylesheets/mixins/_mixins.sass +6 -0
- data/app/assets/stylesheets/mixins/_responsive.sass +16 -0
- data/app/assets/stylesheets/mixins/_sticky-footer.sass +52 -0
- data/app/assets/stylesheets/mixins/_tab-focus.sass +8 -1
- data/app/assets/stylesheets/mixins/_timing-equations.sass +34 -1
- data/app/assets/stylesheets/mixins/_visibility.sass +18 -5
- data/app/assets/stylesheets/polyfills/_box-shadow.sass +10 -0
- data/app/assets/stylesheets/polyfills/_box-sizing.sass +10 -1
- data/app/assets/stylesheets/polyfills/_functions.sass +14 -1
- data/app/assets/stylesheets/polyfills/_opacity.sass +10 -1
- data/app/assets/stylesheets/polyfills/_polyfills.sass +9 -2
- data/app/assets/stylesheets/polyfills/_transition.sass +10 -0
- data/app/assets/stylesheets/polyfills/_user-select.sass +10 -0
- data/app/assets/stylesheets/settings/_config.sass +26 -0
- data/app/assets/stylesheets/settings/_settings.sass +7 -0
- data/app/assets/stylesheets/settings/_theme.sass +189 -0
- data/app/assets/stylesheets/{styleguide.sass → underoos-docs.sass} +20 -116
- data/app/assets/stylesheets/underoos.sass +5 -16
- data/config.ru +1 -3
- data/features/generator.feature +13 -4
- data/lib/generators/underoos/assets_generator.rb +4 -2
- data/lib/underoos/version.rb +1 -1
- data/public/images.html +157 -0
- data/public/index.html +149 -0
- data/public/sherpa.css +306 -0
- data/public/styles.html +5374 -0
- data/script/javascripts +0 -1
- data/sherpa/config.yml +96 -0
- data/sherpa/layouts/images.mustache +17 -0
- data/sherpa/layouts/layout.mustache +77 -0
- data/sherpa/layouts/overview.mustache +19 -0
- data/sherpa/layouts/raw.mustache +25 -0
- data/sherpa/layouts/section.mustache +67 -0
- data/underoos.gemspec +0 -2
- data/vendor/assets/javascripts/bootstrap-alert.js +28 -32
- data/vendor/assets/javascripts/bootstrap-button.js +29 -33
- data/vendor/assets/javascripts/bootstrap-collapse.js +45 -26
- data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
- data/vendor/assets/javascripts/bootstrap-modal.js +25 -17
- data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
- data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
- data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
- data/vendor/assets/javascripts/bootstrap-transition.js +30 -20
- data/vendor/assets/javascripts/bootstrap-typeahead.js +24 -10
- data/vendor/assets/javascripts/sherpa.coffee +78 -0
- metadata +34 -75
- data/app/assets/javascripts/styleguide.js +0 -132
- data/app/assets/stylesheets/base/_elements.sass +0 -61
- data/app/assets/stylesheets/polyfills/_inline-block.sass +0 -8
- data/app/assets/stylesheets/themes/_default.sass +0 -119
- data/app/controllers/underoos/styleguides_controller.rb +0 -79
- data/app/views/shared/_upgrades.html.haml +0 -12
- data/app/views/underoos/styleguides/_assets.haml +0 -42
- data/app/views/underoos/styleguides/_components.haml +0 -42
- data/app/views/underoos/styleguides/_elements.haml +0 -242
- data/app/views/underoos/styleguides/_forms.haml +0 -305
- data/app/views/underoos/styleguides/_layouts.haml +0 -76
- data/app/views/underoos/styleguides/_palettes.haml +0 -18
- data/app/views/underoos/styleguides/_resources.haml +0 -27
- data/app/views/underoos/styleguides/_tables.haml +0 -124
- data/app/views/underoos/styleguides/_typography.haml +0 -284
- data/app/views/underoos/styleguides/_utilities.haml +0 -270
- data/app/views/underoos/styleguides/components/_accordions.haml +0 -83
- data/app/views/underoos/styleguides/components/_breadcrumbs.haml +0 -42
- data/app/views/underoos/styleguides/components/_button-groups.haml +0 -162
- data/app/views/underoos/styleguides/components/_carets.haml +0 -28
- data/app/views/underoos/styleguides/components/_close.haml +0 -20
- data/app/views/underoos/styleguides/components/_decals.haml +0 -40
- data/app/views/underoos/styleguides/components/_dropdowns.haml +0 -189
- data/app/views/underoos/styleguides/components/_media.haml +0 -78
- data/app/views/underoos/styleguides/components/_modals.haml +0 -42
- data/app/views/underoos/styleguides/components/_nav-lists.haml +0 -52
- data/app/views/underoos/styleguides/components/_navbars.haml +0 -144
- data/app/views/underoos/styleguides/components/_navs-showcase.haml +0 -27
- data/app/views/underoos/styleguides/components/_notifications.haml +0 -169
- data/app/views/underoos/styleguides/components/_paddles.haml +0 -68
- data/app/views/underoos/styleguides/components/_pagination.haml +0 -64
- data/app/views/underoos/styleguides/components/_popovers.haml +0 -33
- data/app/views/underoos/styleguides/components/_progress-bars.haml +0 -72
- data/app/views/underoos/styleguides/components/_tabs-pills.haml +0 -241
- data/app/views/underoos/styleguides/components/_tooltips.haml +0 -37
- data/app/views/underoos/styleguides/components/_wells.haml +0 -29
- data/app/views/underoos/styleguides/index.html.haml +0 -259
- data/app/views/underoos/styleguides/partials/_form-template.haml +0 -171
- data/app/views/underoos/styleguides/partials/_table-data.haml +0 -33
- data/app/views/underoos/styleguides/partials/_transitions.haml +0 -136
- data/config/routes.rb +0 -3
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -125
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Colorizing mixins to extend the native Sass functions.
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Params | Usage
|
|
6
|
+
// ----------------------------|-----------------------------|----------------------------------------------
|
|
7
|
+
// `+background-darken-border` | `$color`, `$percentage:20%` | Fills a background color and darkens the border based off a percentage
|
|
8
|
+
//
|
|
9
|
+
// Notes:
|
|
10
|
+
// - **Pro Tip!** Sass comes pre-baked with [killer native color methods](http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html)
|
|
11
|
+
|
|
3
12
|
@mixin background-darken-border($color, $percentage:20%)
|
|
4
13
|
background-color: $color
|
|
5
14
|
border: 1px solid darken($color, $percentage)
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Allows elements to take the shape of either a column or row within a grid environment.
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Usage
|
|
6
|
+
// ---------------------|--------------------------------------------------------------------------------
|
|
7
|
+
// `+base-column` | The base `column` settings, should be extended by all columns
|
|
8
|
+
// `+base-column-right` | An alternate base `column` which floats elements to the right
|
|
9
|
+
// `+base-row` | The base `row` settings, should be extended by all rows
|
|
10
|
+
//
|
|
11
|
+
// Notes:
|
|
12
|
+
// - **Pro Tip!** There are helper classes for `.base-column`, `.base-row` and
|
|
13
|
+
// `.base-column-right` which can be used for extension with `@extend`
|
|
14
|
+
//
|
|
15
|
+
// Warnings:
|
|
16
|
+
// - **Warning!** The column mixins all utilize `box-sizing: border-box` which is not supported in ie7
|
|
17
|
+
|
|
3
18
|
@mixin base-column
|
|
4
19
|
+box-sizing(border-box)
|
|
5
20
|
display: block
|
|
6
21
|
float: left
|
|
7
22
|
|
|
8
|
-
// An alternate base `column` which floats elements to the right
|
|
9
23
|
@mixin base-column-right
|
|
10
24
|
+box-sizing(border-box)
|
|
11
25
|
display: block
|
|
12
26
|
float: right
|
|
13
27
|
|
|
14
|
-
// The base `row` settings, should be extended by all rows
|
|
15
28
|
@mixin base-row
|
|
16
29
|
+box-sizing(border-box)
|
|
17
30
|
+clearfixer
|
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Functions for calculations and conversion between pixels, ems, rems and percentages.
|
|
4
|
+
//
|
|
5
|
+
// Function | Params | Usage
|
|
6
|
+
// ------------------ | ----------------------------------------- | ----------------------------------------------
|
|
7
|
+
// `to_em` | `$target_px`, `$context:$base_font_size` | Converts target `px` value to `em` in context constraints of the base font size
|
|
8
|
+
// `to_rem` | `$target_px`, `$context:$context_px` | Converts target `px` value to `rem` in context constraints of the user's base font size
|
|
9
|
+
// `to_percent` | `$target_px`, `$context:$base_width` | Converts target `px` value to `percentage` in context constraints of the container's width
|
|
10
|
+
// `vertical_pixel` | `$target_px` | Returns the vertical rhythm in pixels calculated from the `$base_vertical` setting
|
|
11
|
+
// `vertical_em` | `$target_px` | Returns the vertical rhythm in em calculated from the `$base_vertical` setting
|
|
12
|
+
// `vertical_percent` | `$target_px` | Returns the vertical rhythm in percent calculated from the `$base_vertical` setting
|
|
13
|
+
//
|
|
14
|
+
// Notes:
|
|
15
|
+
// - **Important!** When calculating vertical rhythm, always pass in what the expected pixel value is for the element.
|
|
16
|
+
//
|
|
17
|
+
// Warnings:
|
|
18
|
+
// - **Warning!** Define `$context_px`, `$base_font_size`, `$base_width` and `$base_vertical` prior to the functions being loaded.
|
|
19
|
+
|
|
3
20
|
@function to_em($target_px, $context:$base_font_size)
|
|
4
21
|
@return ($target_px / $context) * 1em
|
|
5
22
|
|
|
6
|
-
// Converts target `px` value to `rem` in context constraints of the user's base font size
|
|
7
23
|
@function to_rem($target_px, $context:$context_px)
|
|
8
24
|
@return ($target_px / $context) * 1rem
|
|
9
25
|
|
|
10
|
-
// Converts target `px` value to `percentage` in context constraints of the container's width
|
|
11
26
|
@function to_percent($target_px, $context:$base_width)
|
|
12
27
|
@return percentage($target_px / $context)
|
|
13
28
|
|
|
14
|
-
// Returns the vertical rhythm in pixels calculated from the `$base_vertical` setting
|
|
15
29
|
@function vertical_pixel($target_px)
|
|
16
30
|
@return ($base_vertical / $target_px) * 1px
|
|
17
31
|
|
|
18
|
-
// Returns the vertical rhythm in em calculated from the `$base_vertical` setting
|
|
19
32
|
@function vertical_em($target_px)
|
|
20
33
|
@return to_em(($base_vertical / $target_px), $base_font_size)
|
|
21
34
|
|
|
22
|
-
// Returns the vertical rhythm in percent calculated from the `$base_vertical` setting
|
|
23
35
|
@function vertical_percent($target_px)
|
|
24
36
|
@return to_percent(($base_vertical / $target_px), $base_font_size)
|
|
25
37
|
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Font size
|
|
3
|
+
// Sets a `font-size` using `rems` with a pixel fallback.
|
|
4
|
+
//
|
|
5
|
+
// Arguments:
|
|
6
|
+
// - `$target_px` - The target font size in pixels
|
|
7
|
+
// - `$context:$context_px` - [_optional_] The context constraints of the
|
|
8
|
+
// user's base font size
|
|
9
|
+
//
|
|
10
|
+
// Notes:
|
|
11
|
+
// - **Heads Up!** Make sure not to include the `px` postfix when passing a size
|
|
12
|
+
//
|
|
13
|
+
// Examples:
|
|
14
|
+
// h1
|
|
15
|
+
// +font-size(48)
|
|
16
|
+
// color: blue
|
|
17
|
+
|
|
3
18
|
@mixin font-size($target_px, $context:$context_px)
|
|
4
19
|
font-size: $target_px * 1px
|
|
5
20
|
font-size: to_rem($target_px, $context)
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Image tools
|
|
3
|
+
// Image interpolation settings based on [stich css](http://stitchcss.com/).
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Usage
|
|
6
|
+
// --------------------- | --------------------------------------------------------------------------------
|
|
7
|
+
// `+sharpen-image` | Sharpen an image if it has become blurry due to upscaling or downscaling
|
|
8
|
+
// `+high-quality-image` | Improves rendering quality for images which may be upscaled or downscaled
|
|
9
|
+
// `+low-quality-image` | Optimizes the rendering on images so they appear faster, but at a lower quality
|
|
10
|
+
//
|
|
11
|
+
// Warnings:
|
|
12
|
+
// - **Warning!** These settings can have adverse effects in some browsers, test thoroughly.
|
|
13
|
+
|
|
3
14
|
@mixin sharpen-image
|
|
4
15
|
image-rendering: -moz-crisp-edges
|
|
5
16
|
-ms-interpolation-mode: nearest-neighbor
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
//~ Inline block
|
|
3
|
+
// Mirrors the functionality found in [Compass](http://compass-style.org/reference/compass/css3/inline_block/)
|
|
4
|
+
// and normalizes `inline-block` for [Bourbon](http://thoughtbot.com/bourbon/) by setting `vertical-align: middle`.
|
|
5
|
+
//
|
|
6
|
+
// The mixin also fixes support for ie7 if `$legacy-support-for-ie` is set to true.
|
|
7
|
+
//
|
|
8
|
+
// Examples:
|
|
9
|
+
// .breadcrumb > li
|
|
10
|
+
// +inline-block
|
|
11
|
+
// color: blue
|
|
12
|
+
|
|
13
|
+
@mixin inline-block
|
|
14
|
+
display: inline-block
|
|
15
|
+
vertical-align: middle
|
|
16
|
+
|
|
17
|
+
@if $legacy-support-for-ie
|
|
18
|
+
zoom: 1
|
|
19
|
+
*display: inline
|
|
20
|
+
*vertical-align: auto
|
|
21
|
+
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Image replacement
|
|
3
|
+
// Hides text on an element when utilizing a `background-image` such as a logo or icon
|
|
4
|
+
//
|
|
5
|
+
// Notes:
|
|
6
|
+
// - **Pro Tip!** There is a helper class for `.ir` which can be used for
|
|
7
|
+
// extension with `@extend`
|
|
8
|
+
//
|
|
9
|
+
// Examples:
|
|
10
|
+
// .footer .social-icon
|
|
11
|
+
// +ir
|
|
12
|
+
// background-image: $sprite-icons-img
|
|
13
|
+
// width: 24px
|
|
14
|
+
// height: 24px
|
|
15
|
+
|
|
3
16
|
@mixin ir
|
|
4
17
|
background-color: transparent
|
|
5
18
|
border: 0
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
|
|
2
|
+
//~ # Mixins
|
|
3
|
+
// Mixins automate common re-usable chunks of CSS, properties, selectors, and/or settings.
|
|
4
|
+
|
|
2
5
|
// underoos mixins
|
|
6
|
+
@import inline-block
|
|
7
|
+
@import responsive
|
|
3
8
|
@import arrows
|
|
4
9
|
@import clearfixins
|
|
5
10
|
@import coloring
|
|
@@ -11,4 +16,5 @@
|
|
|
11
16
|
@import tab-focus
|
|
12
17
|
@import timing-equations
|
|
13
18
|
@import visibility
|
|
19
|
+
@import sticky-footer
|
|
14
20
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
//~
|
|
3
|
+
// Mixins for creating responsive behavior around structures and layouts.
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Parameters | Usage
|
|
6
|
+
// --------------------- | ------------- | ---------------------
|
|
7
|
+
// `+resize_containers` | `$base_value` | Resize any containers based on the media query
|
|
8
|
+
|
|
9
|
+
@mixin resize_containers($base_value)
|
|
10
|
+
.container
|
|
11
|
+
max-width: $base_value * 1px
|
|
12
|
+
&.fluid, &.fixed
|
|
13
|
+
max-width: none
|
|
14
|
+
&.fixed
|
|
15
|
+
width: $base_value * 1px
|
|
16
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
//~ Sticky footer
|
|
3
|
+
// Mixins for sticking and unsticking a footer to the bottom of a page.
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Parameters | Usage
|
|
6
|
+
// ------------------ | ---------------- | ---------------------
|
|
7
|
+
// `+sticky_footer` | `$footer-height` | Creates a sticky footer based off a fixed height on the footer element
|
|
8
|
+
// `+unsticky_footer` | _none_ | Reverses the effect of the sticky_footer mixin, useful in media queries
|
|
9
|
+
//
|
|
10
|
+
// Requires the markup to contain a `.main`, `.content` and `.footer` elements.
|
|
11
|
+
//
|
|
12
|
+
// Examples:
|
|
13
|
+
// <body role="document">
|
|
14
|
+
// <section class="main">
|
|
15
|
+
// <section class="content">
|
|
16
|
+
// <section class="container" role="main">
|
|
17
|
+
// </section>
|
|
18
|
+
// </section>
|
|
19
|
+
// </section>
|
|
20
|
+
// <footer class="footer">
|
|
21
|
+
// </footer>
|
|
22
|
+
// </body>
|
|
23
|
+
|
|
24
|
+
// Sticky Footer
|
|
25
|
+
@mixin sticky_footer($footer-height)
|
|
26
|
+
html, body
|
|
27
|
+
height: 100%
|
|
28
|
+
.main
|
|
29
|
+
min-height: 100%
|
|
30
|
+
overflow-x: hidden
|
|
31
|
+
width: 100%
|
|
32
|
+
.content
|
|
33
|
+
padding-bottom: $footer-height
|
|
34
|
+
.footer
|
|
35
|
+
clear: both
|
|
36
|
+
position: relative
|
|
37
|
+
margin-top: $footer-height * -1
|
|
38
|
+
height: $footer-height
|
|
39
|
+
overflow: visible
|
|
40
|
+
|
|
41
|
+
// Unstick the footer
|
|
42
|
+
@mixin unsticky_footer()
|
|
43
|
+
html, body
|
|
44
|
+
height: auto
|
|
45
|
+
.main
|
|
46
|
+
min-height: none
|
|
47
|
+
.content
|
|
48
|
+
padding-bottom: 0
|
|
49
|
+
.footer
|
|
50
|
+
margin-top: 1em
|
|
51
|
+
height: auto
|
|
52
|
+
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Tab focus
|
|
3
|
+
// Resets the normal browser behavior for tab focusable content.
|
|
4
|
+
//
|
|
5
|
+
// Examples:
|
|
6
|
+
// input[type="radio"]:focus,
|
|
7
|
+
// input[type="checkbox"]:focus
|
|
8
|
+
// +tab-focus
|
|
9
|
+
|
|
3
10
|
@mixin tab-focus
|
|
4
11
|
outline: thin dotted
|
|
5
12
|
outline: 5px auto -webkit-focus-ring-color
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Timing equations
|
|
3
|
+
// Underoos comes packed with a number of cubic-bezier timing properties for
|
|
4
|
+
// use with `transition-timing-function`. The timing functions are based on the
|
|
5
|
+
// properties included with [Bourbon](http://thoughtbot.com/bourbon/).
|
|
6
|
+
//
|
|
7
|
+
// Property | Example
|
|
8
|
+
// -------------------- | -------------------------------------------------------
|
|
9
|
+
// `default (linear)` | <div class="sherpa-swatch"></div>
|
|
10
|
+
// `$ease-in-quad` | <div class="sherpa-swatch ease-in-quad"></div>
|
|
11
|
+
// `$ease-in-cubic` | <div class="sherpa-swatch ease-in-cubic"></div>
|
|
12
|
+
// `$ease-in-quart` | <div class="sherpa-swatch ease-in-quart"></div>
|
|
13
|
+
// `$ease-in-quint` | <div class="sherpa-swatch ease-in-quint"></div>
|
|
14
|
+
// `$ease-in-sine` | <div class="sherpa-swatch ease-in-sine"></div>
|
|
15
|
+
// `$ease-in-expo` | <div class="sherpa-swatch ease-in-expo"></div>
|
|
16
|
+
// `$ease-in-circ` | <div class="sherpa-swatch ease-in-circ"></div>
|
|
17
|
+
// `$ease-in-back` | <div class="sherpa-swatch ease-in-back"></div>
|
|
18
|
+
// `$ease-out-quad` | <div class="sherpa-swatch ease-out-quad"></div>
|
|
19
|
+
// `$ease-out-cubic` | <div class="sherpa-swatch ease-out-cubic"></div>
|
|
20
|
+
// `$ease-out-quart` | <div class="sherpa-swatch ease-out-quart"></div>
|
|
21
|
+
// `$ease-out-quint` | <div class="sherpa-swatch ease-out-quint"></div>
|
|
22
|
+
// `$ease-out-sine` | <div class="sherpa-swatch ease-out-sine"></div>
|
|
23
|
+
// `$ease-out-expo` | <div class="sherpa-swatch ease-out-expo"></div>
|
|
24
|
+
// `$ease-out-circ` | <div class="sherpa-swatch ease-out-circ"></div>
|
|
25
|
+
// `$ease-out-back` | <div class="sherpa-swatch ease-out-back"></div>
|
|
26
|
+
// `$ease-in-out-quad` | <div class="sherpa-swatch ease-in-out-quad"></div>
|
|
27
|
+
// `$ease-in-out-cubic` | <div class="sherpa-swatch ease-in-out-cubic"></div>
|
|
28
|
+
// `$ease-in-out-quart` | <div class="sherpa-swatch ease-in-out-quart"></div>
|
|
29
|
+
// `$ease-in-out-quint` | <div class="sherpa-swatch ease-in-out-quint"></div>
|
|
30
|
+
// `$ease-in-out-sine` | <div class="sherpa-swatch ease-in-out-sine"></div>
|
|
31
|
+
// `$ease-in-out-expo` | <div class="sherpa-swatch ease-in-out-expo"></div>
|
|
32
|
+
// `$ease-in-out-circ` | <div class="sherpa-swatch ease-in-out-circ"></div>
|
|
33
|
+
// `$ease-in-out-back` | <div class="sherpa-swatch ease-in-out-back"></div>
|
|
34
|
+
|
|
35
|
+
|
|
3
36
|
$ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53)
|
|
4
37
|
$ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19)
|
|
5
38
|
$ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22)
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Controls various visibility settings applied to elements.
|
|
4
|
+
//
|
|
5
|
+
// Mixin | Params | Usage
|
|
6
|
+
// ---------------- | ------- | ----------------------------------------------
|
|
7
|
+
// `+hidden` | _none_ | Totally hidden from screen readers and browsers
|
|
8
|
+
// `+shown` | _none_ | Reverse the effects of `hidden`
|
|
9
|
+
// `+visuallyhidden`| _none_ | Only visually hidden, still available to screen readers
|
|
10
|
+
// `+visuallyshown` | _none_ | Reverse the settings applied by `.visuallyhidden`
|
|
11
|
+
// `+invisible` | _none_ | Hide visually and from screenreaders, but maintain layout
|
|
12
|
+
//
|
|
13
|
+
// Notes:
|
|
14
|
+
// - **Pro Tip!** All of these mixins are available as helper classes for use with `@extend`
|
|
15
|
+
//
|
|
16
|
+
// Warnings:
|
|
17
|
+
// - **Warning!** When using `visuallyhidden` and `visuallyshown` with `box-shadow`, you'll need to add `clip:initial` to get the shadows to reappear
|
|
18
|
+
|
|
3
19
|
@mixin hidden
|
|
4
20
|
display: none !important
|
|
5
21
|
visibility: hidden
|
|
6
22
|
|
|
7
|
-
// Reverse the effects of hidden
|
|
8
23
|
@mixin shown
|
|
9
24
|
display: block
|
|
10
25
|
visibility: visible
|
|
11
26
|
|
|
12
|
-
// Only visually hidden, still available to screen readers
|
|
13
27
|
@mixin visuallyhidden
|
|
14
28
|
border: 0
|
|
15
29
|
clip: rect(0 0 0 0)
|
|
@@ -28,16 +42,15 @@
|
|
|
28
42
|
width: auto
|
|
29
43
|
height: auto
|
|
30
44
|
|
|
31
|
-
// Reverse the settings applied by `.visuallyhidden`
|
|
32
45
|
@mixin visuallyshown
|
|
33
46
|
clip: auto
|
|
47
|
+
clip: rect(auto auto auto auto)
|
|
34
48
|
position: static
|
|
35
49
|
overflow: visible
|
|
36
50
|
margin: 0
|
|
37
51
|
width: auto
|
|
38
52
|
height: auto
|
|
39
53
|
|
|
40
|
-
// Hide visually and from screenreaders, but maintain layout
|
|
41
54
|
@mixin invisible
|
|
42
55
|
visibility: hidden
|
|
43
56
|
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
//~
|
|
3
|
+
// Draws an outer or inset shadow around an element (supports up to 9 shadow parameters)
|
|
4
|
+
//
|
|
5
|
+
// Arguments:
|
|
6
|
+
// - `$shadow-n` The normal or inset shadow properties to apply
|
|
7
|
+
//
|
|
8
|
+
// Examples:
|
|
9
|
+
// .element
|
|
10
|
+
// +box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.1), -1px -1px 5px 1px black)
|
|
11
|
+
|
|
2
12
|
@mixin box-shadow($shadow-1:none, $shadow-2:false, $shadow-3:false, $shadow-4:false, $shadow-5:false, $shadow-6:false, $shadow-7:false, $shadow-8:false, $shadow-9:false)
|
|
3
13
|
$full: combine($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9)
|
|
4
14
|
-webkit-box-shadow: $full
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Changes the box model used for calculating an elements width and height
|
|
4
|
+
//
|
|
5
|
+
// Arguments:
|
|
6
|
+
// - `$type:border-box` Options: `content-box | border-box | inherit`
|
|
7
|
+
//
|
|
8
|
+
// Examples:
|
|
9
|
+
// .column
|
|
10
|
+
// +box-sizing(border-box)
|
|
11
|
+
|
|
3
12
|
@mixin box-sizing ($type:border-box)
|
|
4
13
|
$box: unquote($type)
|
|
5
14
|
-webkit-box-sizing: $box
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ Combine
|
|
3
|
+
// A function used by other polyfills to combine and normalize multiple parameters (supports up to 9 values)
|
|
4
|
+
//
|
|
5
|
+
// Arguments:
|
|
6
|
+
// - `$value-1` The first property to combine
|
|
7
|
+
// - `$value-2(-9)` Remaining properties to combine (defaults to `false`)
|
|
8
|
+
// - `@return` The combined values for translation into the mixin
|
|
9
|
+
//
|
|
10
|
+
// Warnings:
|
|
11
|
+
// - **Warning!** The combine function for mixin values only accepts 9 values, this is inline with the Bourbon library (Compass supports 10!)
|
|
12
|
+
//
|
|
13
|
+
// Examples:
|
|
14
|
+
// $full: combine($transition-1, $transition-2, $transition-3)
|
|
15
|
+
|
|
3
16
|
@function combine($value-1, $value-2:false, $value-3:false, $value-4:false, $value-5:false, $value-6:false, $value-7:false, $value-8:false, $value-9:false)
|
|
4
17
|
@if $value-2 == false and $value-3 == false and $value-4 == false and $value-5 == false and $value-6 == false and $value-7 == false and $value-8 == false and $value-9 == false
|
|
5
18
|
@return $value-1
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~
|
|
3
|
+
// Provides cross browser opacity, values are between `0-1`.
|
|
4
|
+
//
|
|
5
|
+
// Arguments:
|
|
6
|
+
// - `$alpha:1`
|
|
7
|
+
//
|
|
8
|
+
// Examples:
|
|
9
|
+
// .tooltip
|
|
10
|
+
// +opacity(0.5)
|
|
11
|
+
|
|
3
12
|
@mixin opacity($alpha:1)
|
|
4
13
|
filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($alpha * 100)})")
|
|
5
14
|
opacity: $alpha
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
//~ # Polyfills
|
|
3
|
+
// Most projects benefit greatly from using a library like [Compass](http://compass-style.org/)
|
|
4
|
+
// or [Bourbon](http://thoughtbot.com/bourbon/). Underoos is not designed to
|
|
5
|
+
// replace these libraries, but rather sit on top of them. There may be times
|
|
6
|
+
// when using one of these libraries isn't an option, so Underoos provides a
|
|
7
|
+
// few simple polyfill mixins in it's place.
|
|
8
|
+
//
|
|
9
|
+
// If a project uses Compass or Bourbon, make sure not to import these polyfills.
|
|
10
|
+
|
|
3
11
|
@import functions
|
|
4
12
|
@import box-shadow
|
|
5
13
|
@import box-sizing
|
|
6
|
-
@import inline-block
|
|
7
14
|
@import opacity
|
|
8
15
|
@import transition
|
|
9
16
|
@import user-select
|