Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Feb 6, 2024
1 parent 386897a commit ffef990
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 39 deletions.
1 change: 0 additions & 1 deletion apps/front/src/pages/homePage/HomePage.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use "../../styles/index" as *;

.root {

}
1 change: 0 additions & 1 deletion apps/front/src/pages/workPage/WorkPage.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use "../../styles/index" as *;

.root {

}
8 changes: 4 additions & 4 deletions apps/front/src/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@font-face {
font-family: "roboto-regular";
src: url("/src/fonts/roboto-regular/roboto-regular.woff2") format("woff2"),
url("/src/fonts/roboto-regular/roboto-regular.woff") format("woff"),
url("/src/fonts/roboto-regular/roboto-regular.ttf") format("truetype");
src:
url("/src/fonts/roboto-regular/roboto-regular.woff2") format("woff2"),
url("/src/fonts/roboto-regular/roboto-regular.woff") format("woff"),
url("/src/fonts/roboto-regular/roboto-regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand All @@ -11,6 +12,5 @@
font-family: "roboto-regular", sans-serif;
}


// Declare font-face & font mixin...
// Add the fonts in src/fonts folder
20 changes: 9 additions & 11 deletions apps/front/src/styles/_functions.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@use "./_viewport" as viewport;
@use 'sass:math';
@use "./_viewport" as viewport;
@use "sass:math";

/// Is a number
/// @param {any} $value -
/// @return {boolean} -
@function is-number($value) {
@return type-of($value)=='number';
@return type-of($value) == "number";
}

//// check if a value is a string
@function is-string($value) {
@return type-of($value)=="string";
@return type-of($value) == "string";
}

/// Is absolute number
Expand All @@ -24,7 +24,7 @@
/// @param {any} $value -
/// @return {Boolean} -
@function is-calc($value) {
@return is-string($value) and index('calc', $value) != null;
@return is-string($value) and index("calc", $value) != null;
}

/// Calculate VW ratio
Expand All @@ -34,8 +34,7 @@
@function ratioVW($n1, $n2: viewport.$viewport-reference-width) {
@if not is-absolute-number($n1) or is-calc($n1) {
@return $n1;
}
@else {
} @else {
@return calc($n1 / $n2 * 100) + vw;
}
}
Expand All @@ -44,12 +43,11 @@
/// @param {Number} $n1 -
/// @param {Number} $n2 [1080] -
/// @return {type} -
@function ratioVH($n1, $n2 : 1080) {
@function ratioVH($n1, $n2: 1080) {
@if not is-absolute-number($n1) or is-calc($n1) {
@return $n1;
}
@else {
@return calc($n1 / $n2 * 100)+vh;
} @else {
@return calc($n1 / $n2 * 100) + vh;
}
}

Expand Down
60 changes: 45 additions & 15 deletions apps/front/src/styles/_ratio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@
/// @param {Number} $ratioVH [850]
/// @param {Number} $ratioVW [1440]
/// @output
@mixin propertyVH($property, $n1,$ratioVH: viewport.$viewport-reference-desktop-height, $ratioVW: viewport.$viewport-reference-desktop-width) {
#{$property} : #{fn.ratioVH($n1, $ratioVH)};
@mixin propertyVH(
$property,
$n1,
$ratioVH: viewport.$viewport-reference-desktop-height,
$ratioVW: viewport.$viewport-reference-desktop-width
) {
#{$property}: #{fn.ratioVH($n1, $ratioVH)};
@if $ratioVW > 0 {
@media (max-aspect-ratio: #{ #{$ratioVW} / #{$ratioVH+1} }) {
#{$property} : #{fn.ratioVW($n1, $ratioVW)};
#{$property}: #{fn.ratioVW($n1, $ratioVW)};
}
}
}
Expand All @@ -22,8 +27,12 @@
/// @param {Number} $n1
/// @param {Number} $ratioVW []
/// @output
@mixin propertyVW($property, $n1, $ratioVW: fn.strip-units(breakpoints.$breakpoint-mobile)) {
#{$property} : #{fn.ratioVW($n1, $ratioVW)};
@mixin propertyVW(
$property,
$n1,
$ratioVW: fn.strip-units(breakpoints.$breakpoint-mobile)
) {
#{$property}: #{fn.ratioVW($n1, $ratioVW)};
}

/// Set property rem
Expand All @@ -35,28 +44,44 @@
@if length($value1) == 1 {
#{$property}: fn.toRem($value1);
} @else if length($value1) == 2 {
#{$property}: fn.toRem(nth($value1, 1)) fn.toRem(nth($value1, 2))
#{$property}: fn.toRem(nth($value1, 1)) fn.toRem(nth($value1, 2));
} @else if length($value1) == 3 {
#{$property}: fn.toRem(nth($value1, 1)) fn.toRem(nth($value1, 2)) fn.toRem(nth($value1, 3))
#{$property}: fn.toRem(nth($value1, 1))
fn.toRem(nth($value1, 2))
fn.toRem(nth($value1, 3));
} @else if length($value1) == 4 {
#{$property}: fn.toRem(nth($value1, 1)) fn.toRem(nth($value1, 2)) fn.toRem(nth($value1, 3)) fn.toRem(nth($value1, 4))
#{$property}: fn.toRem(nth($value1, 1))
fn.toRem(nth($value1, 2))
fn.toRem(nth($value1, 3))
fn.toRem(nth($value1, 4));
}
@if $value2 != $value1 {
@media screen and (max-width: breakpoints.$breakpoint-tablet) {
@if length($value2) == 1 {
#{$property}: fn.toRem($value2);
} @else if length($value2) == 2 {
#{$property}: fn.toRem(nth($value2, 1)) fn.toRem(nth($value2, 2))
#{$property}: fn.toRem(nth($value2, 1)) fn.toRem(nth($value2, 2));
} @else if length($value2) == 3 {
#{$property}: fn.toRem(nth($value2, 1)) fn.toRem(nth($value2, 2)) fn.toRem(nth($value2, 3))
#{$property}: fn.toRem(nth($value2, 1))
fn.toRem(nth($value2, 2))
fn.toRem(nth($value2, 3));
} @else if length($value2) == 4 {
#{$property}: fn.toRem(nth($value2, 1)) fn.toRem(nth($value2, 2)) fn.toRem(nth($value2, 3)) fn.toRem(nth($value2, 4))
#{$property}: fn.toRem(nth($value2, 1))
fn.toRem(nth($value2, 2))
fn.toRem(nth($value2, 3))
fn.toRem(nth($value2, 4));
}
}
}
}

@mixin propertyViewport($property, $value1, $value2: $value1, $breakpoint: breakpoints.$breakpoint-tablet, $cap: false) {
@mixin propertyViewport(
$property,
$value1,
$value2: $value1,
$breakpoint: breakpoints.$breakpoint-tablet,
$cap: false
) {
@include propertyVH($property, $value1);
@media screen and (max-width: breakpoints.$breakpoint-tablet) {
@include propertyVW($property, $value2);
Expand All @@ -66,11 +91,16 @@
@if length($value1) == 1 {
#{$property}: fn.toPx($value1);
} @else if length($value1) == 2 {
#{$property}: fn.toPx(nth($value1, 1)) fn.toPx(nth($value1, 2))
#{$property}: fn.toPx(nth($value1, 1)) fn.toPx(nth($value1, 2));
} @else if length($value1) == 3 {
#{$property}: fn.toPx(nth($value1, 1)) fn.toPx(nth($value1, 2)) fn.toPx(nth($value1, 3))
#{$property}: fn.toPx(nth($value1, 1))
fn.toPx(nth($value1, 2))
fn.toPx(nth($value1, 3));
} @else if length($value1) == 4 {
#{$property}: fn.toPx(nth($value1, 1)) fn.toPx(nth($value1, 2)) fn.toPx(nth($value1, 3)) fn.toPx(nth($value1, 4))
#{$property}: fn.toPx(nth($value1, 1))
fn.toPx(nth($value1, 2))
fn.toPx(nth($value1, 3))
fn.toPx(nth($value1, 4));
}
}
}
Expand Down
14 changes: 10 additions & 4 deletions apps/front/src/styles/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
/**
* Default Box sizing on before & after pseudo elements
*/
*, *:before, *:after {
*,
*:before,
*:after {
box-sizing: inherit;
}

Expand Down Expand Up @@ -41,7 +43,12 @@ main {
* Remove default title browser margin
* Remove default title browser UGLY bold font weight
*/
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: 1em;
margin: 0;
font-weight: normal;
Expand Down Expand Up @@ -152,10 +159,9 @@ summary {
* Remove arrow indicatore
*/
details summary::-webkit-details-marker {
display:none;
display: none;
}


/* ----------------------------------------------------------------------------- MEDIA */

/**
Expand Down
5 changes: 2 additions & 3 deletions apps/front/src/styles/_texts.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use "./_viewport";

@mixin text-title-1 ($ratio:1) {
@use "./_viewport";

@mixin text-title-1($ratio: 1) {
}

0 comments on commit ffef990

Please sign in to comment.