Browse Source

adding icon sizes

change dir
master
nirgendswo 7 years ago
parent
commit
f64548574a
17 changed files with 122 additions and 29 deletions
  1. +1
    -1
      package.json
  2. +0
    -28
      scss/components/_icon.scss
  3. +19
    -0
      src/_mixins.scss
  4. +0
    -0
      src/components/_align.scss
  5. +0
    -0
      src/components/_animation.scss
  6. +0
    -0
      src/components/_body.scss
  7. +0
    -0
      src/components/_button.scss
  8. +0
    -0
      src/components/_heading.scss
  9. +102
    -0
      src/components/_icon.scss
  10. +0
    -0
      src/components/_list.scss
  11. +0
    -0
      src/components/_margin.scss
  12. +0
    -0
      src/components/_normalize.scss
  13. +0
    -0
      src/components/_text-colors.scss
  14. +0
    -0
      src/crispyBoilerplate.scss
  15. +0
    -0
      src/example.scss
  16. +0
    -0
      src/functions/_units.scss
  17. +0
    -0
      src/functions/_zIndex.scss

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "crispy-boilerplate", "name": "crispy-boilerplate",
"version": "0.6.0",
"version": "0.7.0",
"description": "Flat Sass Boilerplate to give you a amount of Basic Settings, Mixins and Functions", "description": "Flat Sass Boilerplate to give you a amount of Basic Settings, Mixins and Functions",
"repository": { "repository": {
"type": "git", "type": "git",


+ 0
- 28
scss/components/_icon.scss View File

@ -1,28 +0,0 @@
/**
* icon
*
* use svg as icon
*
* <svg class="icon">
* <use src="#"></use>
* </svg>
*
*
* @author Björn Hase
*
*/
$icon__vertical-align: middle !default;
$icon__margin: 0 2px !default;
@mixin crispy-boilerplate-icon() {
.icon {
display: inline-block;
position: relative;
vertical-align: $icon__vertical-align;
margin: $icon__margin;
@content;
}
}

scss/_mixins.scss → src/_mixins.scss View File

@ -11,6 +11,25 @@
font-size: pxToRem($font-size); font-size: pxToRem($font-size);
} }
/**
* add modificators for font-size from a map
*
*
* @param {map} $font-sizes
*
*/
@mixin font-sizes($font-sizes) {
@each $name, $font-size in $font-sizes {
@if ($name == 'default') {
@include font-size($font-size);
} @else {
&--#{$name} {
@include font-size($font-size);
}
}
}
}
/** /**
* clearfix to end floating * clearfix to end floating
* *

scss/components/_align.scss → src/components/_align.scss View File


scss/components/_animation.scss → src/components/_animation.scss View File


scss/components/_body.scss → src/components/_body.scss View File


scss/components/_button.scss → src/components/_button.scss View File


scss/components/_heading.scss → src/components/_heading.scss View File


+ 102
- 0
src/components/_icon.scss View File

@ -0,0 +1,102 @@
/**
* icon
*
* use svg as icon
*
* <svg class="icon">
* <use src="#"></use>
* </svg>
*
*
* @author Björn Hase
*
*/
$icon__vertical-align: middle !default;
$icon__margin: 0 2px !default;
// width & height
$icon__sizes: (
'default': 18px,
'small': 14px,
'large': 28px
) !default;
// colors
$icon__colors: (
'default' : black,
'secondary' : grey,
) !default;
@mixin crispy-boilerplate-icon() {
.icon {
display: inline-block;
position: relative;
vertical-align: $icon__vertical-align;
margin: $icon__margin;
@content;
}
}
/**
* add modificators for icons as fill from map
*
*
* @param {map} $colors
*
*/
@mixin crispy-boilerplate-icon-colors($colors) {
@each $name, $color in $colors {
@if ($name == 'default') {
@include crispy-boilerplate-icon-color($color);
} @else {
&--#{$name} {
@include crispy-boilerplate-icon-color($color);
}
}
}
}
/**
* add color as fill
*
*
* @param {color} $color
*
*/
@mixin crispy-boilerplate-icon-color($color) {
fill: $color;
}
/**
* adding sizes for icons from map
*
*
* @param {map} $sizes
*
*/
@mixin crispy-boilerplate-icon-sizes($sizes) {
@each $name, $size in $sizes {
@if ($name == 'default') {
@include crispy-boilerplate-icon-size($size);
} @else {
&--#{$name} {
@include crispy-boilerplate-icon-size($size);
}
}
}
}
/**
* add size for icon as width and height
*
*
* @param {px} $size
*
*/
@mixin crispy-boilerplate-icon-size($size) {
width: $size;
height: $size;
}

scss/components/_list.scss → src/components/_list.scss View File


scss/components/_margin.scss → src/components/_margin.scss View File


scss/components/_normalize.scss → src/components/_normalize.scss View File


scss/components/_text-colors.scss → src/components/_text-colors.scss View File


scss/crispyBoilerplate.scss → src/crispyBoilerplate.scss View File


scss/example.scss → src/example.scss View File


scss/functions/_units.scss → src/functions/_units.scss View File


scss/functions/_zIndex.scss → src/functions/_zIndex.scss View File


Loading…
Cancel
Save