diff --git a/src/scss/components/_button.scss b/src/scss/components/_button.scss index 189c8af..3563572 100644 --- a/src/scss/components/_button.scss +++ b/src/scss/components/_button.scss @@ -6,11 +6,10 @@ * */ -$crispy__button__padding: pxToEm(10px) pxToEm(25px) !default; -$crispy__button__border: 0 !default; +$crispy__button__padding: toEm(10px 25px) !default; -$crispy__button__up-margin: pxToEm(20px) !default; -$crispy__button__up-padding: pxToEm(8px) pxToEm(13px) !default; +$crispy__button__up-margin: toEm(20px) !default; +$crispy__button__up-padding: toEm(8px 13px) !default; @mixin crispy__button() { .button { @@ -22,8 +21,6 @@ $crispy__button__up-padding: pxToEm(8px) pxToEm(13px) !default; appearance: none; padding: $crispy__button__padding; - border: $crispy__button__border; - &--wide { width: 100%; } @@ -44,7 +41,6 @@ $crispy__button__up-padding: pxToEm(8px) pxToEm(13px) !default; bottom: 0; } - &:hover { cursor: pointer; text-decoration: none; @@ -54,63 +50,4 @@ $crispy__button__up-padding: pxToEm(8px) pxToEm(13px) !default; outline: none; } } - - /** - * grouping buttons - * - * - */ - .button-group { - .button { - float: left; - } - - @include crispy__clearfix(); - } -} - -/** - * adding modifications - * - */ -@mixin crispy__button__colors($colors) { - @each $name, $color in $colors { - - // default has no modification - @if ($name == 'default') { - @include crispy__button__color($color); - } - @else { - &--#{$name} { - @include crispy__button__color($color); - } - } - } -} - -/** - * adding single modification - * - */ -@mixin crispy__button__color($color) { - $background-color: false; - $text-color: false; - - @if (type-of($color) == 'map') { - @if (has-key($color, 'color')) { - $text-color: map-get($color, 'color'); - } - - @if (has-key($color, 'background-color')) { - $background-color: map-get($color, 'background-color'); - } - - color: $text-color; - background-color: $background-color; - - &:hover { - color: $text-color; - background-color: darken($background-color, 10%); - } - } } diff --git a/src/scss/components/_code.scss b/src/scss/components/_code.scss index e0f849c..3d24f4b 100644 --- a/src/scss/components/_code.scss +++ b/src/scss/components/_code.scss @@ -13,8 +13,8 @@ $crispy__code__font-size: $crispy__body__font-size !default; $crispy__code__font-family: monospace, monospace !default; -$crispy__code__padding: pxToEm(10px) pxToEm(20px) !default; -$crispy__code__margin: 0 0 pxToEm($crispy__margin) !default; +$crispy__code__padding: toEm(10px 20px) !default; +$crispy__code__margin: toEm(0 0 $crispy__margin) !default; $crispy__code__border: 1px solid #d4d4d4 !default; $crispy__code__background-color: #f9f9f9 !default; diff --git a/src/scss/components/_group.scss b/src/scss/components/_group.scss new file mode 100644 index 0000000..3df21be --- /dev/null +++ b/src/scss/components/_group.scss @@ -0,0 +1,37 @@ +/** + * group + * + * + * + * @author Björn Hase + * + */ + +$crispy__group__character: '/' !default; + +@mixin $crispy__group { + .group { + + &__section { + @include crispy__clearlist(); + } + + &--horizontal { + .group__item { + display: inline-block; + } + } + + &--divider { + .group__item { + &:after { + content: $crispy__group__character; + } + } + } + } +} diff --git a/src/scss/components/_heading.scss b/src/scss/components/_heading.scss index 96ff54f..498b87a 100644 --- a/src/scss/components/_heading.scss +++ b/src/scss/components/_heading.scss @@ -21,7 +21,7 @@ $crispy__heading__font-sizes: ( $crispy__heading__font-weight: bold !default; $crispy__heading__font-family: Arial, Helvetica, Neue Helvetica, sans-serif !default; $crispy__heading__line-height: $crispy__golden-ratio !default; -$crispy__heading__margin: 0 0 pxToEm(5px) !default; +$crispy__heading__margin: toEm(0 0 5px) !default; @mixin crispy__heading { h1, .h1, diff --git a/src/scss/components/_hero.scss b/src/scss/components/_hero.scss new file mode 100644 index 0000000..f2801c6 --- /dev/null +++ b/src/scss/components/_hero.scss @@ -0,0 +1,32 @@ +/** + * hero + * + * background-position is as default: cover + * + *
+ * + * + * @author Björn Hase + * + */ + +@mixin crispy__hero() { + .hero { + background-position: center; + background-repeat: no-repeat; + background-size: cover; + position: relative; + + &--top { + background-position: top center; + } + + &--bottom { + background-position: bottom center; + } + + &--contain { + background-size: contain; + } + } +} diff --git a/src/scss/components/_icon.scss b/src/scss/components/_icon.scss index ea5ec65..5f8d844 100644 --- a/src/scss/components/_icon.scss +++ b/src/scss/components/_icon.scss @@ -17,7 +17,7 @@ $crispy__icon__vertical-align: text-bottom !default; $crispy__icon__margin: 0 2px !default; $crispy__icon__sizes: ( - 'default': 18px, + 'default': $cripsy__font-size, 'small': 14px, 'large': 28px ) !default; diff --git a/src/scss/components/_nav.scss b/src/scss/components/_nav.scss deleted file mode 100644 index c48c768..0000000 --- a/src/scss/components/_nav.scss +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - * - * - */ - -@mixin $crispy__nav { - .nav { - - &__list { - @include crispy__clearlist(); - } - - &--horizontal { - .nav__item { - display: inline-block; - } - } - } -} diff --git a/src/scss/components/_panel.scss b/src/scss/components/_panel.scss new file mode 100644 index 0000000..999681c --- /dev/null +++ b/src/scss/components/_panel.scss @@ -0,0 +1,38 @@ +/** + * panel + * + *