Last active
January 22, 2025 01:33
-
-
Save MrJackdaw/0fd49364aadc69acb2aade6485d1beb9 to your computer and use it in GitHub Desktop.
CSS Quick-Start
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
/****************************************** | |
* File : Animations.css | |
*******************************************/ | |
@keyframes fade-in { | |
from { | |
opacity: 0; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
@keyframes fade-out { | |
from { | |
opacity: 1; | |
} | |
to { | |
opacity: 0; | |
} | |
} | |
@keyframes pulse { | |
0% { | |
filter: drop-shadow(0 0 0.7rem #a5cfed); | |
} | |
100% { | |
filter: drop-shadow(0 0 4px #3c99dc00); | |
} | |
} | |
@keyframes scale-in { | |
0% { | |
transform: scale(0.9); | |
opacity: 0.25; | |
} | |
100% { | |
transform: scale(1); | |
opacity: 1; | |
} | |
} | |
@keyframes scale-up { | |
0% { | |
transform: scale(1); | |
} | |
100% { | |
transform: scale(1.04); | |
} | |
} | |
@keyframes slide-left { | |
from { | |
transform: translateX(5%); | |
} | |
to { | |
transform: translateX(0); | |
} | |
} | |
@keyframes slide-right { | |
from { | |
transform: translateX(-10%); | |
} | |
to { | |
transform: translateX(0%); | |
} | |
} | |
@keyframes slide-down { | |
from { | |
transform: translateY(-10%); | |
} | |
to { | |
transform: translateX(0%); | |
} | |
} | |
@keyframes slide-up { | |
from { | |
transform: translateY(10%); | |
} | |
to { | |
transform: translateX(0%); | |
} | |
} | |
@keyframes spin { | |
from { | |
transform: rotate(0deg); | |
} | |
to { | |
transform: rotate(360deg); | |
} | |
} | |
/* Classes */ | |
.fade-in { | |
animation: fade-in 250ms ease-out; | |
animation-fill-mode: both; | |
} | |
.fade-out { | |
@extend .fade-in; | |
animation-direction: reverse; | |
animation-fill-mode: forwards; | |
} | |
.pulse { | |
animation: pulse 2.1s ease-out; | |
} | |
.scale-in { | |
animation: scale-in 180ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-in-up { | |
will-change: opacity, transform; | |
animation: slide-up 250ms ease-out, fade-in 250ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-in-down { | |
will-change: opacity, transform; | |
animation: slide-down 250ms ease-out, fade-in 250ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-in-right { | |
will-change: opacity, transform; | |
animation-fill-mode: forwards; | |
animation: slide-right 250ms ease-out, fade-in 250ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-in-left { | |
will-change: opacity, transform; | |
animation-fill-mode: forwards; | |
animation: slide-left 250ms ease-out, fade-in 250ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-out-right { | |
@extend .slide-in-right; | |
animation-direction: reverse; | |
} | |
.slide-out-up { | |
animation: slide-up 250ms ease-out, fade-out 250ms ease-out; | |
animation-fill-mode: forwards; | |
} | |
.slide-left { | |
animation: slide-left 400ms ease-out; | |
} | |
.slide-right { | |
animation: slide-left 400ms ease-out; | |
} | |
.spinner--after, | |
.spinner--before { | |
display: flex; | |
} | |
.spinner--after::after, | |
.spinner--before::before { | |
animation: spin 0.8s linear infinite; | |
border-radius: 50%; | |
border: 0.15rem solid; | |
border-top-color: transparent; | |
content: ""; | |
display: inline-block; | |
height: 0.9rem; | |
left: 48%; | |
top: 40%; | |
transform-origin: center; | |
width: 0.9rem; | |
} | |
.spinner--after::after { | |
margin-left: 0.3rem; | |
} | |
.spinner--before::before { | |
margin-right: 0.3rem; | |
} |
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
/* | |
* CSS reset based on meyer reset: modified to pull in | |
* rules and theming from sibling 'mixins.scss' file. | |
(See Meyer reset here: http://meyerweb.com/eric/tools/css/reset/) | |
------- | |
License: none (public domain) | |
*/ | |
html{ | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
font-size: 18px; | |
height: 100vh; | |
overflow: hidden; | |
* { | |
box-sizing: border-box; | |
} | |
} | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, input, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td, | |
article, aside, canvas, details, embed, | |
figure, figcaption, footer, header, hgroup, | |
menu, nav, output, ruby, section, summary, | |
time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-family: inherit; | |
font-size: inherit; | |
line-height: 1.6; | |
position: relative; | |
vertical-align: baseline; | |
} | |
/* HTML5 display-role reset for older browsers */ | |
article, aside, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, section { | |
display: block; | |
} | |
body { | |
@include app-font(); | |
color: $primary; | |
font-size: $sm; | |
height: 100%; | |
margin: 0; | |
overflow-y: auto; | |
padding: 0; | |
/* Smooth scrolling haxx -- need this for Glory™ on iOS devices */ | |
-webkit-overflow-scrolling: touch; | |
} | |
a { | |
color: #36b4c7; | |
text-decoration: none; | |
} | |
h1, .h1 { | |
@include h1(); | |
} | |
h2, .h2 { | |
@include h2(); | |
} | |
h3, .h3 { | |
@include h3(); | |
} | |
h4, .h4 { | |
@include h4(); | |
} | |
h5, .h5 { | |
@include h5(); | |
} | |
h6, .h6 { | |
@include h6(); | |
} | |
blockquote, | |
q { | |
quotes: none; | |
} | |
blockquote:before, | |
blockquote:after, | |
q:before, | |
q:after { | |
content: ''; | |
content: none; | |
} | |
input[type=text] { | |
border-bottom: 1px solid; | |
} | |
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
} | |
@media screen and (max-width: 800px) { | |
html{ | |
font-size: 14px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment