@iris.interactive/handcook 5.0.2 → 5.0.3

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Welcome to HandCook 👨‍🍳
2
- ![Version](https://img.shields.io/badge/version-5.0.2-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-5.0.3-blue.svg?cacheSeconds=2592000)
3
3
  ![Prerequisite](https://img.shields.io/badge/node-%3E%3D%2012.14.0-blue.svg)
4
4
  [![License: UNLICENSED](https://img.shields.io/badge/License-UNLICENSED-yellow.svg)](#)
5
5
  [![Twitter: captain\_iris](https://img.shields.io/twitter/follow/captain\_iris.svg?style=social)](https://twitter.com/captain\_iris)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -41,4 +41,37 @@
41
41
  @function clamp-size( $min, $value, $max) {
42
42
  $val: vw-size($value);
43
43
  @return clamp(#{$min}, #{$val}, #{$max});
44
+ }
45
+
46
+ /* Text icon
47
+ /* ============================================= */
48
+ @mixin text-icon($icon: '', $format: '', $alignment: '', $icon-position: before) {
49
+ display: inline-flex;
50
+ align-items: center;
51
+
52
+ &:before {
53
+ margin-right: 5px;
54
+ }
55
+
56
+ // If icon after
57
+ &:after {
58
+ margin-left: 5px;
59
+ }
60
+
61
+ @if $format == 'meta' {
62
+ font-size: #{$meta-font-size--rem};
63
+ line-height: 1.2;
64
+ }
65
+
66
+ @if $icon != '' {
67
+ &:#{$icon-position} {
68
+ color: #{$icon-color};
69
+ @include fi(#{$icon});
70
+ }
71
+ }
72
+
73
+ // Start or end
74
+ @if $alignment != '' {
75
+ align-items: flex-#{$alignment};
76
+ }
44
77
  }