Skip to content

Commit

Permalink
Release v.1.2.0
Browse files Browse the repository at this point in the history
Added HoverCSS
  • Loading branch information
Julian Seidl committed Oct 25, 2017
1 parent f46eed9 commit e24e79d
Show file tree
Hide file tree
Showing 119 changed files with 8,743 additions and 6 deletions.
26 changes: 26 additions & 0 deletions css/external/hovercss/_hacks.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// As is often the case, some devices/browsers need additional code to get CSS to work
// in the most desired way. These mixins are used to quickly drop in hacks for each element
// Find out more here: https://github.com/IanLunn/Hover/wiki/Hacks-Explained

.hardwareAccel() {
// Improve performance on mobile/tablet devices
// Perspective reduces blurryness of text in Chrome
.prefixed(transform, perspective(1px) translateZ(0));
}

.improveAntiAlias() {
// Improve aliasing on mobile/tablet devices
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
}

.forceBlockLevel() {
// Transforms need to be block-level to work
display: inline-block;
vertical-align: middle;
}

.hacks() {
.forceBlockLevel();
.hardwareAccel();
.improveAntiAlias();
}
51 changes: 51 additions & 0 deletions css/external/hovercss/_mixins.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// prefix declarations
.prefixed(@property, @value) {
& when (@webkit = true) {
-webkit-@{property}: @value;
}

& when (@moz = true) {
-moz-@{property}: @value;
}

& when (@ms = true) {
-ms-@{property}: @value;
}

& when (@o = true) {
-o-@{property}: @value;
}

@{property}: @value;
}

// prefix keyframes
.keyframes(@name; @content) {
& when (@webkit = true) {
@-webkit-keyframes @name {
@content();
}
}

& when (@moz = true) {
@-moz-keyframes @name {
@content();
}
}

& when (@ms = true) {
@-ms-keyframes @name {
@content();
}
}

& when (@o = true) {
@-o-keyframes @name {
@content();
}
}

@keyframes @name {
@content();
}
}
43 changes: 43 additions & 0 deletions css/external/hovercss/_options.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// DEFAULT OPTIONS

// Prefix for Hover class names
@nameSpace: hvr;

// Durations
@fastDuration: .1s;
@mediumDuration: .3s;
@slowDuration: .5s;

// Colors
@primaryColor: #e1e1e1;
@secondaryColor: #666;
@highlightColor: #ccc;
@activeColor: #2098D1;
@shadowColor: rgba(0, 0, 0, .6);

// Speech bubbles options
@tipWidth: 10px; //the width of the speech bubble tip
@tipHeight: 10px; //the height of the speech bubble tip
@tipColor: @primaryColor;

// Arrows options
@spaceBetweenTextAndArrows: 2.2em;

// Curl dimensions
@curlWidth: 25px;
@curlHeight: 25px;

// Curl colors
@revealAreaColor: white; // reveal area behind the curl
@curlLineColor: #aaa; // crease line
@curlTransitionColor: #ccc; // color transitioning from crease line to final color
@curlLastColor: white; // final color of the back of the curl

// Browser Prefixes - Which CSS prefixes should be used?
@webkit: true;
@moz: false;
@ms: false;
@o: false;

// Compile with or without classes
@includeClasses: true;
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_backward.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Backward */
.backward() {
.hacks();
.prefixed(transition-duration, @mediumDuration);
.prefixed(transition-property, transform);

&:hover,
&:focus,
&:active {
.prefixed(transform, translateX(-8px));
}
}
34 changes: 34 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_bob.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Bob */
.keyframes(~"@{nameSpace}-bob", {
0% {
.prefixed(transform, translateY(-8px));
}
50% {
.prefixed(transform, translateY(-4px));
}
100% {
.prefixed(transform, translateY(-8px));
}
});

.keyframes(~"@{nameSpace}-bob-float", {
100% {
.prefixed(transform, translateY(-8px));
}
});

.bob() {
.hacks();

&:hover,
&:focus,
&:active {
.prefixed(animation-name, ~"@{nameSpace}-bob-float, @{nameSpace}-bob");
.prefixed(animation-duration, ~".3s, 1.5s");
.prefixed(animation-delay, ~"0s, .3s");
.prefixed(animation-timing-function, ~"ease-out, ease-in-out");
.prefixed(animation-iteration-count, ~"1, infinite");
.prefixed(animation-fill-mode, ~"forwards");
.prefixed(animation-direction, ~"normal, alternate");
}
}
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_bounce-in.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Bounce In */
.bounce-in() {
.hacks();
.prefixed(transition-duration, @slowDuration);

&:hover,
&:focus,
&:active {
.prefixed(transform, scale(1.2));
.prefixed(transition-timing-function, cubic-bezier(.47,2.02,.31,-0.36));
}
}
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_bounce-out.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Bounce Out */
.bounce-out() {
.hacks();
.prefixed(transition-duration, @slowDuration);

&:hover,
&:focus,
&:active {
.prefixed(transform, scale(.8));
.prefixed(transition-timing-function, cubic-bezier(.47,2.02,.31,-0.36));
}
}
55 changes: 55 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_buzz-out.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* Buzz Out */
.keyframes(~"@{nameSpace}-buzz-out", {
10% {
.prefixed(transform, translateX(3px) rotate(2deg));
}

20% {
.prefixed(transform, translateX(-3px) rotate(-2deg));
}

30% {
.prefixed(transform, translateX(3px) rotate(2deg));
}

40% {
.prefixed(transform, translateX(-3px) rotate(-2deg));
}

50% {
.prefixed(transform, translateX(2px) rotate(1deg));
}

60% {
.prefixed(transform, translateX(-2px) rotate(-1deg));
}

70% {
.prefixed(transform, translateX(2px) rotate(1deg));
}

80% {
.prefixed(transform, translateX(-2px) rotate(-1deg));
}

90% {
.prefixed(transform, translateX(1px) rotate(0));
}

100% {
.prefixed(transform, translateX(-1px) rotate(0));
}
});

.buzz-out() {
.hacks();

&:hover,
&:focus,
&:active {
.prefixed(animation-name, ~"@{nameSpace}-buzz-out");
.prefixed(animation-duration, .75s);
.prefixed(animation-timing-function, linear);
.prefixed(animation-iteration-count, 1);
}
}
23 changes: 23 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_buzz.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Buzz */
.keyframes(~"@{nameSpace}-buzz", {
50% {
.prefixed(transform, translateX(3px) rotate(2deg));
}

100% {
.prefixed(transform, translateX(-3px) rotate(-2deg));
}
});

.buzz() {
.hacks();

&:hover,
&:focus,
&:active {
.prefixed(animation-name, ~"@{nameSpace}-buzz");
.prefixed(animation-duration, .15s);
.prefixed(animation-timing-function, linear);
.prefixed(animation-iteration-count, infinite);
}
}
13 changes: 13 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_float.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Float */
.float() {
.hacks();
.prefixed(transition-duration, @mediumDuration);
.prefixed(transition-property, transform);
.prefixed(transition-timing-function, ease-out);

&:hover,
&:focus,
&:active {
.prefixed(transform, translateY(-8px));
}
}
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_forward.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Forward */
.forward() {
.hacks();
.prefixed(transition-duration, @mediumDuration);
.prefixed(transition-property, transform);

&:hover,
&:focus,
&:active {
.prefixed(transform, translateX(8px));
}
}
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_grow-rotate.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Grow Rotate */
.grow-rotate() {
.hacks();
.prefixed(transition-duration, @mediumDuration);
.prefixed(transition-property, transform);

&:hover,
&:focus,
&:active {
.prefixed(transform, scale(1.1) rotate(4deg));
}
}
12 changes: 12 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_grow.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Grow */
.grow() {
.hacks();
.prefixed(transition-duration, @mediumDuration);
.prefixed(transition-property, transform);

&:hover,
&:focus,
&:active {
.prefixed(transform, scale(1.1));
}
}
34 changes: 34 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_hang.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Hang */
.keyframes(~"@{nameSpace}-hang", {
0% {
.prefixed(transform, translateY(8px));
}
50% {
.prefixed(transform, translateY(4px));
}
100% {
.prefixed(transform, translateY(8px));
}
});

.keyframes(~"@{nameSpace}-hang-sink", {
100% {
.prefixed(transform, translateY(8px));
}
});

.hang() {
.hacks();

&:hover,
&:focus,
&:active {
.prefixed(animation-name, ~"@{nameSpace}-hang-sink, @{nameSpace}-hang");
.prefixed(animation-duration, ~".3s, 1.5s");
.prefixed(animation-delay, ~"0s, .3s");
.prefixed(animation-timing-function, ~"ease-out, ease-in-out");
.prefixed(animation-iteration-count, ~"1, infinite");
.prefixed(animation-fill-mode, ~"forwards");
.prefixed(animation-direction, ~"normal, alternate");
}
}
19 changes: 19 additions & 0 deletions css/external/hovercss/effects/2d-transitions/_pop.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Pop */
.keyframes(~"@{nameSpace}-pop", {
50% {
.prefixed(transform, scale(1.2));
}
});

.pop() {
.hacks();

&:hover,
&:focus,
&:active {
.prefixed(animation-name, ~"@{nameSpace}-pop");
.prefixed(animation-duration, @mediumDuration);
.prefixed(animation-timing-function, linear);
.prefixed(animation-iteration-count, 1);
}
}
Loading

0 comments on commit e24e79d

Please sign in to comment.