aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/styles/base/_mixins.scss
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-09-20 09:24:27 +0200
committerivarlovlie <git@ivarlovlie.no>2022-09-20 09:24:27 +0200
commita9072370ca1eb9a5cce928b1d487db0f307edea6 (patch)
tree59c3c23df930a8b5f888dc7813923abf4ceefed4 /apps/web-shared/src/styles/base/_mixins.scss
parent56fa963a1d63cbe0bf28e29e717cceaa417c45c1 (diff)
downloadgreatoffice-a9072370ca1eb9a5cce928b1d487db0f307edea6.tar.xz
greatoffice-a9072370ca1eb9a5cce928b1d487db0f307edea6.zip
feat: Move old apps into it's own directory
Diffstat (limited to 'apps/web-shared/src/styles/base/_mixins.scss')
-rw-r--r--apps/web-shared/src/styles/base/_mixins.scss151
1 files changed, 0 insertions, 151 deletions
diff --git a/apps/web-shared/src/styles/base/_mixins.scss b/apps/web-shared/src/styles/base/_mixins.scss
deleted file mode 100644
index 8fe82f6..0000000
--- a/apps/web-shared/src/styles/base/_mixins.scss
+++ /dev/null
@@ -1,151 +0,0 @@
-@use 'sass:math';
-
-// --------------------------------
-
-// Typography
-
-// --------------------------------
-
-// edit font rendering -> tip: use for light text on dark backgrounds
-@mixin fontSmooth {
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-// crop top space on text elements - caused by line height
-@mixin lhCrop($line-height, $capital-letter: 1) {
- &::before {
- content: '';
- display: block;
- height: 0;
- width: 0;
- margin-top: calc((#{$capital-letter} - #{$line-height}) * 0.5em);
- }
-}
-
-// edit text unit on a component level
-@mixin textUnit($text-unit) {
- --text-unit: #{$text-unit};
- font-size: var(--text-unit);
-}
-
-// --------------------------------
-
-// Spacing
-
-// --------------------------------
-
-// edit space unit on a component level
-@mixin spaceUnit($space-unit) {
- --space-unit: #{$space-unit};
-}
-
-// --------------------------------
-
-// Reset
-
-// --------------------------------
-
-// reset user agent style
-@mixin reset {
- background-color: transparent;
- padding: 0;
- border: 0;
- border-radius: 0;
- color: inherit;
- line-height: inherit;
- appearance: none;
-}
-
-// --------------------------------
-
-// Colors
-
-// --------------------------------
-
-// define HSL color variable
-@mixin defineColorHSL($color, $hue, $saturation, $lightness) {
- #{$color}: unquote("hsl(#{$hue}, #{$saturation}, #{$lightness})");#{$color}-h: #{$hue};#{$color}-s: #{$saturation};#{$color}-l: #{$lightness};
-}
-
-// return color with different opacity value
-@function alpha($color, $opacity) {
- $color: str-replace($color, 'var(');
- $color: str-replace($color, ')');
- $color-h: var(#{$color+'-h'});
- $color-s: var(#{$color+'-s'});
- $color-l: var(#{$color+'-l'});
- @return hsla($color-h, $color-s, $color-l, $opacity);
-}
-
-// return color with different lightness value
-@function lightness($color, $lightnessMultiplier) {
- $color: str-replace($color, 'var(');
- $color: str-replace($color, ')');
- $color-h: var(#{$color+'-h'});
- $color-s: var(#{$color+'-s'});
- $color-l: var(#{$color+'-l'});
- @return hsl($color-h, $color-s, calc(#{$color-l} * #{$lightnessMultiplier}));
-}
-
-// modify color HSLA values
-@function adjustHSLA($color, $hueMultiplier: 1, $saturationMultiplier: 1, $lightnessMultiplier: 1, $opacity: 1) {
- $color: str-replace($color, 'var(');
- $color: str-replace($color, ')');
- $color-h: var(#{$color+'-h'});
- $color-s: var(#{$color+'-s'});
- $color-l: var(#{$color+'-l'});
- @return hsla(calc(#{$color-h} * #{$hueMultiplier}), calc(#{$color-s} * #{$saturationMultiplier}), calc(#{$color-l} * #{$lightnessMultiplier}), $opacity);
-}
-
-// replace substring with another string
-// credits: https://css-tricks.com/snippets/sass/str-replace-function/
-@function str-replace($string, $search, $replace: '') {
- $index: str-index($string, $search);
- @if $index {
- @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
- }
- @return $string;
-}
-
-// --------------------------------
-
-// Accessibility
-
-// --------------------------------
-
-// hide - content made available only to screen readers
-@mixin srHide {
- position: absolute;
- clip: rect(1px, 1px, 1px, 1px);
- clip-path: inset(50%);
-}
-
-// show
-@mixin srShow {
- position: static;
- clip: auto;
- clip-path: none;
-}
-
-// --------------------------------
-
-// CSS Triangle
-
-// --------------------------------
-
-@mixin triangle ($direction: up, $width: 12px, $color: red) {
- width: 0;
- height: 0;
- border: $width solid transparent;
-
- @if( $direction == left ) {
- border-right-color: $color;
- } @else if( $direction == right ) {
- border-left-color: $color;
- } @else if( $direction == down ) {
- border-top-color: $color;
- } @else {
- border-bottom-color: $color;
- }
-}