doggystyle 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.hound.yml +5 -0
- data/.npmignore +18 -0
- data/.ruby-version +1 -0
- data/.scss-lint.yml +243 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/RELEASING.md +1 -0
- data/Rakefile +9 -0
- data/bin/doggystyle +5 -0
- data/bower.json +38 -0
- data/circle.yml +13 -0
- data/core/_imports.scss +229 -0
- data/core/animations/_jump.scss +7 -0
- data/core/animations/_shake.scss +24 -0
- data/core/animations/_wobble.scss +8 -0
- data/core/functions/_mobile-first.scss +3 -0
- data/core/functions/_opposite-direction.scss +45 -0
- data/core/functions/casts/_to-bool.scss +19 -0
- data/core/functions/casts/_to-color.scss +74 -0
- data/core/functions/casts/_to-list.scss +38 -0
- data/core/functions/casts/_to-map.scss +27 -0
- data/core/functions/casts/_to-null.scss +15 -0
- data/core/functions/casts/_to-number.scss +66 -0
- data/core/functions/casts/_to-string.scss +15 -0
- data/core/functions/colours/_colour-contrast.scss +61 -0
- data/core/functions/colours/_colour.scss +69 -0
- data/core/functions/colours/_random-colour.scss +78 -0
- data/core/functions/lists/_contains.scss +62 -0
- data/core/functions/lists/_first.scss +19 -0
- data/core/functions/lists/_insert-nth.scss +37 -0
- data/core/functions/lists/_last.scss +11 -0
- data/core/functions/lists/_merge.scss +30 -0
- data/core/functions/lists/_prepend.scss +11 -0
- data/core/functions/lists/_remove-nth.scss +53 -0
- data/core/functions/lists/_remove.scss +30 -0
- data/core/functions/lists/_replace-nth.scss +55 -0
- data/core/functions/lists/_replace.scss +36 -0
- data/core/functions/lists/_reverse.scss +31 -0
- data/core/functions/lists/_second.scss +19 -0
- data/core/functions/lists/_shift.scss +24 -0
- data/core/functions/lists/_slice.scss +52 -0
- data/core/functions/lists/_sort.scss +51 -0
- data/core/functions/maps/_map-deep-get.scss +51 -0
- data/core/functions/maps/_map-deep-set.scss +34 -0
- data/core/functions/maps/_map-depth.scss +23 -0
- data/core/functions/maps/_map-extend.scss +47 -0
- data/core/functions/maps/_map-has-keys.scss +23 -0
- data/core/functions/maps/_map-has-nested-keys.scss +24 -0
- data/core/functions/maps/_map-set.scss +4 -0
- data/core/functions/maps/_map-zip.scss +50 -0
- data/core/functions/numbers/_add-unit.scss +54 -0
- data/core/functions/numbers/_pad.scss +16 -0
- data/core/functions/numbers/_spacer.scss +16 -0
- data/core/functions/numbers/_strip.scss +29 -0
- data/core/functions/numbers/_units.scss +17 -0
- data/core/functions/svg/_dots.scss +84 -0
- data/core/functions/svg/_fake-radius.scss +131 -0
- data/core/functions/svg/_lines.scss +76 -0
- data/core/functions/svg/_svg.scss +12 -0
- data/core/functions/text/_smart-lineheight.scss +13 -0
- data/core/functions/text/_string-explode.scss +45 -0
- data/core/functions/text/_string-replace.scss +38 -0
- data/core/helpers/_custom-elements.scss +114 -0
- data/core/helpers/_eases.scss +44 -0
- data/core/helpers/_reset.scss +282 -0
- data/core/helpers/_show-breakpoints.scss +25 -0
- data/core/helpers/_strings.scss +648 -0
- data/core/helpers/_warnings.scss +3 -0
- data/core/helpers/checks/_check.scss +69 -0
- data/core/helpers/checks/_is-absolute-length.scss +25 -0
- data/core/helpers/checks/_is-angel.scss +25 -0
- data/core/helpers/checks/_is-arglist.scss +11 -0
- data/core/helpers/checks/_is-bool.scss +23 -0
- data/core/helpers/checks/_is-calc.scss +11 -0
- data/core/helpers/checks/_is-colour.scss +23 -0
- data/core/helpers/checks/_is-dark.scss +14 -0
- data/core/helpers/checks/_is-duration.scss +15 -0
- data/core/helpers/checks/_is-false.scss +13 -0
- data/core/helpers/checks/_is-first-character.scss +11 -0
- data/core/helpers/checks/_is-frequency.scss +15 -0
- data/core/helpers/checks/_is-function.scss +44 -0
- data/core/helpers/checks/_is-integer.scss +15 -0
- data/core/helpers/checks/_is-length.scss +16 -0
- data/core/helpers/checks/_is-light.scss +14 -0
- data/core/helpers/checks/_is-list.scss +11 -0
- data/core/helpers/checks/_is-map.scss +11 -0
- data/core/helpers/checks/_is-null.scss +11 -0
- data/core/helpers/checks/_is-number.scss +19 -0
- data/core/helpers/checks/_is-percentage.scss +13 -0
- data/core/helpers/checks/_is-position.scss +16 -0
- data/core/helpers/checks/_is-pseudo.scss +24 -0
- data/core/helpers/checks/_is-relative-length.scss +25 -0
- data/core/helpers/checks/_is-resolution.scss +15 -0
- data/core/helpers/checks/_is-selector.scss +3 -0
- data/core/helpers/checks/_is-string.scss +11 -0
- data/core/helpers/checks/_is-time.scss +15 -0
- data/core/helpers/checks/_is-unit.scss +16 -0
- data/core/helpers/private/_arglist-to-list.scss +36 -0
- data/core/helpers/private/_brightness.scss +13 -0
- data/core/helpers/private/_find-digits.scss +41 -0
- data/core/helpers/private/_find-integer.scss +40 -0
- data/core/helpers/private/_from-hex.scss +48 -0
- data/core/helpers/private/_from-hsl.scss +55 -0
- data/core/helpers/private/_from-rgb.scss +55 -0
- data/core/helpers/private/_get-color-value.scss +26 -0
- data/core/helpers/private/_hash-fix.scss +15 -0
- data/core/helpers/private/_hex-to-dec.scss +28 -0
- data/core/helpers/private/_length.scss +26 -0
- data/core/helpers/private/_lightness.scss +15 -0
- data/core/helpers/private/_list-items-to-strings.scss +8 -0
- data/core/helpers/private/_min-max-number.scss +12 -0
- data/core/helpers/private/_pow.scss +29 -0
- data/core/helpers/private/_string-compare.scss +38 -0
- data/core/helpers/private/_string-explode.scss +43 -0
- data/core/helpers/private/_sudo.scss +23 -0
- data/core/helpers/symbols/_arrows.scss +337 -0
- data/core/helpers/symbols/_block.scss +97 -0
- data/core/helpers/symbols/_box.scss +385 -0
- data/core/helpers/symbols/_common.scss +101 -0
- data/core/helpers/symbols/_currency.scss +82 -0
- data/core/helpers/symbols/_dingbats.scss +565 -0
- data/core/helpers/symbols/_geometric.scss +289 -0
- data/core/helpers/symbols/_letterlike.scss +235 -0
- data/core/helpers/symbols/_misc.scss +568 -0
- data/core/helpers/symbols/_operators.scss +766 -0
- data/core/helpers/symbols/_punctuation.scss +214 -0
- data/core/mixins/_align.scss +15 -0
- data/core/mixins/_animate.scss +16 -0
- data/core/mixins/_aspect-ratio.scss +86 -0
- data/core/mixins/_backface-visibility.scss +7 -0
- data/core/mixins/_background-image.scss +13 -0
- data/core/mixins/_blend.scss +10 -0
- data/core/mixins/_blendmodes.scss +24 -0
- data/core/mixins/_border-radius.scss +105 -0
- data/core/mixins/_browsers.scss +155 -0
- data/core/mixins/_bulletpoint.scss +12 -0
- data/core/mixins/_center.scss +3 -0
- data/core/mixins/_clearfix.scss +7 -0
- data/core/mixins/_columns.scss +22 -0
- data/core/mixins/_custom-property.scss +15 -0
- data/core/mixins/_devices.scss +97 -0
- data/core/mixins/_dropdown.scss +38 -0
- data/core/mixins/_fake-radius.scss +99 -0
- data/core/mixins/_filters.scss +163 -0
- data/core/mixins/_flip.scss +11 -0
- data/core/mixins/_font-face.scss +11 -0
- data/core/mixins/_fontsize.scss +126 -0
- data/core/mixins/_gallery.scss +134 -0
- data/core/mixins/_gradient.scss +72 -0
- data/core/mixins/_image-size.scss +18 -0
- data/core/mixins/_image.scss +12 -0
- data/core/mixins/_inputs.scss +18 -0
- data/core/mixins/_keyframes.scss +8 -0
- data/core/mixins/_last.scss +5 -0
- data/core/mixins/_nth-last.scss +7 -0
- data/core/mixins/_nth.scss +10 -0
- data/core/mixins/_placeholder.scss +15 -0
- data/core/mixins/_prefixer.scss +55 -0
- data/core/mixins/_selection.scss +15 -0
- data/core/mixins/_shadow.scss +7 -0
- data/core/mixins/_size.scss +13 -0
- data/core/mixins/_smart-horizontal.scss +21 -0
- data/core/mixins/_sudo-image.scss +12 -0
- data/core/mixins/_text-shadow.scss +30 -0
- data/core/mixins/_transforms.scss +264 -0
- data/core/mixins/_transition.scss +189 -0
- data/core/mixins/_triangle-classic.scss +170 -0
- data/core/mixins/_triangle.scss +250 -0
- data/core/mixins/_unwrap.scss +5 -0
- data/core/mixins/_user-select.scss +5 -0
- data/core/mixins/_vertical.scss +10 -0
- data/core/mixins/columns/_columns.scss +92 -0
- data/core/mixins/flexbox/_flex-container.scss +201 -0
- data/core/mixins/flexbox/_flex-grid.scss +235 -0
- data/core/mixins/flexbox/_flex-items.scss +140 -0
- data/core/mixins/flexbox/_flex-remove.scss +12 -0
- data/core/mixins/grid/_break-between.scss +6 -0
- data/core/mixins/grid/_grid.scss +150 -0
- data/core/mixins/svg/_svg-size.scss +4 -0
- data/core/mixins/svg/_svg.scss +9 -0
- data/core/placeholders/_clear.scss +27 -0
- data/core/placeholders/_cursor.scss +35 -0
- data/core/placeholders/_misc.scss +20 -0
- data/core/placeholders/_rendering.scss +21 -0
- data/core/placeholders/_text.scss +41 -0
- data/core/settings/_colours.scss +30 -0
- data/core/settings/_directories.scss +7 -0
- data/core/settings/_global.scss +14 -0
- data/core/settings/_grid.scss +24 -0
- data/core/settings/_padding.scss +8 -0
- data/core/settings/_spacing.scss +8 -0
- data/core/settings/_text.scss +13 -0
- data/doggystyle.gemspec +29 -0
- data/eyeglass-exports.js +7 -0
- data/features/install.feature +29 -0
- data/features/step_definitions/doggystyle_steps.rb +31 -0
- data/features/support/bourbon_support.rb +19 -0
- data/features/support/env.rb +1 -0
- data/features/update.feature +30 -0
- data/features/version.feature +5 -0
- data/index.js +7 -0
- data/lib/doggystyle.rb +7 -0
- data/lib/doggystyle/generator.rb +81 -0
- data/lib/doggystyle/version.rb +3 -0
- data/package.json +33 -0
- data/spec/doggystyle/library/border_color_spec.rb +51 -0
- data/spec/doggystyle/library/border_radius_spec.rb +25 -0
- data/spec/doggystyle/library/border_style_spec.rb +51 -0
- data/spec/doggystyle/library/border_width_spec.rb +51 -0
- data/spec/doggystyle/library/buttons_spec.rb +53 -0
- data/spec/doggystyle/library/clearfix_spec.rb +18 -0
- data/spec/doggystyle/library/contrast_switch_spec.rb +23 -0
- data/spec/doggystyle/library/ellipsis_spec.rb +20 -0
- data/spec/doggystyle/library/font_face_spec_1.rb +16 -0
- data/spec/doggystyle/library/font_face_spec_2.rb +21 -0
- data/spec/doggystyle/library/font_face_spec_3.rb +16 -0
- data/spec/doggystyle/library/font_face_spec_4.rb +17 -0
- data/spec/doggystyle/library/font_stacks_spec.rb +40 -0
- data/spec/doggystyle/library/hide_text_spec.rb +17 -0
- data/spec/doggystyle/library/hide_visually_spec.rb +35 -0
- data/spec/doggystyle/library/margin_spec.rb +51 -0
- data/spec/doggystyle/library/modular_scale_spec.rb +43 -0
- data/spec/doggystyle/library/padding_spec.rb +51 -0
- data/spec/doggystyle/library/position_spec.rb +67 -0
- data/spec/doggystyle/library/prefixer_spec.rb +34 -0
- data/spec/doggystyle/library/shade_spec.rb +31 -0
- data/spec/doggystyle/library/size_spec.rb +31 -0
- data/spec/doggystyle/library/strip_unit_spec.rb +31 -0
- data/spec/doggystyle/library/text_inputs_spec.rb +75 -0
- data/spec/doggystyle/library/tint_spec.rb +31 -0
- data/spec/doggystyle/library/triangle_spec.rb +31 -0
- data/spec/doggystyle/library/word_wrap_spec.rb +29 -0
- data/spec/doggystyle/utilities/assign_inputs_spec.rb +50 -0
- data/spec/doggystyle/utilities/collapse_directionals.rb +25 -0
- data/spec/doggystyle/utilities/directional_values_spec.rb +21 -0
- data/spec/doggystyle/utilities/font_source_declaration_spec.rb +29 -0
- data/spec/doggystyle/utilities/retrieve_bourbon_setting_spec.rb +31 -0
- data/spec/doggystyle/utilities/unpack_spec.rb +32 -0
- data/spec/doggystyle/validators/contains_spec.rb +27 -0
- data/spec/doggystyle/validators/is_length_spec.rb +49 -0
- data/spec/doggystyle/validators/is_light_spec.rb +37 -0
- data/spec/doggystyle/validators/is_number_spec.rb +43 -0
- data/spec/doggystyle/validators/is_size_spec.rb +43 -0
- data/spec/fixtures/_setup.scss +1 -0
- data/spec/fixtures/library/border-color.scss +26 -0
- data/spec/fixtures/library/border-radius.scss +17 -0
- data/spec/fixtures/library/border-style.scss +21 -0
- data/spec/fixtures/library/border-width.scss +21 -0
- data/spec/fixtures/library/buttons.scss +17 -0
- data/spec/fixtures/library/clearfix.scss +5 -0
- data/spec/fixtures/library/contrast-switch.scss +9 -0
- data/spec/fixtures/library/ellipsis.scss +5 -0
- data/spec/fixtures/library/font-face-1.scss +6 -0
- data/spec/fixtures/library/font-face-2.scss +10 -0
- data/spec/fixtures/library/font-face-3.scss +8 -0
- data/spec/fixtures/library/font-face-4.scss +7 -0
- data/spec/fixtures/library/font-stacks.scss +41 -0
- data/spec/fixtures/library/hide-text.scss +5 -0
- data/spec/fixtures/library/hide-visually.scss +9 -0
- data/spec/fixtures/library/margin.scss +21 -0
- data/spec/fixtures/library/modular-scale.scss +29 -0
- data/spec/fixtures/library/padding.scss +21 -0
- data/spec/fixtures/library/position.scss +25 -0
- data/spec/fixtures/library/prefixer.scss +13 -0
- data/spec/fixtures/library/shade.scss +17 -0
- data/spec/fixtures/library/size.scss +13 -0
- data/spec/fixtures/library/strip-unit.scss +17 -0
- data/spec/fixtures/library/text-inputs.scss +21 -0
- data/spec/fixtures/library/tint.scss +17 -0
- data/spec/fixtures/library/triangle.scss +9 -0
- data/spec/fixtures/library/word-wrap.scss +9 -0
- data/spec/fixtures/utilities/assign-inputs.scss +19 -0
- data/spec/fixtures/utilities/collapse-directionals.scss +17 -0
- data/spec/fixtures/utilities/directional-values.scss +13 -0
- data/spec/fixtures/utilities/font-source-declaration.scss +11 -0
- data/spec/fixtures/utilities/retrieve-bourbon-setting.scss +16 -0
- data/spec/fixtures/utilities/unpack.scss +17 -0
- data/spec/fixtures/validators/contains.scss +28 -0
- data/spec/fixtures/validators/is-length.scss +35 -0
- data/spec/fixtures/validators/is-light.scss +29 -0
- data/spec/fixtures/validators/is-number.scss +31 -0
- data/spec/fixtures/validators/is-size.scss +31 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/matchers/have_rule.rb +35 -0
- data/spec/support/matchers/have_ruleset.rb +20 -0
- data/spec/support/matchers/have_value.rb +17 -0
- data/spec/support/parser_support.rb +16 -0
- data/spec/support/sass_support.rb +10 -0
- metadata +527 -0
@@ -0,0 +1,76 @@
|
|
1
|
+
/// Create a svg background image with dots.
|
2
|
+
///
|
3
|
+
/// @author Mark Notton
|
4
|
+
///
|
5
|
+
/// @access public
|
6
|
+
///
|
7
|
+
/// @param {list} $settings
|
8
|
+
/// In any order and without comma delimination, add any of the follwing settings
|
9
|
+
/// {color} - Colour of the lines. Default is black.
|
10
|
+
/// {number} - The first instance of a number will be used for line thickness. In 'px'; Default is 4px.
|
11
|
+
/// The second instance of a number will be used for lines spacing. In 'px'; Default is 0px.
|
12
|
+
/// {string} - 'vertical' or 'horizontal' can be defined to choose a direction.
|
13
|
+
///
|
14
|
+
/// @todo Add the ability to chose a direction by degrees
|
15
|
+
///
|
16
|
+
/// @require {function} is-colour
|
17
|
+
/// @require {function} is-string
|
18
|
+
/// @require {function} is-number
|
19
|
+
/// @require {function} colour
|
20
|
+
/// @require {function} svg
|
21
|
+
/// @require {function} strip
|
22
|
+
///
|
23
|
+
/// @example scss - Usage
|
24
|
+
/// Red dots at 8px in width and height. Alternative dots don't exist:
|
25
|
+
/// background:dots(red 8);
|
26
|
+
///
|
27
|
+
/// Red dots at 4px in width and height. Alternative dots are the same, but green:
|
28
|
+
/// background:dots(red green);
|
29
|
+
///
|
30
|
+
/// Red dots at 10px in width and height. Alternative dots are the same, but green. All dots are spaced 5px apart:
|
31
|
+
/// background:dots(red green 10 5);
|
32
|
+
///
|
33
|
+
/// @return {String}
|
34
|
+
|
35
|
+
@function lines($settings:null) {
|
36
|
+
|
37
|
+
$size : null;
|
38
|
+
$spacing : 2;
|
39
|
+
$colour : black;
|
40
|
+
$direction : horizontal;
|
41
|
+
$svg : '';
|
42
|
+
|
43
|
+
@each $setting in $settings {
|
44
|
+
@if is-colour($setting) {
|
45
|
+
$colour : $setting;
|
46
|
+
}
|
47
|
+
@elseif is-string($setting) and contains(horizontal vertical, $setting) {
|
48
|
+
$direction : $setting;
|
49
|
+
}
|
50
|
+
@elseif is-number($setting) {
|
51
|
+
@if $size == null {
|
52
|
+
$size : strip($setting);
|
53
|
+
}
|
54
|
+
@else {
|
55
|
+
$spacing : strip($setting);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
@if $size == null {
|
61
|
+
$size : 1;
|
62
|
+
}
|
63
|
+
|
64
|
+
@if $direction == horizontal {
|
65
|
+
$svg : "<svg xmlns='http://www.w3.org/2000/svg' width='1' height='"+($size + $spacing)+"'>";
|
66
|
+
$svg : $svg + "<rect width='1' height='"+$size+"' fill='"+ colour($colour, true)+"'/>";
|
67
|
+
$svg : $svg + "</svg>";
|
68
|
+
}
|
69
|
+
@elseif $direction == vertical {
|
70
|
+
$svg : "<svg xmlns='http://www.w3.org/2000/svg' height='1' width='"+($size + $spacing)+"'>";
|
71
|
+
$svg : $svg + "<rect height='1' width='"+$size+"' fill='"+ colour($colour, true)+"'/>";
|
72
|
+
$svg : $svg + "</svg>";
|
73
|
+
}
|
74
|
+
|
75
|
+
@return svg($svg);
|
76
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// Generates a clean url attribute for compressed or uncompressed svg data
|
2
|
+
///
|
3
|
+
/// @param {string} $svg - Add full SVG markup or base64 compressed code.
|
4
|
+
///
|
5
|
+
/// @link http://b64.io/
|
6
|
+
///
|
7
|
+
/// @return {string}
|
8
|
+
|
9
|
+
@function svg($svg) {
|
10
|
+
$data:if(str-index($svg, '<svg'), "data:image/svg+xml;utf8, ", "data:image/svg+xml;base64, ");
|
11
|
+
@return url($data + unquote($svg));
|
12
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
@function smart-lineheight($size, $smart:true) {
|
4
|
+
@if $smart and not is-unit($size) {
|
5
|
+
@if is-percentage($size) {
|
6
|
+
@return addUnit(100+(strip($size)), %);
|
7
|
+
} @else {
|
8
|
+
@return addUnit(((($size/50)+($size))*2) + $global-line-height-guide, %);
|
9
|
+
}
|
10
|
+
} @else {
|
11
|
+
@return addUnit($size);
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/// Explode string into a list
|
2
|
+
///
|
3
|
+
/// @author Hugo Giraudel
|
4
|
+
///
|
5
|
+
/// @access public
|
6
|
+
///
|
7
|
+
/// @link https://github.com/HugoGiraudel/SassyStrings/blob/master/dist/_SassyStrings.scss
|
8
|
+
///
|
9
|
+
/// @param {string} $string - String to split
|
10
|
+
///
|
11
|
+
/// @param {string} $delimiter - string to use as a delimiter to split `$string`
|
12
|
+
///
|
13
|
+
/// @param {string} $string - The string or array being searched and replaced on
|
14
|
+
///
|
15
|
+
/// @return {List}
|
16
|
+
|
17
|
+
@function string-explode($string, $delimiter: "") {
|
18
|
+
$result: ();
|
19
|
+
$length: str-length($string);
|
20
|
+
|
21
|
+
@if str-length($delimiter) == 0 {
|
22
|
+
@for $i from 1 through $length {
|
23
|
+
$result: append($result, str-slice($string, $i, $i));
|
24
|
+
}
|
25
|
+
|
26
|
+
@return $result;
|
27
|
+
}
|
28
|
+
|
29
|
+
$running: true;
|
30
|
+
$remaining: $string;
|
31
|
+
|
32
|
+
@while $running {
|
33
|
+
$index: str-index($remaining, $delimiter);
|
34
|
+
|
35
|
+
@if $index {
|
36
|
+
$slice: str-slice($remaining, 1, $index - 1);
|
37
|
+
$result: append($result, $slice);
|
38
|
+
$remaining: str-slice($remaining, $index + str-length($delimiter));
|
39
|
+
} @else {
|
40
|
+
$running: false;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
@return append($result, $remaining);
|
45
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/// Replace 'search' with '$replace' in '$string'. Reordered parameter order to match PHP str_replace
|
2
|
+
///
|
3
|
+
/// @author Hugo Giraudel
|
4
|
+
///
|
5
|
+
/// @access public
|
6
|
+
///
|
7
|
+
/// @link https://css-tricks.com/snippets/sass/str-replace-function
|
8
|
+
///
|
9
|
+
/// @param {string} $search - The value being searched for
|
10
|
+
///
|
11
|
+
/// @param {string} $replace - The replacement value that replaces found search values
|
12
|
+
///
|
13
|
+
/// @param {string} $string - The string or array being searched and replaced on
|
14
|
+
///
|
15
|
+
/// @return {string} - Updated string
|
16
|
+
|
17
|
+
@function str-replace($string, $search, $replace:'') {
|
18
|
+
$index: str-index($string, $search);
|
19
|
+
|
20
|
+
@if $index {
|
21
|
+
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
22
|
+
}
|
23
|
+
|
24
|
+
@return $string;
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
/// @alias string-replace
|
29
|
+
///
|
30
|
+
/// @access public
|
31
|
+
///
|
32
|
+
/// @require {function} string-replace
|
33
|
+
///
|
34
|
+
/// @return {string}
|
35
|
+
|
36
|
+
@function string-replace($search, $replace:'', $string:'') {
|
37
|
+
@return str-replace($search, $replace, $string);
|
38
|
+
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
@if $reset {
|
2
|
+
|
3
|
+
// main-wrapper {essential}
|
4
|
+
// This could be compared to as a 'body' within the 'body'. It should contain all markup and not hidden content (svg's) or javascript
|
5
|
+
// This is usful if you need to hide all the content of a page or you want to blur the background for modals
|
6
|
+
body > #wrapper, body > main-wrapper {
|
7
|
+
@extend %clearfix; @include flex-container((direction:column));
|
8
|
+
position:relative;
|
9
|
+
min-height:100vh;
|
10
|
+
width:100%;
|
11
|
+
overflow: hidden;
|
12
|
+
}
|
13
|
+
|
14
|
+
// image-elemnt {essential}
|
15
|
+
// It's a common occurance to have a background image set inside a div element so there is more control over the image
|
16
|
+
// TODO: Find a way of making this custom element a singleton
|
17
|
+
image-element, gallery-image {
|
18
|
+
@extend %full; max-width:100vw; display:block;
|
19
|
+
&[style*='background-image'] {
|
20
|
+
background-size:cover;
|
21
|
+
background-repeat:none;
|
22
|
+
background-position:center 33.33%;
|
23
|
+
background-repeat:no-repeat;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
gallery-container, .gallery-container { position:relative; overflow:hidden; width:100%;
|
28
|
+
gallery-image:not(:first-of-type), .gallery-image:not(:first-of-type) { opacity:0; }
|
29
|
+
}
|
30
|
+
|
31
|
+
// main-container {optional}
|
32
|
+
// This is designed to be used to wrap the main content of the page without interfering with the html5's 'main' element.
|
33
|
+
// This is useful when you have a footer that you want to stick to the bottom of the page.
|
34
|
+
main-wrapper > main-container, .main-wrapper > .main-container {
|
35
|
+
@include flex-container((direction:column)); @include flex-grow(1);
|
36
|
+
}
|
37
|
+
|
38
|
+
// basic-container {essential}
|
39
|
+
// This sets a few basic settings for a container element. The content will be cetnered, will have no padding.
|
40
|
+
basic-container, .basic-container, .container {
|
41
|
+
@extend %clearfix;
|
42
|
+
width:100%;
|
43
|
+
max-width:$max-width;
|
44
|
+
margin-left:auto;
|
45
|
+
margin-right:auto;
|
46
|
+
position:relative;
|
47
|
+
display:block;
|
48
|
+
}
|
49
|
+
|
50
|
+
nav-container, .nav-container {
|
51
|
+
@include ani(padding-left padding-right);
|
52
|
+
padding-left:$pad;
|
53
|
+
padding-right:$pad;
|
54
|
+
@include break($medium) {
|
55
|
+
padding-left:$pad0;
|
56
|
+
padding-right:$pad0;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// smart-container {essential}
|
61
|
+
// This is essentially the same as basic-container, only has a small media query check to reduce the padding at a certain point
|
62
|
+
smart-container, .smart-container {
|
63
|
+
@extend basic-container;
|
64
|
+
@include ani(padding-left padding-right);
|
65
|
+
padding-left:$pad;
|
66
|
+
padding-right:$pad;
|
67
|
+
@include break($medium) {
|
68
|
+
padding-left:$pad0;
|
69
|
+
padding-right:$pad0;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
// This fakes the results of the smart-container without having to use a smart-container custom element.
|
74
|
+
// Useful for when you want to avoid additional markup just to position an element.
|
75
|
+
%smart-container-faux {
|
76
|
+
@extend basic-container;
|
77
|
+
width:calc(#{$max + px} - #{$pad2});
|
78
|
+
@include ani(padding-left padding-right margin-left margin-right width);
|
79
|
+
|
80
|
+
@include break($max + $padding) {
|
81
|
+
width:calc(100% - #{$pad2});
|
82
|
+
margin-left:$pad; margin-right:$pad;
|
83
|
+
}
|
84
|
+
@include break($medium) {
|
85
|
+
width:calc(100% - #{$pad});
|
86
|
+
margin-left:$pad0;
|
87
|
+
margin-right:$pad0;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
%smart-container-faux-absolute {
|
92
|
+
@extend %smart-container-faux;
|
93
|
+
@include ani(padding-left padding-right margin-left margin-right width left);
|
94
|
+
position:absolute;
|
95
|
+
left:50%;
|
96
|
+
margin-left:- $max/2 + $padding + px;
|
97
|
+
@include break($max + $padding) {
|
98
|
+
left:0;
|
99
|
+
margin-left:$pad;
|
100
|
+
}
|
101
|
+
@include break($medium) {
|
102
|
+
margin-left:$pad0;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// This also fakes the output of the smart container, only forces the fake padding to extend to the edges of the page
|
107
|
+
%smart-container-faux-stretch {
|
108
|
+
@extend basic-container;
|
109
|
+
@include break($medium) {
|
110
|
+
width:calc(100% + #{$pad2});
|
111
|
+
left:-$pad;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/// CSS cubic-bezier timing functions from Ceaser Easeing.
|
2
|
+
///
|
3
|
+
/// @link https://github.com/jhardy/compass-ceaser-easing
|
4
|
+
///
|
5
|
+
/// @access public
|
6
|
+
///
|
7
|
+
/// @type string
|
8
|
+
|
9
|
+
$linear : cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
10
|
+
$ease : cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
11
|
+
$ease-in : cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
12
|
+
$ease-out : cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
13
|
+
$ease-in-out : cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
14
|
+
|
15
|
+
$easeIn : $ease-in;
|
16
|
+
$easeOut : $ease-out;
|
17
|
+
$easeInOut : $ease-in-out;
|
18
|
+
|
19
|
+
$easeInQuad : cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
20
|
+
$easeInCubic : cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
21
|
+
$easeInQuart : cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
22
|
+
$easeInQuint : cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
23
|
+
$easeInSine : cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
24
|
+
$easeInExpo : cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
25
|
+
$easeInCirc : cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
26
|
+
$easeInBack : cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
27
|
+
|
28
|
+
$easeOutQuad : cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
29
|
+
$easeOutCubic : cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
30
|
+
$easeOutQuart : cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
31
|
+
$easeOutQuint : cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
32
|
+
$easeOutSine : cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
33
|
+
$easeOutExpo : cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
34
|
+
$easeOutCirc : cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
35
|
+
$easeOutBack : cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
36
|
+
|
37
|
+
$easeInOutQuad : cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
38
|
+
$easeInOutCubic : cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
39
|
+
$easeInOutQuart : cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
40
|
+
$easeInOutQuint : cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
41
|
+
$easeInOutSine : cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
42
|
+
$easeInOutExpo : cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
43
|
+
$easeInOutCirc : cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
44
|
+
$easeInOutBack : cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
@@ -0,0 +1,282 @@
|
|
1
|
+
@if $reset {
|
2
|
+
|
3
|
+
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
4
|
+
margin: 0;
|
5
|
+
padding: 0;
|
6
|
+
border: 0;
|
7
|
+
vertical-align: baseline;
|
8
|
+
}
|
9
|
+
|
10
|
+
/// normalize.css v4.0.0
|
11
|
+
/// @link github.com/necolas/normalize.css
|
12
|
+
html {
|
13
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
14
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
15
|
+
}
|
16
|
+
|
17
|
+
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section, summary {
|
18
|
+
display: block;
|
19
|
+
}
|
20
|
+
|
21
|
+
audio, canvas, progress, video {
|
22
|
+
display: inline-block;
|
23
|
+
}
|
24
|
+
|
25
|
+
audio:not([controls]) {
|
26
|
+
display: none;
|
27
|
+
height: 0;
|
28
|
+
}
|
29
|
+
|
30
|
+
progress {
|
31
|
+
vertical-align: baseline;
|
32
|
+
}
|
33
|
+
|
34
|
+
template, [hidden] {
|
35
|
+
display: none;
|
36
|
+
}
|
37
|
+
|
38
|
+
a { background-color: transparent; }
|
39
|
+
|
40
|
+
a:active, a:hover {
|
41
|
+
outline-width: 0;
|
42
|
+
}
|
43
|
+
|
44
|
+
abbr[title] {
|
45
|
+
border-bottom: none;
|
46
|
+
text-decoration: underline;
|
47
|
+
text-decoration: underline dotted;
|
48
|
+
}
|
49
|
+
|
50
|
+
b, strong {
|
51
|
+
font-weight: inherit;
|
52
|
+
}
|
53
|
+
|
54
|
+
b, strong {
|
55
|
+
font-weight: bolder;
|
56
|
+
}
|
57
|
+
|
58
|
+
dfn {
|
59
|
+
font-style: italic;
|
60
|
+
}
|
61
|
+
|
62
|
+
mark {
|
63
|
+
background-color: #ff0;
|
64
|
+
color: #000;
|
65
|
+
}
|
66
|
+
|
67
|
+
sub, sup {
|
68
|
+
font-size: 75%;
|
69
|
+
line-height: 0;
|
70
|
+
position: relative;
|
71
|
+
vertical-align: baseline;
|
72
|
+
}
|
73
|
+
|
74
|
+
sub {
|
75
|
+
bottom: -0.25em;
|
76
|
+
}
|
77
|
+
|
78
|
+
sup {
|
79
|
+
top: -0.5em;
|
80
|
+
}
|
81
|
+
|
82
|
+
img {
|
83
|
+
border-style: none;
|
84
|
+
max-width:100vw;
|
85
|
+
display:block;
|
86
|
+
}
|
87
|
+
|
88
|
+
code, kbd, pre, samp {
|
89
|
+
font-family: monospace, monospace; /* 1 */
|
90
|
+
font-size: 1em; /* 2 */
|
91
|
+
}
|
92
|
+
|
93
|
+
figure {
|
94
|
+
margin: 1em 40px;
|
95
|
+
}
|
96
|
+
|
97
|
+
hr {
|
98
|
+
box-sizing: content-box;
|
99
|
+
height: 0;
|
100
|
+
overflow: visible;
|
101
|
+
}
|
102
|
+
|
103
|
+
button, input, select, textarea {
|
104
|
+
font: inherit;
|
105
|
+
margin: 0;
|
106
|
+
}
|
107
|
+
|
108
|
+
optgroup {
|
109
|
+
font-weight: bold;
|
110
|
+
}
|
111
|
+
|
112
|
+
button, input, select {
|
113
|
+
overflow: visible;
|
114
|
+
}
|
115
|
+
|
116
|
+
button, select {
|
117
|
+
text-transform: none;
|
118
|
+
}
|
119
|
+
|
120
|
+
button, [type="button"], [type="reset"], [type="submit"] {
|
121
|
+
cursor: pointer;
|
122
|
+
}
|
123
|
+
|
124
|
+
[disabled] {
|
125
|
+
cursor: default;
|
126
|
+
}
|
127
|
+
|
128
|
+
button, html [type="button"], [type="reset"], [type="submit"] {
|
129
|
+
-webkit-appearance: button;
|
130
|
+
}
|
131
|
+
|
132
|
+
button::-moz-focus-inner, input::-moz-focus-inner {
|
133
|
+
border: 0;
|
134
|
+
padding: 0;
|
135
|
+
}
|
136
|
+
|
137
|
+
legend {
|
138
|
+
box-sizing: border-box;
|
139
|
+
color: inherit;
|
140
|
+
display: table;
|
141
|
+
max-width: 100%;
|
142
|
+
padding: 0;
|
143
|
+
white-space: normal;
|
144
|
+
}
|
145
|
+
|
146
|
+
textarea {
|
147
|
+
overflow: auto;
|
148
|
+
}
|
149
|
+
|
150
|
+
[type="checkbox"], [type="radio"] {
|
151
|
+
box-sizing: border-box;
|
152
|
+
padding: 0;
|
153
|
+
}
|
154
|
+
|
155
|
+
[type="number"]::-webkit-inner-spin-button,
|
156
|
+
[type="number"]::-webkit-outer-spin-button {
|
157
|
+
height: auto;
|
158
|
+
}
|
159
|
+
|
160
|
+
[type="search"] {
|
161
|
+
-webkit-appearance: textfield;
|
162
|
+
}
|
163
|
+
|
164
|
+
[type="search"]::-webkit-search-cancel-button,
|
165
|
+
[type="search"]::-webkit-search-decoration {
|
166
|
+
-webkit-appearance: none;
|
167
|
+
}
|
168
|
+
|
169
|
+
///
|
170
|
+
|
171
|
+
html { height:100%; font-size: 62.5%; }
|
172
|
+
|
173
|
+
html, body {
|
174
|
+
min-width:$minimum;
|
175
|
+
min-height:100%;
|
176
|
+
}
|
177
|
+
|
178
|
+
body {
|
179
|
+
@extend .font-default, .font1 !optional;
|
180
|
+
@include size(100%);
|
181
|
+
@include fontsize($font-size);
|
182
|
+
@include selection($selection);
|
183
|
+
}
|
184
|
+
|
185
|
+
p {
|
186
|
+
@include smart-fontsize($font-size, $font-size + 2);
|
187
|
+
margin-bottom:$pad;
|
188
|
+
&:last-of-type { margin-bottom:initial; }
|
189
|
+
&:empty { display:none; }
|
190
|
+
}
|
191
|
+
|
192
|
+
ol, ul {
|
193
|
+
list-style: none;
|
194
|
+
}
|
195
|
+
|
196
|
+
blockquote, q {
|
197
|
+
quotes: none;
|
198
|
+
&:before, &:after {
|
199
|
+
content: '';
|
200
|
+
content: none;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
table {
|
205
|
+
border-collapse: collapse;
|
206
|
+
border-spacing: 0;
|
207
|
+
}
|
208
|
+
|
209
|
+
*, *:after, *:before {
|
210
|
+
&:focus { outline:0; };
|
211
|
+
box-sizing:border-box;
|
212
|
+
-moz-box-sizing:border-box;
|
213
|
+
}
|
214
|
+
|
215
|
+
a {
|
216
|
+
text-decoration:none;
|
217
|
+
color:$text;
|
218
|
+
}
|
219
|
+
|
220
|
+
hr {
|
221
|
+
border:none;
|
222
|
+
height:1px;
|
223
|
+
background-color:$text;
|
224
|
+
margin:$pad 0;
|
225
|
+
}
|
226
|
+
|
227
|
+
strong {
|
228
|
+
font-weight:bold;
|
229
|
+
}
|
230
|
+
|
231
|
+
em {
|
232
|
+
font-style:italic;
|
233
|
+
}
|
234
|
+
|
235
|
+
address {
|
236
|
+
font-style:normal;
|
237
|
+
}
|
238
|
+
|
239
|
+
textarea {
|
240
|
+
resize:none;
|
241
|
+
}
|
242
|
+
|
243
|
+
button, input[type="button"], input[type="submit"], input[type="reset"] {
|
244
|
+
@extend %clear-button;
|
245
|
+
}
|
246
|
+
|
247
|
+
main { @include flex-container((direction:column)); @include flex-grow(1); }
|
248
|
+
|
249
|
+
select {
|
250
|
+
-webkit-appearance:none;
|
251
|
+
-webkit-border-radius:0;
|
252
|
+
border-radius:0;
|
253
|
+
border:0;
|
254
|
+
}
|
255
|
+
|
256
|
+
svg, symbol { overflow:visible; }
|
257
|
+
|
258
|
+
@include input-text() {
|
259
|
+
-webkit-appearance:none;
|
260
|
+
-webkit-border-radius:0;
|
261
|
+
border-radius:0;
|
262
|
+
border:0;
|
263
|
+
&:focus { outline:0; }
|
264
|
+
|
265
|
+
@include placeholder();
|
266
|
+
}
|
267
|
+
|
268
|
+
h1, h2, h3, h4, h5, h6 {
|
269
|
+
-webkit-margin-before:0em;
|
270
|
+
-webkit-margin-after:0em;
|
271
|
+
-webkit-margin-start:0px;
|
272
|
+
-webkit-margin-end:0px;
|
273
|
+
font-weight: normal;
|
274
|
+
}
|
275
|
+
|
276
|
+
h1{ @include smart-fontsize($h2, $h1); }
|
277
|
+
h2{ @include smart-fontsize($h3, $h2); }
|
278
|
+
h3{ @include smart-fontsize($h4, $h3); }
|
279
|
+
h4{ @include smart-fontsize($h5, $h4); }
|
280
|
+
h5{ @include smart-fontsize($h6, $h5); }
|
281
|
+
h6{ @include smart-fontsize($h6/2, $h6); }
|
282
|
+
}
|