1.0.2 โ€ข Published 6 months ago

@feelinglovelynow/global-style v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

๐Ÿ•‰ @feelinglovelynow/global-style

๐Ÿ’Ž Install

pnpm add @feelinglovelynow/global-style

๐Ÿ’š Use

import '@feelinglovelynow/global-style'

๐Ÿ’› Reasoning

  • Common styling to ease web development
  • Includes html styles to ease rem development - additional information
  • Includes fade in and fade in from above animations
  • Includes a class to show a loading circle
  • Includes a couple of base classes like fln__pr-text which is helpful for adjacent inline elements when there is a desire for space between them like:
<span class="fln__pr-text">Hello</span><a>World</a>

๐Ÿงก Loading circle implementation

<div class="fln__circle-load"></div>
<div class="fln__circle-load blue"></div>

<style>
  .fln__circle-load { // gold load with transparent background
    border-color: #eac603 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
  }

  .fln__circle-load.blue { // thicker + wider blue load with grey background
    border-width: 0.36rem;
    width: 4rem;
    border-color: #2e96ff #ccc #ccc;
  }
</style>

โค๏ธ The Styles

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

html {
  font-size: 62.5%; /* https://stackoverflow.com/questions/59920538 */
}

body {
  font-size: 1.8rem;
  line-height: 1.369;
}

body * {
  box-sizing: border-box;
}

.fln__circle-load {
  width: 30px;
  aspect-ratio: 1/1;
  border-width: 0.27rem;
  border-style: solid;
  border-radius: 100%;
  animation: fln__circle-load__spin 0.8s infinite linear;
}

.fln__pr-text {
  padding-right: 0.45rem;
}

.fln__clear {
  clear: both;
}

.fln__relative {
  position: relative;
}

.fln__strong {
  font-weight: 600;
}

@keyframes fln__circle-load__spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359deg);
  }
}

@keyframes fln__fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fln__fade-in-from-above {
  0% {
    opacity: 0;
    transform: translateY(-9rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fln__fade-out-and-slide-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-9rem);
  }
}

@keyframes fln__subtle-fade-in-from-above {
  0% {
    opacity: 0;
    transform: translateY(-0.9rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fln__subtle-fade-out-and-slide-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-0.9rem);
  }
}

๐ŸŽ All Our Packages

  1. @feelinglovelynow/dgraph: NPM โ‹… Github
  2. @feelinglovelynow/env-write: NPM โ‹… Github
  3. @feelinglovelynow/get-form-entries: NPM โ‹… Github
  4. @feelinglovelynow/get-relative-time: NPM โ‹… Github
  5. @feelinglovelynow/global-style: NPM โ‹… Github
  6. @feelinglovelynow/jwt: NPM โ‹… Github
  7. @feelinglovelynow/loop-backwards: NPM โ‹… Github
  8. @feelinglovelynow/slug: NPM โ‹… Github
  9. @feelinglovelynow/svelte-catch: NPM โ‹… Github
  10. @feelinglovelynow/svelte-kv: NPM โ‹… Github
  11. @feelinglovelynow/svelte-loading-anchor: NPM โ‹… Github
  12. @feelinglovelynow/svelte-modal: NPM โ‹… Github
  13. @feelinglovelynow/svelte-turnstile: NPM โ‹… Github
  14. @feelinglovelynow/toast: NPM โ‹… Github
1.0.2

6 months ago

1.0.1

7 months ago

1.0.0

7 months ago