1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 23:19:29 +00:00

Added sass helper functions and mixins

This commit is contained in:
2022-01-25 20:08:35 +00:00
parent 5857ed46f4
commit d250ff859f
4 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
@use 'sass:color';
@function darken-colour($colour, $amount: 15) {
@return color.scale($colour, $lightness: $amount * -1%);
}

View File

@@ -15,3 +15,17 @@
}
}
@mixin respond-to($breakpoint) {
$value: map-get($breakpoints, $breakpoint);
@if $value != null {
@media (min-width: $value) {
@content;
}
}
@else {
@warn 'No value could be retrieved from `#{$breakpoint}`. '
+ 'Please make sure it is defined in `$breakpoints` map.';
}
}

View File

@@ -3,3 +3,15 @@ $text-font-stack: 'Roboto', 'Arial', sans-serif !default;
// Colours
$text-colour: rgb(34, 34, 34) !default;
$primary-colour: #d71433;
$secondary-colour: #46b43d;
$primary-colour-dark: darken-colour($primary-colour);
$secondary-colour-dark: darken-colour($secondary-colour);
// Breakpoints
$breakpoints: (
'small' : 767px,
'medium' : 992px,
'large' : 1200px
);

View File

@@ -1,3 +1,4 @@
@import 'abstracts/functions';
@import 'abstracts/variables';
@import 'abstracts/mixins';