From ef0977646e901489d9f0e66c19405aaeea18444e Mon Sep 17 00:00:00 2001 From: nirgendswo Date: Thu, 17 Aug 2017 10:35:42 +0200 Subject: [PATCH] refactoring --- package.json | 2 +- scss/_mixins.scss | 46 +++++++++++++++++++++++++++++++++++++ scss/crispyBoilerplate.scss | 4 +--- scss/mixins/_clearfix.scss | 19 --------------- scss/mixins/_font-size.scss | 22 ------------------ scss/mixins/_list.scss | 24 ------------------- 6 files changed, 48 insertions(+), 69 deletions(-) create mode 100644 scss/_mixins.scss delete mode 100644 scss/mixins/_clearfix.scss delete mode 100644 scss/mixins/_font-size.scss delete mode 100644 scss/mixins/_list.scss diff --git a/package.json b/package.json index fcc2234..fc5840f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crispy-boilerplate", - "version": "0.3.0", + "version": "0.4.0", "description": "Flat Sass Boilerplate to give you a amount of Basic Settings, Mixins and Functions", "repository": { "type": "git", diff --git a/scss/_mixins.scss b/scss/_mixins.scss new file mode 100644 index 0000000..30ecab2 --- /dev/null +++ b/scss/_mixins.scss @@ -0,0 +1,46 @@ +/** + * add font-size in px as fallback + * and in rem + * + * + * @param {px} $font-size + * + */ +@mixin font-size($font-size) { + font-size: $font-size; + font-size: pxToRem($font-size); +} + +/** + * clearfix to end floating + * + * + * + */ +@mixin clearfix() { + &::before, + &::after { + display: table; + content: ' '; + } + + &::after { + clear: both; + } +} + +/** + * clear default styles from list + * + * + */ +@mixin crispy-boilerplate-list-clear() { + list-style: none; + margin: 0; + padding: 0; + + li { + margin: 0; + padding: 0; + } +} diff --git a/scss/crispyBoilerplate.scss b/scss/crispyBoilerplate.scss index 21adec5..ed6219d 100644 --- a/scss/crispyBoilerplate.scss +++ b/scss/crispyBoilerplate.scss @@ -4,9 +4,7 @@ 'functions/units', 'functions/zIndex', - 'mixins/clearfix', - 'mixins/font-size', - 'mixins/list', + 'mixins', 'components/align', 'components/animations', diff --git a/scss/mixins/_clearfix.scss b/scss/mixins/_clearfix.scss deleted file mode 100644 index bf1317e..0000000 --- a/scss/mixins/_clearfix.scss +++ /dev/null @@ -1,19 +0,0 @@ -/** - * clearfix - * - * - * @author Björn Hase - * - */ - -@mixin clearfix() { - &::before, - &::after { - display: table; - content: ' '; - } - - &::after { - clear: both; - } -} diff --git a/scss/mixins/_font-size.scss b/scss/mixins/_font-size.scss deleted file mode 100644 index ec41acb..0000000 --- a/scss/mixins/_font-size.scss +++ /dev/null @@ -1,22 +0,0 @@ -@import - '../functions/units'; - -/** - * font-size - * - * - * @author Björn Hase - * - */ - - -/** - * add font-size with fallback - * - * @param {px} $font-size - * - */ -@mixin font-size($font-size) { - font-size: $font-size; - font-size: pxToRem($font-size); -} diff --git a/scss/mixins/_list.scss b/scss/mixins/_list.scss deleted file mode 100644 index 392ded6..0000000 --- a/scss/mixins/_list.scss +++ /dev/null @@ -1,24 +0,0 @@ -/** - * list - * - * - * @author Björn Hase - * - */ - - -/** - * clear default styles from list - * - * - */ -@mixin crispy-boilerplate-list-clear() { - list-style: none; - margin: 0; - padding: 0; - - li { - margin: 0; - padding: 0; - } -}