@nulllogic/scssleon 1.0.2 → 1.0.31

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nulllogic/scssleon",
3
- "description": "Most advanced responsive front-end SCSS framework",
4
- "version": "1.0.2",
3
+ "description": "Most advanced, simple and clean SCSS framework",
4
+ "version": "1.0.31",
5
5
  "version_short": "1.0",
6
6
  "keywords": [
7
7
  "css",
@@ -11,7 +11,8 @@
11
11
  "front-end",
12
12
  "css-framework",
13
13
  "framework",
14
- "web"
14
+ "web",
15
+ "scssleon"
15
16
  ],
16
17
  "scripts": {
17
18
  "css": "npm run css-compile",
@@ -26,17 +27,16 @@
26
27
  "sass": "^1.77.8",
27
28
  "clean-css": "^5.3.3"
28
29
  },
29
- "homepage": "https://nulllogic.github.io/scssleon",
30
- "main": ".babelrc.js",
30
+ "homepage": "https://nulllogic.github.io/scssleon-docs",
31
31
  "style": "dist/scssleon.css",
32
32
  "sass": "scss/scssleon.scss",
33
33
  "repository": {
34
34
  "type": "git",
35
35
  "url": "git+https://github.com/nulllogic/scssleon.git"
36
36
  },
37
- "author": "Vladimir Lukyanov",
37
+ "author": "NullLogic",
38
38
  "license": "MIT",
39
39
  "bugs": {
40
40
  "url": "https://github.com/nulllogic/scssleon/issues"
41
41
  }
42
- }
42
+ }
@@ -12,4 +12,4 @@
12
12
  $config: nil !default;
13
13
  $theme: nil !default;
14
14
 
15
- @include mixins.generate-component("loader", "loader", $config, $theme);
15
+ @include mixins.generate-component("loader", "loader", $config, $theme);
@@ -11,5 +11,4 @@
11
11
  $config: nil !default;
12
12
  $theme: nil !default;
13
13
 
14
- @include mixins.generate-component("nav", "nav", $config, $theme);
15
-
14
+ @include mixins.generate-component("nav", "nav", $config, $theme);
@@ -12,5 +12,4 @@
12
12
  $config: nil !default;
13
13
  $theme: nil !default;
14
14
 
15
- @include mixins.generate-component("navbar", "navbar", $config, $theme);
16
-
15
+ @include mixins.generate-component("navbar", "navbar", $config, $theme);
@@ -31,3 +31,4 @@ $theme: nil !default;
31
31
  -webkit-mask-position: -200% 0;
32
32
  }
33
33
  }
34
+
@@ -2,32 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $is_shadow_enabled: functions.get-config($config, 'shadow');
12
- $is_border_radius_enabled: functions.get-config($config, 'border-radius');
13
-
14
- $label-component: functions.get-theme($theme, 'components.form.checkbox');
15
-
16
- .checkbox {
17
- @include mixins.generate-properties('checkbox', $label-component, $config);
18
-
19
- background: var(--#{$prefix}-select-background);
20
- color: var(--#{$prefix}-select-color);
21
- padding: var(--#{$prefix}-select-padding);
22
- border: var(--#{$prefix}-select-border);
23
-
24
- @if($is_border_radius_enabled) {
25
- @include mixins.border-radius(var(--#{$prefix}-select-border-radius));
26
- }
27
-
28
- @if($is_shadow_enabled) {
29
- @include mixins.box-shadow(var(--#{$prefix}-select-box-shadow));
30
- }
31
-
32
- }
33
-
9
+ @include mixins.generate-component(
10
+ "form.checkbox",
11
+ "checkbox",
12
+ $config,
13
+ $theme
14
+ );
@@ -1,121 +1,14 @@
1
- //
2
- // Base styles
3
- //
1
+ @use '../themes/default' as theme;
2
+ @use '../functions' as functions;
3
+ @use '../mixins' as mixins;
4
4
 
5
- .input-group {
6
- // position: relative;
7
- // display: flex;
8
- // flex-wrap: wrap; // For form validation feedback
9
- // align-items: stretch;
10
- // width: 100%;
11
- //
12
- // > .form-control,
13
- // > .form-select {
14
- // position: relative; // For focus state's z-index
15
- // flex: 1 1 auto;
16
- // width: 1%;
17
- // min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
18
- // }
19
- //
20
- // // Bring the "active" form control to the top of surrounding elements
21
- // > .form-control:focus,
22
- // > .form-select:focus {
23
- // z-index: 3;
24
- // }
25
- //
26
- // // Ensure buttons are always above inputs for more visually pleasing borders.
27
- // // This isn't needed for `.input-group-text` since it shares the same border-color
28
- // // as our inputs.
29
- // .btn {
30
- // position: relative;
31
- // z-index: 2;
32
- //
33
- // &:focus {
34
- // z-index: 3;
35
- // }
36
- // }
37
- //}
38
- //
39
- //
40
- //// Textual addons
41
- ////
42
- //// Serves as a catch-all element for any text or radio/checkbox input you wish
43
- //// to prepend or append to an input.
44
- //
45
- //.input-group-text {
46
- // display: flex;
47
- // align-items: center;
48
- // padding: $input-group-addon-padding-y $input-group-addon-padding-x;
49
- // font-size: $input-font-size; // Match inputs
50
- // font-weight: $input-group-addon-font-weight;
51
- // line-height: $input-line-height;
52
- // color: $input-group-addon-color;
53
- // text-align: center;
54
- // white-space: nowrap;
55
- // background-color: $input-group-addon-bg;
56
- // border: $input-border-width solid $input-group-addon-border-color;
57
- // @include border-radius($input-border-radius);
58
- //}
59
- //
60
- //
61
- //// Sizing
62
- ////
63
- //// Remix the default form control sizing classes into new ones for easier
64
- //// manipulation.
65
- //
66
- //.input-group-lg > .form-control,
67
- //.input-group-lg > .form-select,
68
- //.input-group-lg > .input-group-text,
69
- //.input-group-lg > .btn {
70
- // padding: $input-padding-y-lg $input-padding-x-lg;
71
- // font-size: $input-font-size-lg;
72
- // @include border-radius($input-border-radius-lg);
73
- //}
74
- //
75
- //.input-group-sm > .form-control,
76
- //.input-group-sm > .form-select,
77
- //.input-group-sm > .input-group-text,
78
- //.input-group-sm > .btn {
79
- // padding: $input-padding-y-sm $input-padding-x-sm;
80
- // font-size : $input-font-size-sm;
81
- // @include border-radius($input-border-radius-sm);
82
- //}
83
- //
84
- //.input-group-lg > .form-select,
85
- //.input-group-sm > .form-select {
86
- // padding-right: $form-select-padding-x + $form-select-indicator-padding;
87
- //}
88
- //
89
- //
90
- //// Rounded corners
91
- ////
92
- //// These rulesets must come after the sizing ones to properly override sm and lg
93
- //// border-radius values when extending. They're more specific than we'd like
94
- //// with the `.input-group >` part, but without it, we cannot override the sizing.
95
- //
96
- //// stylelint-disable-next-line no-duplicate-selectors
97
- //.input-group {
98
- // &:not(.has-validation) {
99
- // > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
100
- // > .dropdown-toggle:nth-last-child(n + 3) {
101
- // @include border-end-radius(0);
102
- // }
103
- // }
104
- //
105
- // &.has-validation {
106
- // > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu),
107
- // > .dropdown-toggle:nth-last-child(n + 4) {
108
- // @include border-end-radius(0);
109
- // }
110
- // }
111
- //
112
- // $validation-messages: "";
113
- // @each $state in map-keys($form-validation-states) {
114
- // $validation-messages: $validation-messages + ":not(." + unquote($state) + "-tooltip)" + ":not(." + unquote($state) + "-feedback)";
115
- // }
116
- //
117
- // > :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
118
- // margin-left: -$input-border-width;
119
- // @include border-start-radius(0);
120
- // }
121
- }
5
+ /* SCSS variables definition requirement */
6
+ $config: nil !default;
7
+ $theme: nil !default;
8
+
9
+ @include mixins.generate-component(
10
+ "form.input-group",
11
+ "input-group",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,33 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $is_shadow_enabled: functions.get-config($config, 'shadow');
12
- $is_border_radius_enabled: functions.get-config($config, 'border-radius');
13
-
14
- $label-component: functions.get-theme($theme, 'components.form.input');
15
-
16
- .input {
17
- @include mixins.generate-properties('input', $label-component, $config);
18
-
19
- background: var(--#{$prefix}-input-background);
20
- color: var(--#{$prefix}-input-color);
21
- padding: var(--#{$prefix}-input-padding);
22
- border: var(--#{$prefix}-input-border);
23
-
24
- @if($is_border_radius_enabled) {
25
- @include mixins.border-radius(var(--#{$prefix}-input-border-radius));
26
- }
27
-
28
- @if($is_shadow_enabled) {
29
- @include mixins.box-shadow(var(--#{$prefix}-input-box-shadow));
30
- }
31
-
32
-
33
- }
34
-
9
+ @include mixins.generate-component(
10
+ "form.input",
11
+ "input",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,14 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $label-component: functions.get-theme($theme, 'components.form.label');
12
-
13
- .label {
14
- @include mixins.generate-properties('label', $label-component, $config);
15
- }
9
+ @include mixins.generate-component(
10
+ "form.label",
11
+ "label",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,33 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $is_shadow_enabled: functions.get-config($config, 'shadow');
12
- $is_border_radius_enabled: functions.get-config($config, 'border-radius');
13
-
14
- $label-component: functions.get-theme($theme, 'components.form.radio');
15
-
16
- .radio {
17
- @include mixins.generate-properties('radio', $label-component, $config);
18
-
19
- background: var(--#{$prefix}-select-background);
20
- color: var(--#{$prefix}-select-color);
21
- padding: var(--#{$prefix}-select-padding);
22
- border: var(--#{$prefix}-select-border);
23
-
24
- @if($is_border_radius_enabled) {
25
- @include mixins.border-radius(var(--#{$prefix}-select-border-radius));
26
- }
27
-
28
- @if($is_shadow_enabled) {
29
- @include mixins.box-shadow(var(--#{$prefix}-select-box-shadow));
30
- }
31
-
32
- }
33
-
34
-
9
+ @include mixins.generate-component(
10
+ "form.radio",
11
+ "radio",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,6 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
9
+ @include mixins.generate-component(
10
+ "form.range",
11
+ "range",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,33 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $is_shadow_enabled: functions.get-config($config, 'shadow');
12
- $is_border_radius_enabled: functions.get-config($config, 'border-radius');
13
-
14
- $label-component: functions.get-theme($theme, 'components.form.select');
15
-
16
- .select {
17
- @include mixins.generate-properties('select', $label-component, $config);
18
-
19
- background: var(--#{$prefix}-select-background);
20
- color: var(--#{$prefix}-select-color);
21
- padding: var(--#{$prefix}-select-padding);
22
- border: var(--#{$prefix}-select-border);
23
- appearance: none;
24
- -webkit-appearance: none;
25
-
26
- @if($is_border_radius_enabled) {
27
- @include mixins.border-radius(var(--#{$prefix}-select-border-radius));
28
- }
29
-
30
- @if($is_shadow_enabled) {
31
- @include mixins.box-shadow(var(--#{$prefix}-select-box-shadow));
32
- }
33
-
34
- }
9
+ @include mixins.generate-component(
10
+ "form.select",
11
+ "select",
12
+ $config,
13
+ $theme
14
+ );
@@ -2,17 +2,13 @@
2
2
  @use '../functions' as functions;
3
3
  @use '../mixins' as mixins;
4
4
 
5
+ /* SCSS variables definition requirement */
5
6
  $config: nil !default;
6
7
  $theme: nil !default;
7
8
 
8
- $prefix: functions.get-config($config, 'prefix');
9
- $color_scheme: functions.get-config($config, 'color-scheme');
10
-
11
- $is_shadow_enabled: functions.get-config($config, 'shadow');
12
- $is_border_radius_enabled: functions.get-config($config, 'border-radius');
13
-
14
- $label-component: functions.get-theme($theme, 'components.form.input');
15
-
16
- .switch {
17
-
18
- }
9
+ @include mixins.generate-component(
10
+ "form.switch",
11
+ "switch",
12
+ $config,
13
+ $theme
14
+ );
@@ -1,12 +1,14 @@
1
- // Form validation
2
- //
3
- // Provide feedback to users when form field values are valid or invalid. Works
4
- // primarily for client-side validation via scoped `:invalid` and `:valid`
5
- // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
6
- // server-side validation.
1
+ @use '../themes/default' as theme;
2
+ @use '../functions' as functions;
3
+ @use '../mixins' as mixins;
7
4
 
8
- // scss-docs-start form-validation-states-loop
9
- //@each $state, $data in $form-validation-states {
10
- // @include form-validation-state($state, $data...);
11
- //}
12
- // scss-docs-end form-validation-states-loop
5
+ /* SCSS variables definition requirement */
6
+ $config: nil !default;
7
+ $theme: nil !default;
8
+
9
+ @include mixins.generate-component(
10
+ "form.validation",
11
+ "validation",
12
+ $config,
13
+ $theme
14
+ );
@@ -8,30 +8,36 @@
8
8
  @mixin generate-css-properties($tag, $property, $value, $config) {
9
9
  $prefix: functions.get-config($config, "prefix");
10
10
 
11
- --#{$prefix}-#{$tag}-#{functions.str-replace($property, '--', '')}: #{meta.inspect(
11
+ & {
12
+ --#{$prefix}-#{$tag}-#{functions.str-replace($property, '--', '')}: #{meta.inspect(
12
13
  $value
13
14
  )};
15
+ }
14
16
  }
15
17
 
16
18
  @mixin generate-css-variables($tag, $property, $value, $config) {
17
19
  $prefix: functions.get-config($config, "prefix");
18
20
 
19
21
  @if (meta.type-of($value) == "string" and str-index($value, "var(--") == 1) {
20
- #{$property}: #{meta.inspect(
22
+ & {
23
+ #{$property}: #{meta.inspect(
21
24
  functions.str-replace($value, "--", "--" + $prefix + "-" + $tag + "-")
22
25
  )};
23
- } @else if
24
- (type-of($value) == "string" and str-index($value, "var(global(") == 1)
25
- {
26
- #{$property}: #{meta.inspect(
26
+ }
27
+ } @else if (type-of($value) == "string" and str-index($value, "var(global(") == 1) {
28
+ & {
29
+ #{$property}: #{meta.inspect(
27
30
  functions.str-replace(
28
31
  string.slice($value, 0, string.length($value) - 1),
29
32
  "global(--",
30
33
  "--" + $prefix + "-root-"
31
34
  )
32
35
  )};
36
+ }
33
37
  } @else {
34
- #{$property}: #{meta.inspect($value)};
38
+ & {
39
+ #{$property}: #{meta.inspect($value)};
40
+ }
35
41
  }
36
42
  }
37
43
 
@@ -39,15 +45,15 @@
39
45
  $prefix: functions.get-config($config, "prefix");
40
46
 
41
47
  @each $color, $color-properties in $value {
42
- @each $scheme
43
- in functions.str-split(functions.get-config($config, "color-scheme"), " ")
44
- {
48
+ @each $scheme in functions.str-split(functions.get-config($config, "color-scheme"), " ") {
45
49
  @if $scheme == $color {
46
50
  @include mixin.generate-color-scheme($color) {
47
51
  @each $color-property, $color-value in $color-properties {
48
- --#{$prefix}-#{$tag}-#{functions.str-replace($color-property, '--', '')}: #{meta.inspect(
52
+ & {
53
+ --#{$prefix}-#{$tag}-#{functions.str-replace($color-property, '--', '')}: #{meta.inspect(
49
54
  $color-value
50
55
  )};
56
+ }
51
57
  }
52
58
  }
53
59
  }
@@ -83,22 +89,22 @@
83
89
  // Looking for "--" symbols in the beginning of the property
84
90
  // Example: --flex-direction : row
85
91
  @if (
86
- meta.type-of($property) == "string" and str-index($property, "--") == 1
92
+ meta.type-of($property) == "string" and str-index($property, "--") == 1
87
93
  ) {
88
94
  @include generate-css-properties($tag, $property, $value, $config);
89
95
  }
90
96
 
91
- // Colors
97
+ // Colors
92
98
  @else if ($property == "colors") {
93
99
  @include generate-colors($tag, $value, $config);
94
100
  }
95
101
 
96
- // Responsive
102
+ // Responsive
97
103
  @else if ($property == "responsive") {
98
104
  @include generate-responsive($tag, $value, $config);
99
105
  }
100
106
 
101
- // Subclasses
107
+ // Subclasses
102
108
  @else if ($property == "subclasses") {
103
109
  @each $class, $class_properties in $value {
104
110
  @include generate-subclasses($tag, $class, $class_properties, $config);
@@ -114,7 +114,7 @@ $theme: theme.$theme;
114
114
  $config: $config,
115
115
  $theme: $theme
116
116
  );
117
- @use "components/button-group" with (
117
+ @use "components/button_group" with (
118
118
  $config: $config,
119
119
  $theme: $theme
120
120
  );