Skip to content

Commit

Permalink
style: format files with the lint command
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizsmerino committed Jun 26, 2024
1 parent c3ace4c commit ba5e541
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,44 @@
// @see Used in: {@link abstracts/mixins/mixins-media-queries.scss}
// @see Used inside: {@link abstracts/variables/abstracts-variables-breakpoints.scss}, {@link abstracts/mixins/abstracts-mixins-contains.scss}

@mixin media($breakpoint, $rule: 'max', $dimension: 'width', $unit: 'px') {
$rules: 'max', 'min';
$dimensions: 'width', 'height';
$units: 'px', 'em', 'rem', '%', 'vw', 'vh';
@mixin media($breakpoint, $rule: "max", $dimension: "width", $unit: "px") {
$rules: "max", "min";
$dimensions: "width", "height";
$units: "px", "em", "rem", "%", "vw", "vh";

@if not contains($rules, $rule) {
$rule: 'max';
$rule: "max";
}

@if not contains($dimensions, $dimension) {
$rule: 'width';
$rule: "width";
}

@if type-of($breakpoint) == number {
@if unitless($breakpoint) {
@media (#{$rule}-#{$dimension}: #{$breakpoint} + $unit) {
@content;
}
}

@else if contains($units, unit($breakpoint)) {
} @else if contains($units, unit($breakpoint)) {
@media (#{$rule}-#{$dimension}: #{$breakpoint}) {
@content;
}
}

@else {
} @else {
@error 'Invalid units provided';
}
}

@else if variable_exists(breakpoints) {
} @else if variable_exists(breakpoints) {
@if map-has-key($breakpoints, $breakpoint) {
@media (#{$rule}-#{$dimension}: #{inspect(map-get($breakpoints, $breakpoint))}) {
@content;
}
}

@else {
} @else {
@error 'Unfortunately, no value could be retrieved from `#{$breakpoint}`. ' + 'Available breakpoints are: #{map-keys($breakpoints)}.';
}
}

@else if variable_exists(breakpoint) {
} @else if variable_exists(breakpoint) {
@media (#{$rule}-#{$dimension}: #{$breakpoint}) {
@content;
}
}

@else {
} @else {
@error 'Neither $breakpoints map nor variable provided are defined';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
// xxxl - big display

$breakpoints: (
'xs': 380px,
'sm': 576px,
'md': 768px,
'lg': 1024px,
'xl': 1080px,
'xxl': 1280px,
'xxxl': 1500px,
'xxxxl': 1700px,
"xs": 380px,
"sm": 576px,
"md": 768px,
"lg": 1024px,
"xl": 1080px,
"xxl": 1280px,
"xxxl": 1500px,
"xxxxl": 1700px,
) !default;
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

// COLORS
/////////////////
$color-vue-1: #42B983;
$color-vue-2: #2C3E50;
$color-vue-3: #FFFFFF;
$color-vue-1: #42b983;
$color-vue-2: #2c3e50;
$color-vue-3: #ffffff;

// BRAND
/////////////////
Expand All @@ -15,17 +15,17 @@ $color-brand-2: $color-vue-2;

// SHADES OF GRAY
/////////////////
$color-white: #FFFFFF;
$color-ghost: #F2F2F2;
$color-light: #E1E1E1;
$color-silver: #B2B2B2;
$color-white: #ffffff;
$color-ghost: #f2f2f2;
$color-light: #e1e1e1;
$color-silver: #b2b2b2;
$color-gray: #808080;
$color-metal: #404040;
$color-carbon: #2A2A2A;
$color-dark: #1F1F1F;
$color-carbon: #2a2a2a;
$color-dark: #1f1f1f;
$color-black: #000000;

// STATUS
/////////////////
$color-error: #F58688;
$color-success: #64BDBD;
$color-error: #f58688;
$color-success: #64bdbd;
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

// COLORS
/////////////////
$font-avenir: 'Avenir';
$font-source-sans-pro: 'Source Sans Pro';
$font-avenir: "Avenir";
$font-source-sans-pro: "Source Sans Pro";

// BRAND
/////////////////
$font-brand-1: $font-source-sans-pro, 'Helvetica Neue', arial, sans-serif;
$font-brand-2: $font-avenir, 'Helvetica Neue', arial, sans-serif;
$font-brand-1: $font-source-sans-pro, "Helvetica Neue", arial, sans-serif;
$font-brand-2: $font-avenir, "Helvetica Neue", arial, sans-serif;
2 changes: 1 addition & 1 deletion src/assets/scss/base/_base-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body {
line-height: 140%;
text-size-adjust: 100%;

@include media('lg') {
@include media("lg") {
font-size: 1.8rem;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/components/_components-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
font-weight: 400;

&:before {
content: '';
content: "";
display: inline-block;
position: absolute;
bottom: -0.1em;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/scss/components/_components-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
padding-right: 3rem;
padding-left: 3rem;

@include media('sm') {
@include media("sm") {
padding-right: 2rem;
padding-left: 2rem;
}
Expand Down Expand Up @@ -46,7 +46,7 @@
padding-top: 6rem;
padding-bottom: 6rem;

@include media('sm') {
@include media("sm") {
padding-top: 4rem;
padding-bottom: 4rem;
}
Expand Down
10 changes: 5 additions & 5 deletions src/assets/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
//----------------------------------------------------------------------
// variables
// -----------------
@import 'abstracts/variables/abstracts-variables-breakpoints';
@import 'abstracts/variables/abstracts-variables-colors';
@import 'abstracts/variables/abstracts-variables-fonts';
@import "abstracts/variables/abstracts-variables-breakpoints";
@import "abstracts/variables/abstracts-variables-colors";
@import "abstracts/variables/abstracts-variables-fonts";
// functions
// -----------------
@import 'abstracts/functions/abstracts-functions-contains';
@import "abstracts/functions/abstracts-functions-contains";
// mixins
// -----------------
@import 'abstracts/mixins/abstracts-mixins-media-queries';
@import "abstracts/mixins/abstracts-mixins-media-queries";

0 comments on commit ba5e541

Please sign in to comment.