yummacss 0.1.1

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.
@@ -0,0 +1,51 @@
1
+ // color pallete
2
+ $base-colors: (
3
+ "red": #f26d50,
4
+ "orange": #f68e55,
5
+ "yellow": #fff467,
6
+ "green": #3bb878,
7
+ "teal": #1abbb4,
8
+ "aqua": #00bff3,
9
+ "blue": #438cca,
10
+ "violet": #855fa8,
11
+ "magenta": #a863a8,
12
+ "pink": #f06ea9,
13
+ "gray": #999999,
14
+ "black": black,
15
+ "white": white,
16
+ );
17
+
18
+ // arragement
19
+ $base-columns: 1;
20
+
21
+ // directions
22
+ $base-direction: 1px;
23
+
24
+ // borders
25
+ $base-border-thickness: 1px;
26
+ $base-border: 1px;
27
+ $base-border-radius: 8px;
28
+
29
+ // effect
30
+ $base-box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.1);
31
+
32
+ // typography
33
+ $base-font-size: 1rem;
34
+ $font-size-sm: $base-font-size * 0.75;
35
+ $font-size-md: $base-font-size * 1.75;
36
+ $font-size-lg: $base-font-size * 2;
37
+ $font-size-xlg: $base-font-size * 3;
38
+
39
+ // grid
40
+ $base-column-gap: 0.25rem;
41
+ $base-row-gap: 0.25rem;
42
+ $base-template-columns: 0.25rem;
43
+ $base-template-rows: 0.25rem;
44
+
45
+ // size
46
+ $base-height: 0.25rem;
47
+ $base-width: 0.25rem;
48
+
49
+ // space
50
+ $base-padding: 0.75rem;
51
+ $base-margin: 0.75rem;
@@ -0,0 +1,34 @@
1
+ @use 'sass:math';
2
+
3
+ @mixin badge($bg-color: map-get($base-colors, "blue")) {
4
+ border-radius: $base-border-radius * 4;
5
+ background-color: $bg-color;
6
+ padding: math.div($base-padding, 4) math.div($base-padding, 2);
7
+ font-size: $font-size-sm;
8
+ font-weight: normal;
9
+ }
10
+
11
+ .badge {
12
+ @include badge;
13
+ }
14
+
15
+ @each $k,
16
+ $v in $base-colors {
17
+ .badge-#{$k} {
18
+ @include badge($v);
19
+ }
20
+
21
+ @if($v !=black and $v !=white) {
22
+ @for $i from 1 through 6 {
23
+ .badge-l-#{$k}-#{$i} {
24
+ @include badge(mix(white, $v, $i * 10%));
25
+ }
26
+ }
27
+
28
+ @for $i from 1 through 6 {
29
+ .badge-d-#{$k}-#{$i} {
30
+ @include badge(mix(black, $v, $i * 10%));
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,65 @@
1
+ @mixin btn($bg-color: #e2e2e2) {
2
+ text-decoration: none;
3
+ cursor: pointer;
4
+ display: inline-block;
5
+ border: 0;
6
+ padding: $base-padding $base-padding * 2;
7
+ border-radius: $base-border-radius;
8
+ background-color: $bg-color;
9
+ }
10
+
11
+ .btn {
12
+ @include btn;
13
+ }
14
+
15
+ @each $k,
16
+ $v in $base-colors {
17
+ .btn-#{$k} {
18
+ @include btn($v);
19
+
20
+ &:hover {
21
+ background-color: lighten($v, 5);
22
+ }
23
+ }
24
+
25
+ @if($v !=black and $v !=white) {
26
+ @for $i from 1 through 6 {
27
+ .btn-l-#{$k}-#{$i} {
28
+ @include btn(mix(white, $v, $i * 10%));
29
+
30
+ &:hover {
31
+ background-color: lighten($v, 25%);
32
+ }
33
+ }
34
+ }
35
+
36
+ @for $i from 1 through 6 {
37
+ .btn-d-#{$k}-#{$i} {
38
+ @include btn(mix(black, $v, $i * 10%));
39
+
40
+ &:hover {
41
+ background-color: darken($v, 25%);
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ .btn-otl-#{$k} {
48
+ @include btn(#fff);
49
+ border: $base-border-thickness solid $v;
50
+
51
+ &:hover {
52
+ background-color: $v;
53
+ }
54
+ }
55
+
56
+ .btn-cmp-#{$k} {
57
+ @include btn($v);
58
+ color: light-comp($v);
59
+
60
+ &:hover {
61
+ color: $v;
62
+ background-color: light-comp($v);
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,23 @@
1
+ @use 'sass:math';
2
+
3
+ .card {
4
+ display: block;
5
+ padding: $base-padding;
6
+ border: $base-border-thickness solid #ddd;
7
+ box-shadow: $base-box-shadow;
8
+ border-radius: math.div($base-border-radius, 2);
9
+
10
+ .card-t {
11
+ font-size: $base-font-size;
12
+ padding-bottom: $base-padding;
13
+ font-weight: bold;
14
+ }
15
+
16
+ .card-b {
17
+ font-size: $base-font-size;
18
+ }
19
+
20
+ a {
21
+ text-decoration: underline;
22
+ }
23
+ }
@@ -0,0 +1,29 @@
1
+ %flex-layout {
2
+ width: 100%;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .nav {
10
+ @extend %flex-layout;
11
+ padding: $base-padding $base-padding * 2;
12
+ box-shadow: $base-box-shadow;
13
+
14
+ .nav-l {
15
+ font-size: $font-size-lg;
16
+ }
17
+
18
+ .cnn {
19
+ @extend %flex-layout;
20
+ }
21
+ }
22
+
23
+ @each $k,
24
+ $v in $base-colors {
25
+ .nav-#{$k} {
26
+ @extend .nav;
27
+ background-color: $v;
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ // functions & variables
2
+ @import 'functions';
3
+ @import 'variables';
4
+
5
+ // base, layouts & breakpoints
6
+ @import 'base';
7
+ @import 'breakpoints';
8
+ @import 'grid';
9
+
10
+ // colors
11
+ @import 'colors';
12
+
13
+ // components
14
+ @import 'components/card';
15
+ @import 'components/button';
16
+ @import 'components/navbar';
17
+ @import 'components/badge';
18
+
19
+ // utilities
20
+ @import 'utilities';