diff --git a/bin/upgrade b/bin/upgrade new file mode 100755 index 0000000..1e0d0a5 --- /dev/null +++ b/bin/upgrade @@ -0,0 +1,55 @@ +#!/bin/sh + +echo "Upgrade utility working...\n" +cwd=${PWD##*/} + +if [[ $cwd = "bin" ]]; then + cd ../ +fi + +echo "Disclaimer: this utility it meant to aid in upgrading from Skeleton Sass 1.x to Skeleton Sass 2.x. If you have followed the wiki articles then please do not use this script without a clean installation of Skeleton Sass 2.x. We, AtomicPages LLC, are not responsible for any unforeseen events that arise by using this script. Please follow the prompts.\n" + +echo "Did you add the contents from _vars.scss in Skeleton Sass 1.x to _MYconfig.scss in Skeleton Sass 2.x? [y/n]" +read ans + + if [[ ($ans != "y") && ($ans != "Y") && ($ans != "YES") && ($ans != "yes") ]]; then + echo "Please copy the variables from _vars.scss and run the script again" + exit 0 + fi + +echo "Converting variable names..." + +config=$(ls | grep config) +echo "Using ${config}" + +if [[ ! $config =~ config\.(scss)$ ]]; then + echo "Global config file in root not found. Please execute bin/upgrade within the skeleton-sass directory. Current working directory is\n`pwd`" 1>&2 + exit 1 +fi + +declare -a keys +declare -a values + +# Keys need a value pair. +keys=("backgroundColor" "fontSize" "fontFamily" "fontColor" "formFont" "linkColor" "linkHoverColor" "linkDecoration" "headingFamily" "headingColor" "baseWidth" "baseColWidth" "baseGutterWidth" "isFluid" "baseColCount" "tabletWidth" "mobilePortraitWidth" "mobileLandscapeWidth") + +values=("background-color" "font-size" "font-family" "font-color" "form-font" "link-color" "link-hover" "link-decoration" "heading-family" "heading-color" "base-width" "base-col-width" "base-gutter-width" "is-fluid" "base-col-count" "tablet-width" "mobile-portrait-width" "mobile-landscape-width") + +# Both the keys and values should be the same length +length=${#keys[@]} + +for (( i=0; i<${length}; i++ )); do + sed -i '' "s/${keys[i]}/${values[i]}/g" $config +done + +echo "Launch Setup Utility now? [y/n]" +read ans + +if [[ ($ans != "n") && ($ans != "N") && ($ans != "no") && ($ans != "No") && ($ans != "NO") ]]; then + bin/setup.sh + echo "Upgrade and Setup is complete!" + exit 0 +fi + +echo "Upgrade is complete! Rename _MYconfig.scss to a different name and import that file into core/_config.scss" +exit 0 diff --git a/bower.json b/bower.json index b7a102b..b4017b5 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ } ], "ignore": [ - "demo", - "flavors/sass/dev" + ".gitignore", + "sache.json" ] } diff --git a/core/_functions.scss b/core/_functions.scss new file mode 100644 index 0000000..7ce7bcf --- /dev/null +++ b/core/_functions.scss @@ -0,0 +1,94 @@ +// Public functions that can be used globally. Have at it! + +@import "dependencies"; // Don't remove me + +// addresses https://github.com/nex3/sass/issues/533 +// number strip-units ( number $number ) +@if(not function-exists(strip-units)) { + @function strip-units($number) { + @return $number / ($number * 0 + 1); + } +} + +// to determine the unit. If it's a percentage, then our equation changes. +@if(not function-exists(em)) { + @function em($px, $base: $base-font-size) { + @return _calcRU($px, $base, "em"); + } +} + +@if(not function-exists(rem)) { + @function rem($px, $base: $base-font-size) { + @return _calcRU($px, $base, "rem"); + } +} + +@if(not function-exists(precent)) { + @function percent($px, $base: $base-font-size) { + @return _calcRU($px, $base, "%"); + } +} + +@if(function-exists(relative)) { + @function relative($size) { + @if($use-rem == true and $use-em == false and $use-percent == false) { + @return rem($size); + } @elseif($use-em == true and $use-rem == false and $use-percent == false) { + @return em($size); + } @elseif($use-percent == true and $use-rem == false and $use-em == false) { + @return percent($size); + } + + @return $size; // we're still using pixels + } +} + +// list triad ( color $color ) +@if(function-exists(triad)) { + @function triad($color) { + @if(type-of($color) != "color") { + @warn "Type must be color to continue. Aborting."; + @return null; + } + + $triad: (); + $hue: strip-units(hue($color)); + + @for $i from 1 through 3 { + @if($hue + 120 > 360) { + $hue: ($hue + 120) - 360; + } @else { + $hue: $hue + 120; + } + $color: hsl($hue, saturation($color), lightness($color)); + $triad: append($triad, $color); + } + + @return $triad; + } +} + +// list square ( color $color ) +@if(not function-exists(square)) { + @function square($color) { + @if(type-of($color) != "color") { + @warn "Type must be color to continue. Aborting."; + @return null; + } + + $square: (); + $hue: strip-units(hue($color)); + + @for $i from 1 through 4 { + @if($hue + 90 > 360) { + $hue: ($hue + 90) - 360; + } @else { + $hue: $hue + 90; + } + $color: hsl($hue, saturation($color), lightness($color)); + $square: append($square, $color); + } + + @return $square; + } +} diff --git a/sache.json b/sache.json new file mode 100644 index 0000000..b71f4d1 --- /dev/null +++ b/sache.json @@ -0,0 +1,16 @@ +{ + "name": "skeleton-sass", + "description": "Description of project", + "tags": [ + "starting-point", + "foundation", + "framework", + "responsive", + "bower", + "starter kit", + "grids", + "ui" + ], + "website": "http://atomicpages.github.io/skeleton-sass/", + "docs": "https://github.com/atomicpages/skeleton-sass/wiki" +} diff --git a/skeleton/sphenoid/_base.scss b/skeleton/sphenoid/_base.scss index 0372c3f..bf50621 100644 --- a/skeleton/sphenoid/_base.scss +++ b/skeleton/sphenoid/_base.scss @@ -155,8 +155,8 @@ ol ol, ol ul { } font-size: 90%; } -ul ul li, ul ol li, -ol ol li, ol ul li { margin-bottom: relative(6px); } +ul ul li, ul ol li, +ol ol li, ol ul li { margin-bottom: relative(6px); } li { line-height: relative(18px); margin-bottom: relative(12px);