Skip to content

Commit 9fbbc6c

Browse files
Merge pull request #28 from cssninjaStudio/dart-sass
fix(sass): update depreciated division on dart sass
2 parents c75a23d + 575f608 commit 9fbbc6c

File tree

8 files changed

+98
-31
lines changed

8 files changed

+98
-31
lines changed

gulpfile.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ function compileHTML() {
9191
.pipe(browserSync.stream());
9292
}
9393

94+
//Concat JS
95+
function concatJs() {
96+
console.log("\n\t" + logSymbols.info, "Compiling Vendor Js..\n");
97+
return src([
98+
'src/vendor/js/*',
99+
])
100+
.pipe(sourcemaps.init())
101+
.pipe(concat('app.js'))
102+
.pipe(sourcemaps.write('./'))
103+
.pipe(dest('dist/js'))
104+
.pipe(browserSync.stream());
105+
}
106+
94107
//Concat CSS Plugins
95108
function concatCssPlugins() {
96109
console.log("\n\t" + logSymbols.info, "Compiling Plugin styles..\n");
@@ -184,13 +197,31 @@ function devClean() {
184197
return del([options.paths.dist.base]);
185198
}
186199

200+
const buildTasks = [
201+
devClean, // Clean Dist Folder
202+
resetPages,
203+
parallel(
204+
concatJs,
205+
concatCssPlugins,
206+
copyFonts,
207+
compileSCSS,
208+
javascriptBuild,
209+
devImages,
210+
compileHTML
211+
),
212+
]
187213

188214
exports.setup = series(setupBulma);
189215

216+
exports.prod = series(
217+
...buildTasks
218+
);
219+
190220
exports.default = series(
191221
devClean, // Clean Dist Folder
192222
resetPages,
193223
parallel(copyFonts, concatCssPlugins, compileSCSS, javascriptBuild, devImages, compileHTML),
194224
livePreview, // Live Preview Build
195225
watchFiles // Watch for Live Changes
196226
);
227+

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/layouts/ico.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Krypton</title>
9+
10+
<link rel="icon" type="image/png" href="img/favicon.png" />
11+
<link rel="preconnect" href="https://fonts.gstatic.com">
12+
<link href="https://fonts.googleapis.com/css?family=Cabin" rel="stylesheet">
13+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400" rel="stylesheet">
14+
15+
<link rel="stylesheet" href="{{root}}/css/app.css">
16+
<link rel="stylesheet" type="text/css" href="{{root}}/css/main.css">
17+
</head>
18+
19+
<body>
20+
21+
{{> pageloader}}
22+
{{> body}}
23+
{{> footer}}
24+
{{> backtotop}}
25+
26+
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
27+
<script src="./js/bundle.js"></script>
28+
29+
</body>
30+
31+
</html>

src/sass/sass/components/level.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
$level-item-spacing: ($block-spacing / 2) !default
1+
@use "sass:math"
2+
$level-item-spacing: math.div($block-spacing, 2) !default
23

34
.level
45
@extend %block

src/sass/sass/elements/button.sass

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$button-color: $text-strong !default
23
$button-background-color: $scheme-main !default
34
$button-family: false !default
@@ -73,14 +74,14 @@ $button-colors: $colors !default
7374
height: 1.5em
7475
width: 1.5em
7576
&:first-child:not(:last-child)
76-
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}), false)
77-
+ltr-property("margin", $button-padding-horizontal / 4)
77+
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}), false)
78+
+ltr-property("margin", math.div($button-padding-horizontal, 4))
7879
&:last-child:not(:first-child)
79-
+ltr-property("margin", $button-padding-horizontal / 4, false)
80-
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}))
80+
+ltr-property("margin", math.div($button-padding-horizontal, 4), false)
81+
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}))
8182
&:first-child:last-child
82-
margin-left: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
83-
margin-right: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
83+
margin-left: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
84+
margin-right: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
8485
// States
8586
&:hover,
8687
&.is-hovered

src/sass/sass/grid/columns.sass

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$column-gap: 0.75rem !default
23

34
.column
@@ -59,9 +60,9 @@ $column-gap: 0.75rem !default
5960
@for $i from 0 through 12
6061
.columns.is-mobile > &.is-#{$i}
6162
flex: none
62-
width: percentage($i / 12)
63+
width: percentage(math.div($i, 12))
6364
.columns.is-mobile > &.is-offset-#{$i}
64-
margin-left: percentage($i / 12)
65+
margin-left: percentage(math.div($i, 12))
6566
+mobile
6667
&.is-narrow-mobile
6768
flex: none
@@ -116,9 +117,9 @@ $column-gap: 0.75rem !default
116117
@for $i from 0 through 12
117118
&.is-#{$i}-mobile
118119
flex: none
119-
width: percentage($i / 12)
120+
width: percentage(math.div($i, 12))
120121
&.is-offset-#{$i}-mobile
121-
margin-left: percentage($i / 12)
122+
margin-left: percentage(math.div($i, 12))
122123
+tablet
123124
&.is-narrow,
124125
&.is-narrow-tablet
@@ -194,10 +195,10 @@ $column-gap: 0.75rem !default
194195
&.is-#{$i},
195196
&.is-#{$i}-tablet
196197
flex: none
197-
width: percentage($i / 12)
198+
width: percentage(math.div($i, 12))
198199
&.is-offset-#{$i},
199200
&.is-offset-#{$i}-tablet
200-
margin-left: percentage($i / 12)
201+
margin-left: percentage(math.div($i, 12))
201202
+touch
202203
&.is-narrow-touch
203204
flex: none
@@ -252,9 +253,9 @@ $column-gap: 0.75rem !default
252253
@for $i from 0 through 12
253254
&.is-#{$i}-touch
254255
flex: none
255-
width: percentage($i / 12)
256+
width: percentage(math.div($i, 12))
256257
&.is-offset-#{$i}-touch
257-
margin-left: percentage($i / 12)
258+
margin-left: percentage(math.div($i, 12))
258259
+desktop
259260
&.is-narrow-desktop
260261
flex: none
@@ -309,9 +310,9 @@ $column-gap: 0.75rem !default
309310
@for $i from 0 through 12
310311
&.is-#{$i}-desktop
311312
flex: none
312-
width: percentage($i / 12)
313+
width: percentage(math.div($i, 12))
313314
&.is-offset-#{$i}-desktop
314-
margin-left: percentage($i / 12)
315+
margin-left: percentage(math.div($i, 12))
315316
+widescreen
316317
&.is-narrow-widescreen
317318
flex: none
@@ -366,9 +367,9 @@ $column-gap: 0.75rem !default
366367
@for $i from 0 through 12
367368
&.is-#{$i}-widescreen
368369
flex: none
369-
width: percentage($i / 12)
370+
width: percentage(math.div($i, 12))
370371
&.is-offset-#{$i}-widescreen
371-
margin-left: percentage($i / 12)
372+
margin-left: percentage(math.div($i, 12))
372373
+fullhd
373374
&.is-narrow-fullhd
374375
flex: none
@@ -423,9 +424,9 @@ $column-gap: 0.75rem !default
423424
@for $i from 0 through 12
424425
&.is-#{$i}-fullhd
425426
flex: none
426-
width: percentage($i / 12)
427+
width: percentage(math.div($i, 12))
427428
&.is-offset-#{$i}-fullhd
428-
margin-left: percentage($i / 12)
429+
margin-left: percentage(math.div($i, 12))
429430

430431
.columns
431432
margin-left: (-$column-gap)

src/sass/sass/grid/tiles.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$tile-spacing: 0.75rem !default
23

34
.tile
@@ -31,4 +32,4 @@ $tile-spacing: 0.75rem !default
3132
@for $i from 1 through 12
3233
&.is-#{$i}
3334
flex: none
34-
width: ($i / 12) * 100%
35+
width: math.div($i, 12) * 100%

src/sass/sass/utilities/functions.sass

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
@function mergeColorMaps($bulma-colors, $custom-colors)
23
// We return at least Bulma's hard-coded colors
34
$merged-colors: $bulma-colors
@@ -67,11 +68,11 @@
6768
$color-rgb: ('red': red($color),'green': green($color),'blue': blue($color))
6869
@each $name, $value in $color-rgb
6970
$adjusted: 0
70-
$value: $value / 255
71+
$value: math.div($value, 255)
7172
@if $value < 0.03928
72-
$value: $value / 12.92
73+
$value: math.div($value, 12.92)
7374
@else
74-
$value: ($value + .055) / 1.055
75+
$value: math.div(($value + .055), 1.055)
7576
$value: powerNumber($value, 2)
7677
$color-rgb: map-merge($color-rgb, ($name: $value))
7778
@return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722)

0 commit comments

Comments
 (0)