doggystyle 0.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.
- 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,15 @@
|
|
|
1
|
+
/// For reasons specific to Firefox (currently version 45),
|
|
2
|
+
/// SVG's require all hash symbols to be replaced with '%23'. This includes hex colours and <use> xlinks
|
|
3
|
+
/// This function will find and replace that hash symbol with the appropriate new string (which also works in other browsers)
|
|
4
|
+
///
|
|
5
|
+
/// @author Mark Notton
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @link http://stackoverflow.com/questions/28588050/how-to-use-a-hex-value-for-svg-in-firefox#answer-28588194
|
|
10
|
+
///
|
|
11
|
+
/// @return {string} - Without "#" as the first character
|
|
12
|
+
|
|
13
|
+
@function _hash-fix($string) {
|
|
14
|
+
@return if(is-first-character($string, '#'), str-replace(#{$string}, '#', '%23'), $string);
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// Convert an hexadecimal number to a decimal number
|
|
2
|
+
///
|
|
3
|
+
/// @author Hugo Giraudel
|
|
4
|
+
///
|
|
5
|
+
/// @link https://github.com/HugoGiraudel/SassyCast
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @param {string} $string - string
|
|
10
|
+
///
|
|
11
|
+
/// @param {string} $string - hexadecimal value
|
|
12
|
+
///
|
|
13
|
+
/// @return {number} - decimal number
|
|
14
|
+
|
|
15
|
+
@function helper-hex-to-dec($string){
|
|
16
|
+
$hex: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f";
|
|
17
|
+
$string: to-lower-case($string);
|
|
18
|
+
$length: str-length($string);
|
|
19
|
+
|
|
20
|
+
$dec: 0;
|
|
21
|
+
@for $i from 1 through $length {
|
|
22
|
+
$factor: 1 + ( 15 * ( $length - $i ));
|
|
23
|
+
$index: index($hex, str-slice($string, $i, $i));
|
|
24
|
+
$dec: $dec + $factor * ($index - 1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@return $dec;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// Tries to find a unit that would match a CSS length
|
|
2
|
+
///
|
|
3
|
+
/// @author Hugo Giraudel
|
|
4
|
+
///
|
|
5
|
+
/// @link https://github.com/HugoGiraudel/SassyCast
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @param {Number} $number - number
|
|
10
|
+
///
|
|
11
|
+
/// @param {String} $unit - potential unit
|
|
12
|
+
///
|
|
13
|
+
/// @return {Number} length (0 if cast failed)
|
|
14
|
+
|
|
15
|
+
@function helper-length($number, $unit) {
|
|
16
|
+
$strings: 'px' 'cm' 'mm' '%' 'ch' 'pc' 'in' 'em' 'rem' 'pt' 'pc' 'ex' 'vw' 'vh' 'vmin' 'vmax' 'deg';
|
|
17
|
+
$units: 1px 1cm 1mm 1% 1ch 1pc 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax 1deg;
|
|
18
|
+
$index: index($strings, $unit);
|
|
19
|
+
|
|
20
|
+
@if not $index {
|
|
21
|
+
@warn "Unknown unit `#{inspect($unit)}`.";
|
|
22
|
+
@return 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@return $number * nth($units, $index);
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// A smart calculation to what lightness is
|
|
2
|
+
///
|
|
3
|
+
/// @notice This could just be a variable, but for potential future minipulation I've left it as a function
|
|
4
|
+
///
|
|
5
|
+
/// @author David Halford
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @link http://codepen.io/davidhalford/pen/wlDxL?editors=1100
|
|
10
|
+
///
|
|
11
|
+
/// @return {number}
|
|
12
|
+
|
|
13
|
+
@function _lightness() {
|
|
14
|
+
@return round((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114) / 1000)/2;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// If a number can only be within a certain bounds, check it and return a max, min, or acceptable value
|
|
2
|
+
/// @author Mark Notton
|
|
3
|
+
/// @access private
|
|
4
|
+
/// @param {number} {}
|
|
5
|
+
|
|
6
|
+
@function _min-max-number($value, $min:1, $max:100) {
|
|
7
|
+
@if (is-number($value $min $max)) {
|
|
8
|
+
$value : if($value <= $min, $min, $value);
|
|
9
|
+
$value : if($value >= $max, $max, $value);
|
|
10
|
+
}
|
|
11
|
+
@return $value;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// Power function
|
|
2
|
+
///
|
|
3
|
+
/// @author Hugo Giraudel
|
|
4
|
+
///
|
|
5
|
+
/// @link https://github.com/HugoGiraudel/SassyCast
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @param {Number} $x - number
|
|
10
|
+
///
|
|
11
|
+
/// @param {Number} $n - power
|
|
12
|
+
///
|
|
13
|
+
/// @return {Number} $x ^ $n
|
|
14
|
+
|
|
15
|
+
@function helper-pow($x, $n) {
|
|
16
|
+
$ret: 1;
|
|
17
|
+
|
|
18
|
+
@if $n >= 0 {
|
|
19
|
+
@for $i from 1 through $n {
|
|
20
|
+
$ret: $ret * $x;
|
|
21
|
+
}
|
|
22
|
+
} @else {
|
|
23
|
+
@for $i from $n to 0 {
|
|
24
|
+
$ret: $ret / $x;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@return $ret;
|
|
29
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// Compares two string to determine which comes first
|
|
2
|
+
///
|
|
3
|
+
/// @author Hugo Giraudel
|
|
4
|
+
///
|
|
5
|
+
/// @link https://css-tricks.com/snippets/sass/sorting-function/
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @param {string} $a - first string
|
|
10
|
+
///
|
|
11
|
+
/// @parem {string} $b - second string
|
|
12
|
+
///
|
|
13
|
+
/// @param {list} $order - order to deal with
|
|
14
|
+
///
|
|
15
|
+
/// @return {bool}
|
|
16
|
+
|
|
17
|
+
@function _string-compare($a, $b, $order) {
|
|
18
|
+
|
|
19
|
+
@if type-of($a) == number and type-of($b) == number {
|
|
20
|
+
@return $a < $b;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
$a: to-lower-case($a + unquote(""));
|
|
24
|
+
$b: to-lower-case($b + unquote(""));
|
|
25
|
+
|
|
26
|
+
@for $i from 1 through min(str-length($a), str-length($b)) {
|
|
27
|
+
|
|
28
|
+
$char-a: str-slice($a, $i, $i);
|
|
29
|
+
$char-b: str-slice($b, $i, $i);
|
|
30
|
+
|
|
31
|
+
@if $char-a and $char-b and index($order, $char-a) != index($order, $char-b) {
|
|
32
|
+
@return index($order, $char-a) < index($order, $char-b);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@return str-length($a) < str-length($b);
|
|
38
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// Split a string into a list using a delimiter
|
|
2
|
+
///
|
|
3
|
+
/// @author Hugo Giraudel
|
|
4
|
+
///
|
|
5
|
+
/// @link https://github.com/HugoGiraudel/SassyStrings/blob/master/stylesheets/private/_str-explode.scss
|
|
6
|
+
///
|
|
7
|
+
/// @access private
|
|
8
|
+
///
|
|
9
|
+
/// @param {string} $string - string to split
|
|
10
|
+
///
|
|
11
|
+
/// @parem {string} $delimiter - string to use as a delimiter to split `$string`
|
|
12
|
+
///
|
|
13
|
+
/// @return {list}
|
|
14
|
+
|
|
15
|
+
@function _string-explode($string, $delimiter: ", ") {
|
|
16
|
+
$result: ();
|
|
17
|
+
$length: str-length($string);
|
|
18
|
+
|
|
19
|
+
@if str-length($delimiter) == 0 {
|
|
20
|
+
@for $i from 1 through $length {
|
|
21
|
+
$result: append($result, str-slice($string, $i, $i));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@return $result;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
$running: true;
|
|
28
|
+
$remaining: $string;
|
|
29
|
+
|
|
30
|
+
@while $running {
|
|
31
|
+
$index: str-index($remaining, $delimiter);
|
|
32
|
+
|
|
33
|
+
@if $index {
|
|
34
|
+
$slice: str-slice($remaining, 1, $index - 1);
|
|
35
|
+
$result: append($result, $slice);
|
|
36
|
+
$remaining: str-slice($remaining, $index + str-length($delimiter));
|
|
37
|
+
} @else {
|
|
38
|
+
$running: false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@return append($result, $remaining);
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// Check to see if the given pseduo is valid
|
|
2
|
+
///
|
|
3
|
+
/// @author Mark Notton
|
|
4
|
+
///
|
|
5
|
+
/// @access private
|
|
6
|
+
///
|
|
7
|
+
/// @require {function} is-pseudo
|
|
8
|
+
///
|
|
9
|
+
/// @return {string}
|
|
10
|
+
///
|
|
11
|
+
/// @example scss - Usage
|
|
12
|
+
/// &#{_sudo(before)} { ... }
|
|
13
|
+
///
|
|
14
|
+
/// @example scss - Output
|
|
15
|
+
/// &:before { ... }
|
|
16
|
+
|
|
17
|
+
@function _sudo($pseudo, $colon:true) {
|
|
18
|
+
@if is-pseudo($pseudo) {
|
|
19
|
+
@return if($colon, ':'+$pseudo, $pseudo);
|
|
20
|
+
} @else {
|
|
21
|
+
@return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
@charset "UTF-8"
|
|
2
|
+
|
|
3
|
+
// ← Leftwards Arrow
|
|
4
|
+
$leftwards-arrow: "\2190";
|
|
5
|
+
|
|
6
|
+
// ↑ Upwards Arrow
|
|
7
|
+
$upwards-arrow: "\2191";
|
|
8
|
+
|
|
9
|
+
// → Rightwards Arrow
|
|
10
|
+
$rightwards-arrow: "\2192";
|
|
11
|
+
|
|
12
|
+
// ↓ Downwards Arrow
|
|
13
|
+
$downwards-arrow: "\2193";
|
|
14
|
+
|
|
15
|
+
// ↔ Left Right Arrow
|
|
16
|
+
$left-right-arrow: "\2194";
|
|
17
|
+
|
|
18
|
+
// ↕ Up Down Arrow
|
|
19
|
+
$up-down-arrow: "\2195";
|
|
20
|
+
|
|
21
|
+
// ↖ North West Arrow
|
|
22
|
+
$north-west-arrow: "\2196";
|
|
23
|
+
|
|
24
|
+
// ↗ North East Arrow
|
|
25
|
+
$north-east-arrow: "\2197";
|
|
26
|
+
|
|
27
|
+
// ↘ South East Arrow
|
|
28
|
+
$south-east-arrow: "\2198";
|
|
29
|
+
|
|
30
|
+
// ↙ South West Arrow
|
|
31
|
+
$south-west-arrow: "\2199";
|
|
32
|
+
|
|
33
|
+
// ↚ Leftwards Arrow With Stroke
|
|
34
|
+
$leftwards-arrow-with-stroke: "\219A";
|
|
35
|
+
|
|
36
|
+
// ↛ Rightwards Arrow With Stroke
|
|
37
|
+
$rightwards-arrow-with-stroke: "\219B";
|
|
38
|
+
|
|
39
|
+
// ↜ Leftwards Wave Arrow
|
|
40
|
+
$leftwards-wave-arrow: "\219C";
|
|
41
|
+
|
|
42
|
+
// ↝ Rightwards Wave Arrow
|
|
43
|
+
$rightwards-wave-arrow: "\219D";
|
|
44
|
+
|
|
45
|
+
// ↞ Leftwards Two Headed Arrow
|
|
46
|
+
$leftwards-two-headed-arrow: "\219E";
|
|
47
|
+
|
|
48
|
+
// ↟ Upwards Two Headed Arrow
|
|
49
|
+
$upwards-two-headed-arrow: "\219F";
|
|
50
|
+
|
|
51
|
+
// ↠ Rightwards Two Headed Arrow
|
|
52
|
+
$rightwards-two-headed-arrow: "\21A0";
|
|
53
|
+
|
|
54
|
+
// ↡ Downwards Two Headed Arrow
|
|
55
|
+
$downwards-two-headed-arrow: "\21A1";
|
|
56
|
+
|
|
57
|
+
// ↢ Leftwards Arrow With Tail
|
|
58
|
+
$leftwards-arrow-with-tail: "\21A2";
|
|
59
|
+
|
|
60
|
+
// ↣ Rightwards Arrow With Tail
|
|
61
|
+
$rightwards-arrow-with-tail: "\21A3";
|
|
62
|
+
|
|
63
|
+
// ↤ Leftwards Arrow From Bar
|
|
64
|
+
$leftwards-arrow-from-bar: "\21A4";
|
|
65
|
+
|
|
66
|
+
// ↥ Upwards Arrow From Bar
|
|
67
|
+
$upwards-arrow-from-bar: "\21A5";
|
|
68
|
+
|
|
69
|
+
// ↦ Rightwards Arrow From Bar
|
|
70
|
+
$rightwards-arrow-from-bar: "\21A6";
|
|
71
|
+
|
|
72
|
+
// ↧ Downwards Arrow From Bar
|
|
73
|
+
$downwards-arrow-from-bar: "\21A7";
|
|
74
|
+
|
|
75
|
+
// ↨ Up Down Arrow With Base
|
|
76
|
+
$up-down-arrow-with-base: "\21A8";
|
|
77
|
+
|
|
78
|
+
// ↩ Leftwards Arrow With Hook
|
|
79
|
+
$leftwards-arrow-with-hook: "\21A9";
|
|
80
|
+
|
|
81
|
+
// ↪ Rightwards Arrow With Hook
|
|
82
|
+
$rightwards-arrow-with-hook: "\21AA";
|
|
83
|
+
|
|
84
|
+
// ↫ Leftwards Arrow With Loop
|
|
85
|
+
$leftwards-arrow-with-loop: "\21AB";
|
|
86
|
+
|
|
87
|
+
// ↬ Rightwards Arrow With Loop
|
|
88
|
+
$rightwards-arrow-with-loop: "\21AC";
|
|
89
|
+
|
|
90
|
+
// ↭ Left Right Wave Arrow
|
|
91
|
+
$left-right-wave-arrow: "\21AD";
|
|
92
|
+
|
|
93
|
+
// ↮ Left Right Arrow With Stroke
|
|
94
|
+
$left-right-arrow-with-stroke: "\21AE";
|
|
95
|
+
|
|
96
|
+
// ↯ Downwards Zigzag Arrow
|
|
97
|
+
$downwards-zigzag-arrow: "\21AF";
|
|
98
|
+
|
|
99
|
+
// ↰ Upwards Arrow With Tip Leftwards
|
|
100
|
+
$upwards-arrow-with-tip-leftwards: "\21B0";
|
|
101
|
+
|
|
102
|
+
// ↱ Upwards Arrow With Tip Rightwards
|
|
103
|
+
$upwards-arrow-with-tip-rightwards: "\21B1";
|
|
104
|
+
|
|
105
|
+
// ↲ Downwards Arrow With Tip Leftwards
|
|
106
|
+
$downwards-arrow-with-tip-leftwards: "\21B2";
|
|
107
|
+
|
|
108
|
+
// ↳ Downwards Arrow With Tip Rightwards
|
|
109
|
+
$downwards-arrow-with-tip-rightwards: "\21B3";
|
|
110
|
+
|
|
111
|
+
// ↴ Rightwards Arrow With Corner Downwards
|
|
112
|
+
$rightwards-arrow-with-corner-downwards: "\21B4";
|
|
113
|
+
|
|
114
|
+
// ↵ Downwards Arrow With Corner Leftwards
|
|
115
|
+
$downwards-arrow-with-corner-leftwards: "\21B5";
|
|
116
|
+
|
|
117
|
+
// ↶ Anticlockwise Top Semicircle Arrow
|
|
118
|
+
$anticlockwise-top-semicircle-arrow: "\21B6";
|
|
119
|
+
|
|
120
|
+
// ↷ Clockwise Top Semicircle Arrow
|
|
121
|
+
$clockwise-top-semicircle-arrow: "\21B7";
|
|
122
|
+
|
|
123
|
+
// ↸ North West Arrow To Long Bar
|
|
124
|
+
$north-west-arrow-to-long-bar: "\21B8";
|
|
125
|
+
|
|
126
|
+
// ↹ Leftwards Arrow To Bar Over Rightwards Arrow To Bar
|
|
127
|
+
$leftwards-arrow-to-bar-over-rightwards-arrow-to-bar: "\21B9";
|
|
128
|
+
|
|
129
|
+
// ↺ Anticlockwise Open Circle Arrow
|
|
130
|
+
$anticlockwise-open-circle-arrow: "\21BA";
|
|
131
|
+
|
|
132
|
+
// ↻ Clockwise Open Circle Arrow
|
|
133
|
+
$clockwise-open-circle-arrow: "\21BB";
|
|
134
|
+
|
|
135
|
+
// ↼ Leftwards Harpoon With Barb Upwards
|
|
136
|
+
$leftwards-harpoon-with-barb-upwards: "\21BC";
|
|
137
|
+
|
|
138
|
+
// ↽ Leftwards Harpoon With Barb Downwards
|
|
139
|
+
$leftwards-harpoon-with-barb-downwards: "\21BD";
|
|
140
|
+
|
|
141
|
+
// ↾ Upwards Harpoon With Barb Rightwards
|
|
142
|
+
$upwards-harpoon-with-barb-rightwards: "\21BE";
|
|
143
|
+
|
|
144
|
+
// ↿ Upwards Harpoon With Barb Leftwards
|
|
145
|
+
$upwards-harpoon-with-barb-leftwards: "\21BF";
|
|
146
|
+
|
|
147
|
+
// ⇀ Rightwards Harpoon With Barb Upwards
|
|
148
|
+
$rightwards-harpoon-with-barb-upwards: "\21C0";
|
|
149
|
+
|
|
150
|
+
// ⇁ Rightwards Harpoon With Barb Downwards
|
|
151
|
+
$rightwards-harpoon-with-barb-downwards: "\21C1";
|
|
152
|
+
|
|
153
|
+
// ⇂ Downwards Harpoon With Barb Rightwards
|
|
154
|
+
$downwards-harpoon-with-barb-rightwards: "\21C2";
|
|
155
|
+
|
|
156
|
+
// ⇃ Downwards Harpoon With Barb Leftwards
|
|
157
|
+
$downwards-harpoon-with-barb-leftwards: "\21C3";
|
|
158
|
+
|
|
159
|
+
// ⇄ Rightwards Arrow Over Leftwards Arrow
|
|
160
|
+
$rightwards-arrow-over-leftwards-arrow: "\21C4";
|
|
161
|
+
|
|
162
|
+
// ⇅ Upwards Arrow Leftwards Of Downwards Arrow
|
|
163
|
+
$upwards-arrow-leftwards-of-downwards-arrow: "\21C5";
|
|
164
|
+
|
|
165
|
+
// ⇆ Leftwards Arrow Over Rightwards Arrow
|
|
166
|
+
$leftwards-arrow-over-rightwards-arrow: "\21C6";
|
|
167
|
+
|
|
168
|
+
// ⇇ Leftwards Paired Arrows
|
|
169
|
+
$leftwards-paired-arrows: "\21C7";
|
|
170
|
+
|
|
171
|
+
// ⇈ Upwards Paired Arrows
|
|
172
|
+
$upwards-paired-arrows: "\21C8";
|
|
173
|
+
|
|
174
|
+
// ⇉ Rightwards Paired Arrows
|
|
175
|
+
$rightwards-paired-arrows: "\21C9";
|
|
176
|
+
|
|
177
|
+
// ⇊ Downwards Paired Arrows
|
|
178
|
+
$downwards-paired-arrows: "\21CA";
|
|
179
|
+
|
|
180
|
+
// ⇋ Leftwards Harpoon Over Rightwards Harpoon
|
|
181
|
+
$leftwards-harpoon-over-rightwards-harpoon: "\21CB";
|
|
182
|
+
|
|
183
|
+
// ⇌ Rightwards Harpoon Over Leftwards Harpoon
|
|
184
|
+
$rightwards-harpoon-over-leftwards-harpoon: "\21CC";
|
|
185
|
+
|
|
186
|
+
// ⇍ Leftwards Double Arrow With Stroke
|
|
187
|
+
$leftwards-double-arrow-with-stroke: "\21CD";
|
|
188
|
+
|
|
189
|
+
// ⇎ Left Right Double Arrow With Stroke
|
|
190
|
+
$left-right-double-arrow-with-stroke: "\21CE";
|
|
191
|
+
|
|
192
|
+
// ⇏ Rightwards Double Arrow With Stroke
|
|
193
|
+
$rightwards-double-arrow-with-stroke: "\21CF";
|
|
194
|
+
|
|
195
|
+
// ⇐ Leftwards Double Arrow
|
|
196
|
+
$leftwards-double-arrow: "\21D0";
|
|
197
|
+
|
|
198
|
+
// ⇑ Upwards Double Arrow
|
|
199
|
+
$upwards-double-arrow: "\21D1";
|
|
200
|
+
|
|
201
|
+
// ⇒ Rightwards Double Arrow
|
|
202
|
+
$rightwards-double-arrow: "\21D2";
|
|
203
|
+
|
|
204
|
+
// ⇓ Downwards Double Arrow
|
|
205
|
+
$downwards-double-arrow: "\21D3";
|
|
206
|
+
|
|
207
|
+
// ⇔ Left Right Double Arrow
|
|
208
|
+
$left-right-double-arrow: "\21D4";
|
|
209
|
+
|
|
210
|
+
// ⇕ Up Down Double Arrow
|
|
211
|
+
$up-down-double-arrow: "\21D5";
|
|
212
|
+
|
|
213
|
+
// ⇖ North West Double Arrow
|
|
214
|
+
$north-west-double-arrow: "\21D6";
|
|
215
|
+
|
|
216
|
+
// ⇗ North East Double Arrow
|
|
217
|
+
$north-east-double-arrow: "\21D7";
|
|
218
|
+
|
|
219
|
+
// ⇘ South East Double Arrow
|
|
220
|
+
$south-east-double-arrow: "\21D8";
|
|
221
|
+
|
|
222
|
+
// ⇙ South West Double Arrow
|
|
223
|
+
$south-west-double-arrow: "\21D9";
|
|
224
|
+
|
|
225
|
+
// ⇚ Leftwards Triple Arrow
|
|
226
|
+
$leftwards-triple-arrow: "\21DA";
|
|
227
|
+
|
|
228
|
+
// ⇛ Rightwards Triple Arrow
|
|
229
|
+
$rightwards-triple-arrow: "\21DB";
|
|
230
|
+
|
|
231
|
+
// ⇜ Leftwards Squiggle Arrow
|
|
232
|
+
$leftwards-squiggle-arrow: "\21DC";
|
|
233
|
+
|
|
234
|
+
// ⇝ Rightwards Squiggle Arrow
|
|
235
|
+
$rightwards-squiggle-arrow: "\21DD";
|
|
236
|
+
|
|
237
|
+
// ⇞ Upwards Arrow With Double Stroke
|
|
238
|
+
$upwards-arrow-with-double-stroke: "\21DE";
|
|
239
|
+
|
|
240
|
+
// ⇟ Downwards Arrow With Double Stroke
|
|
241
|
+
$downwards-arrow-with-double-stroke: "\21DF";
|
|
242
|
+
|
|
243
|
+
// ⇠ Leftwards Dashed Arrow
|
|
244
|
+
$leftwards-dashed-arrow: "\8672";
|
|
245
|
+
|
|
246
|
+
// ⇡ Upwards Dashed Arrow
|
|
247
|
+
$upwards-dashed-arrow: "\8673";
|
|
248
|
+
|
|
249
|
+
// ⇢ Rightwards Dashed Arrow
|
|
250
|
+
$rightwards-dashed-arrow: "\8674";
|
|
251
|
+
|
|
252
|
+
// ⇣ Downwards Dashed Arrow
|
|
253
|
+
$downwards-dashed-arrow: "\8675";
|
|
254
|
+
|
|
255
|
+
// ⇤ Leftwards Arrow To Bar
|
|
256
|
+
$leftwards-arrow-to-bar: "\8676";
|
|
257
|
+
|
|
258
|
+
// ⇥ Rightwards Arrow To Bar
|
|
259
|
+
$rightwards-arrow-to-bar: "\8677";
|
|
260
|
+
|
|
261
|
+
// ⇦ Leftwards White Arrow
|
|
262
|
+
$leftwards-white-arrow: "\8678";
|
|
263
|
+
|
|
264
|
+
// ⇧ Upwards White Arrow
|
|
265
|
+
$upwards-white-arrow: "\8679";
|
|
266
|
+
|
|
267
|
+
// ⇨ Rightwards White Arrow
|
|
268
|
+
$rightwards-white-arrow: "\8680";
|
|
269
|
+
|
|
270
|
+
// ⇩ Downwards White Arrow
|
|
271
|
+
$downwards-white-arrow: "\8681";
|
|
272
|
+
|
|
273
|
+
// ⇪ Upwards White Arrow From Bar
|
|
274
|
+
$upwards-white-arrow-from-bar: "\21EA";
|
|
275
|
+
|
|
276
|
+
// ⇫ Upwards White Arrow On Pedestal
|
|
277
|
+
$upwards-white-arrow-on-pedestal: "\21EB";
|
|
278
|
+
|
|
279
|
+
// ⇬ Upwards White Arrow On Pedestal With Horizontal Bar
|
|
280
|
+
$upwards-white-arrow-on-pedestal-with-horizontal-bar: "\21EC";
|
|
281
|
+
|
|
282
|
+
// ⇭ Upwards White Arrow On Pedestal With Vertical Bar
|
|
283
|
+
$upwards-white-arrow-on-pedestal-with-vertical-bar: "\21ED";
|
|
284
|
+
|
|
285
|
+
// ⇮ Upwards White Double Arrow
|
|
286
|
+
$upwards-white-double-arrow: "\21EE";
|
|
287
|
+
|
|
288
|
+
// ⇯ Upwards White Double Arrow On Pedestal
|
|
289
|
+
$upwards-white-double-arrow-on-pedestal: "\21EF";
|
|
290
|
+
|
|
291
|
+
// ⇰ Rightwards White Arrow From Wall
|
|
292
|
+
$rightwards-white-arrow-from-wall: "\21F0";
|
|
293
|
+
|
|
294
|
+
// ⇱ North West Arrow To Corner
|
|
295
|
+
$north-west-arrow-to-corner: "\21F1";
|
|
296
|
+
|
|
297
|
+
// ⇲ South East Arrow To Corner
|
|
298
|
+
$south-east-arrow-to-corner: "\21F2";
|
|
299
|
+
|
|
300
|
+
// ⇳ Up Down White Arrow
|
|
301
|
+
$up-down-white-arrow: "\21F3";
|
|
302
|
+
|
|
303
|
+
// ⇴ Right Arrow With Small Circle
|
|
304
|
+
$right-arrow-with-small-circle: "\21F4";
|
|
305
|
+
|
|
306
|
+
// ⇵ Downwards Arrow Leftwards Of Upwards Arrow
|
|
307
|
+
$downwards-arrow-leftwards-of-upwards-arrow: "\21F5";
|
|
308
|
+
|
|
309
|
+
// ⇶ Three Rightwards Arrows
|
|
310
|
+
$three-rightwards-arrows: "\21F6";
|
|
311
|
+
|
|
312
|
+
// ⇷ Leftwards Arrow With Vertical Stroke
|
|
313
|
+
$leftwards-arrow-with-vertical-stroke: "\21F7";
|
|
314
|
+
|
|
315
|
+
// ⇸ Rightwards Arrow With Vertical Stroke
|
|
316
|
+
$rightwards-arrow-with-vertical-stroke: "\21F8";
|
|
317
|
+
|
|
318
|
+
// ⇹ Left Right Arrow With Vertical Stroke
|
|
319
|
+
$left-right-arrow-with-vertical-stroke: "\21F9";
|
|
320
|
+
|
|
321
|
+
// ⇺ Leftwards Arrow With Double Vertical Stroke
|
|
322
|
+
$leftwards-arrow-with-double-vertical-stroke: "\21FA";
|
|
323
|
+
|
|
324
|
+
// ⇻ Rightwards Arrow With Double Vertical Stroke
|
|
325
|
+
$rightwards-arrow-with-double-vertical-stroke: "\21FB";
|
|
326
|
+
|
|
327
|
+
// ⇼ Left Right Arrow With Double Vertical Stroke
|
|
328
|
+
$left-right-arrow-with-double-vertical-stroke: "\21FC";
|
|
329
|
+
|
|
330
|
+
// ⇽ Leftwards Open-headed Arrow
|
|
331
|
+
$leftwards-open-headed-arrow: "\21FD";
|
|
332
|
+
|
|
333
|
+
// ⇾ Rightwards Open-headed Arrow
|
|
334
|
+
$rightwards-open-headed-arrow: "\21FE";
|
|
335
|
+
|
|
336
|
+
// ⇿ Left Right Open-headed Arrow
|
|
337
|
+
$left-right-open-headed-arrow: "\21FF";
|