-
-
Notifications
You must be signed in to change notification settings - Fork 130
[Feature - CSS] Feature/css animations #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Mathys-Gasnier
merged 8 commits into
quicksnip-dev:main
from
AlsoKnownAs-Ax:feature/css-animations
Jan 5, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fea1063
β¨ [css] Add blinking animation snippet
AlsoKnownAs-Ax f4f888f
β»οΈ [css] renamed the parent element to blink
AlsoKnownAs-Ax 66846d7
β¨ [css] Add slide-in animation
AlsoKnownAs-Ax 60c13b3
β¨ [css] Add pulse animation
AlsoKnownAs-Ax 2622a35
β¨ [css] Add Shake animation
AlsoKnownAs-Ax 22512d8
β¨ [css] Add typewriter animation
AlsoKnownAs-Ax 5c1819f
β»οΈ [css] Fix typewrite typo + add comments for clarity + add unique tags
AlsoKnownAs-Ax 52be1f0
β»οΈ [css] Removed unnecessary tags
AlsoKnownAs-Ax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Blink Animation | ||
description: Adds an infinite blinking animation to an element | ||
author: AlsoKnownAs-Ax | ||
tags: animation,blink,infinite | ||
--- | ||
|
||
```css | ||
.blink { | ||
animation: blink 1s linear infinite; | ||
} | ||
|
||
@keyframes blink{ | ||
0%{ | ||
opacity: 0; | ||
} | ||
50%{ | ||
opacity: 1; | ||
} | ||
100%{ | ||
opacity: 0; | ||
} | ||
} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Pulse Animation | ||
description: Adds a smooth pulsing animation with opacity and scale effects | ||
author: AlsoKnownAs-Ax | ||
tags: animation,pulse,pulse-scale | ||
--- | ||
|
||
```css | ||
.pulse { | ||
animation: pulse 2s ease-in-out infinite; | ||
} | ||
|
||
@keyframes pulse { | ||
0% { | ||
opacity: 0.5; | ||
transform: scale(1); | ||
} | ||
50% { | ||
opacity: 1; | ||
transform: scale(1.05); | ||
} | ||
100% { | ||
opacity: 0.5; | ||
transform: scale(1); | ||
} | ||
} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Shake Animation | ||
description: Adds a shake animation ( commonly used to mark invalid fields ) | ||
author: AlsoKnownAs-Ax | ||
tags: shake,shake-horizontal | ||
--- | ||
|
||
```css | ||
.shake { | ||
animation: shake .5s ease-in-out; | ||
} | ||
|
||
@keyframes shake { | ||
0%, 100% { | ||
transform: translateX(0); | ||
} | ||
25% { | ||
transform: translateX(-10px); | ||
} | ||
50% { | ||
transform: translateX(10px); | ||
} | ||
75% { | ||
transform: translateX(-10px); | ||
} | ||
} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Slide-in Animation | ||
description: Adds a slide-in from the right side of the screen | ||
author: AlsoKnownAs-Ax | ||
tags: animation,slide-in,slide-right | ||
--- | ||
|
||
```css | ||
.slide-in { | ||
animation: slide-in 1s ease-in-out; | ||
} | ||
|
||
@keyframes slide-in { | ||
from { | ||
scale: 300% 1; | ||
translate: 150vw 0; | ||
} | ||
|
||
to { | ||
scale: 100% 1; | ||
translate: 0 0; | ||
} | ||
} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Typewriter Animation | ||
description: Adds a typewriter animation + blinking cursor | ||
author: AlsoKnownAs-Ax | ||
tags: blinking,typewriter | ||
--- | ||
|
||
```html | ||
<div class="typewriter"> | ||
<div> | ||
<p>Typerwriter Animation</p> | ||
</div> | ||
</div> | ||
``` | ||
|
||
```css | ||
.typewriter{ | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.typewriter p { | ||
overflow: hidden; | ||
font-size: 1.5rem; | ||
font-family: monospace; | ||
border-right: 1px solid; | ||
margin-inline: auto; | ||
white-space: nowrap; | ||
/* The cursor will inherit the text's color by default */ | ||
/* border-color: red */ | ||
/* Steps: number of chars (better to set directly in js)*/ | ||
animation: typing 3s steps(21) forwards, | ||
blink 1s step-end infinite; | ||
} | ||
|
||
@keyframes typing{ | ||
from{ | ||
width: 0% | ||
} | ||
to{ | ||
width: 100% | ||
} | ||
} | ||
|
||
@keyframes blink{ | ||
50%{ | ||
border-color: transparent; | ||
} | ||
} | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.