gerillass 1.1.3 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Changelog
2
2
  _Change is the essence._
3
3
 
4
+ ## 1.2.0
5
+ * Add Loadify: A new mixin to help page elements render more natural during the time of page loads.
6
+
4
7
  ## 1.1.3
5
8
  * Add box-sizing property to Columnizer mixin.
6
9
 
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "author": "Halil İbrahim Çakıroğlu",
7
7
  "main": "scss/_gerillass.scss",
8
8
  "license": "Apache-2.0",
9
- "version": "1.1.3",
9
+ "version": "1.2.0",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "https://github.com/selfishprimate/gerillass"
@@ -797,6 +797,30 @@
797
797
 
798
798
 
799
799
 
800
+ @mixin gls-loadify($params...) {
801
+ @if not & and length($params) == 0 {
802
+ @keyframes loadify {
803
+ to {
804
+ opacity: 1;
805
+ }
806
+ }
807
+ } @else if not & and length($params) > 0 {
808
+ @warn "PLEASE DO NOT PASS AN ARGUMENT WHEN YOU CALL THE MIXIN AT THE ROOT OF YOUR STYLESHEET! \A";
809
+ } @else if & and length($params) == 0 {
810
+ @warn "PLEASE PASS AN ARGUMENT TO SPECIFY HOW MANY SECONDS OR MILLISECONDS THE ELEMENTS WILL BE DELAYED! \A \A .element { \A @incude loadify(0.2s); \A } \A ";
811
+ } @else if length($params) > 0 and length($params) < 3 {
812
+ opacity: 0;
813
+ animation-name: loadify;
814
+ animation-fill-mode: forwards;
815
+ animation-delay: nth($params, 1);
816
+ animation-duration: if(length($params) == 2, #{nth($params, 2)}, 0.5s);
817
+ } @else if length($params) > 2 {
818
+ @error "NO MORE THAN 2 ARGUMENTS ARE ALLOWED! \A";
819
+ }
820
+ }
821
+
822
+
823
+
800
824
  @mixin gls-only($params...) {
801
825
  @if length($params) == 0 {
802
826
  @error "Please pass an argument. The argument must be either a negative or positive number or list of numbers. Or pass one of the following predefined string values: 'first', 'last', 'odd', 'even'.";
@@ -63,6 +63,7 @@
63
63
  @import "library/font-face";
64
64
  @import "library/hide";
65
65
  @import "library/linear-gradient";
66
+ @import "library/loadify";
66
67
  @import "library/only";
67
68
  @import "library/placeholder-shown";
68
69
  @import "library/placeholder";
@@ -0,0 +1,33 @@
1
+ @charset "UTF-8";
2
+
3
+ @mixin loadify($params...) {
4
+ @if not & and length($params) == 0 {
5
+ @keyframes loadify {
6
+ to {
7
+ opacity: 1;
8
+ visibility: visible;
9
+ backface-visibility: visible;
10
+ }
11
+ }
12
+ } @else if not & and length($params) > 0 {
13
+ @error "PLEASE DO NOT PASS AN ARGUMENT WHEN YOU CALL LOADIFY MIXIN AT THE ROOT OF YOUR STYLESHEET! \A";
14
+ } @else if & and length($params) == 0 or length($params) < 3 {
15
+ opacity: 0;
16
+ visibility: hidden;
17
+ backface-visibility: hidden;
18
+ animation-name: loadify;
19
+ animation-fill-mode: forwards;
20
+ @if length($params) == 0 {
21
+ animation-delay: 0.2s;
22
+ animation-duration: 0.5s;
23
+ } @else if length($params) == 1 {
24
+ animation-delay: #{nth($params, 1)};
25
+ animation-duration: 0.5s;
26
+ } @else if length($params) == 2 {
27
+ animation-delay: #{nth($params, 1)};
28
+ animation-duration: #{nth($params, 2)};
29
+ }
30
+ } @else if length($params) > 2 {
31
+ @error "NO MORE THAN 2 ARGUMENTS ARE ALLOWED! \A";
32
+ }
33
+ }