Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sass): update depreciated division on dart sass #28

Merged
merged 3 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ function compileHTML() {
.pipe(browserSync.stream());
}

//Concat JS
function concatJs() {
console.log("\n\t" + logSymbols.info, "Compiling Vendor Js..\n");
return src([
'src/vendor/js/*',
])
.pipe(sourcemaps.init())
.pipe(concat('app.js'))
.pipe(sourcemaps.write('./'))
.pipe(dest('dist/js'))
.pipe(browserSync.stream());
}

//Concat CSS Plugins
function concatCssPlugins() {
console.log("\n\t" + logSymbols.info, "Compiling Plugin styles..\n");
Expand Down Expand Up @@ -184,13 +197,31 @@ function devClean() {
return del([options.paths.dist.base]);
}

const buildTasks = [
devClean, // Clean Dist Folder
resetPages,
parallel(
concatJs,
concatCssPlugins,
copyFonts,
compileSCSS,
javascriptBuild,
devImages,
compileHTML
),
]

exports.setup = series(setupBulma);

exports.prod = series(
...buildTasks
);

exports.default = series(
devClean, // Clean Dist Folder
resetPages,
parallel(copyFonts, concatCssPlugins, compileSCSS, javascriptBuild, devImages, compileHTML),
livePreview, // Live Preview Build
watchFiles // Watch for Live Changes
);

12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions src/layouts/ico.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Krypton</title>

<link rel="icon" type="image/png" href="img/favicon.png" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Cabin" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400" rel="stylesheet">

<link rel="stylesheet" href="{{root}}/css/app.css">
<link rel="stylesheet" type="text/css" href="{{root}}/css/main.css">
</head>

<body>

{{> pageloader}}
{{> body}}
{{> footer}}
{{> backtotop}}

<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script src="./js/bundle.js"></script>

</body>

</html>
3 changes: 2 additions & 1 deletion src/sass/sass/components/level.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$level-item-spacing: ($block-spacing / 2) !default
@use "sass:math"
$level-item-spacing: math.div($block-spacing, 2) !default

.level
@extend %block
Expand Down
13 changes: 7 additions & 6 deletions src/sass/sass/elements/button.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:math"
$button-color: $text-strong !default
$button-background-color: $scheme-main !default
$button-family: false !default
Expand Down Expand Up @@ -73,14 +74,14 @@ $button-colors: $colors !default
height: 1.5em
width: 1.5em
&:first-child:not(:last-child)
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}), false)
+ltr-property("margin", $button-padding-horizontal / 4)
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}), false)
+ltr-property("margin", math.div($button-padding-horizontal, 4))
&:last-child:not(:first-child)
+ltr-property("margin", $button-padding-horizontal / 4, false)
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}))
+ltr-property("margin", math.div($button-padding-horizontal, 4), false)
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}))
&:first-child:last-child
margin-left: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
margin-right: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
margin-left: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
margin-right: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
// States
&:hover,
&.is-hovered
Expand Down
29 changes: 15 additions & 14 deletions src/sass/sass/grid/columns.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:math"
$column-gap: 0.75rem !default

.column
Expand Down Expand Up @@ -59,9 +60,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
.columns.is-mobile > &.is-#{$i}
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
.columns.is-mobile > &.is-offset-#{$i}
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+mobile
&.is-narrow-mobile
flex: none
Expand Down Expand Up @@ -116,9 +117,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
&.is-#{$i}-mobile
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i}-mobile
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+tablet
&.is-narrow,
&.is-narrow-tablet
Expand Down Expand Up @@ -194,10 +195,10 @@ $column-gap: 0.75rem !default
&.is-#{$i},
&.is-#{$i}-tablet
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i},
&.is-offset-#{$i}-tablet
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+touch
&.is-narrow-touch
flex: none
Expand Down Expand Up @@ -252,9 +253,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
&.is-#{$i}-touch
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i}-touch
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+desktop
&.is-narrow-desktop
flex: none
Expand Down Expand Up @@ -309,9 +310,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
&.is-#{$i}-desktop
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i}-desktop
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+widescreen
&.is-narrow-widescreen
flex: none
Expand Down Expand Up @@ -366,9 +367,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
&.is-#{$i}-widescreen
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i}-widescreen
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))
+fullhd
&.is-narrow-fullhd
flex: none
Expand Down Expand Up @@ -423,9 +424,9 @@ $column-gap: 0.75rem !default
@for $i from 0 through 12
&.is-#{$i}-fullhd
flex: none
width: percentage($i / 12)
width: percentage(math.div($i, 12))
&.is-offset-#{$i}-fullhd
margin-left: percentage($i / 12)
margin-left: percentage(math.div($i, 12))

.columns
margin-left: (-$column-gap)
Expand Down
3 changes: 2 additions & 1 deletion src/sass/sass/grid/tiles.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:math"
$tile-spacing: 0.75rem !default

.tile
Expand Down Expand Up @@ -31,4 +32,4 @@ $tile-spacing: 0.75rem !default
@for $i from 1 through 12
&.is-#{$i}
flex: none
width: ($i / 12) * 100%
width: math.div($i, 12) * 100%
7 changes: 4 additions & 3 deletions src/sass/sass/utilities/functions.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:math"
@function mergeColorMaps($bulma-colors, $custom-colors)
// We return at least Bulma's hard-coded colors
$merged-colors: $bulma-colors
Expand Down Expand Up @@ -67,11 +68,11 @@
$color-rgb: ('red': red($color),'green': green($color),'blue': blue($color))
@each $name, $value in $color-rgb
$adjusted: 0
$value: $value / 255
$value: math.div($value, 255)
@if $value < 0.03928
$value: $value / 12.92
$value: math.div($value, 12.92)
@else
$value: ($value + .055) / 1.055
$value: math.div(($value + .055), 1.055)
$value: powerNumber($value, 2)
$color-rgb: map-merge($color-rgb, ($name: $value))
@return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722)
Expand Down