Skip to content

Commit 0ae91ea

Browse files
author
Keith Daulton
committed
Updates style organization (WIP)
1 parent 4f03fca commit 0ae91ea

File tree

13 files changed

+380
-173
lines changed

13 files changed

+380
-173
lines changed

assets/styles/site.css

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

assets/styles/styles.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
const { src, dest, parallel, watch } = require('gulp');
22
const sass = require('gulp-sass');
3-
const concat = require('gulp-concat');
3+
//const concat = require('gulp-concat');
4+
const sourcemaps = require('gulp-sourcemaps');
45
//const autoprefixer = require('gulp-autoprefixer');
56
const rollupEach = require('gulp-rollup-each');
67

78
function styles() {
8-
return src('src/styles/*.scss', { sourcemaps: true })
9+
return src('src/styles/*.scss')
10+
.pipe(sourcemaps.init())
911
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
1012
// css custom property support makes this practically pointless
1113
// (see: https://caniuse.com/#feat=css-variables vs npx browserslist '> .5%')
1214
// .pipe(autoprefixer({
1315
// browsers: ['> .5%'],
1416
// cascade: false
1517
// }))
16-
.pipe(dest('assets/styles'), { sourcemaps: true });
18+
.pipe(sourcemaps.write())
19+
.pipe(dest('assets/styles'));
1720
}
1821

1922
// TODO: add typescript compilation
@@ -30,8 +33,8 @@ function scripts() {
3033
.pipe(dest('assets/scripts', { sourcemaps: true }));
3134
}
3235

33-
// watch('src/styles/**/*.scss', styles);
34-
// watch('src/scripts/*.js', scripts);
36+
watch('src/styles/**/*.scss', styles);
37+
watch('src/scripts/*.js', scripts);
3538

3639
exports.scripts = scripts;
3740
exports.styles = styles;

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"gulp-autoprefixer": "^6.1.0",
2525
"gulp-concat": "^2.6.1",
2626
"gulp-rollup-each": "^3.0.0",
27-
"gulp-sass": "^4.0.2"
27+
"gulp-sass": "^4.0.2",
28+
"gulp-sourcemaps": "^2.6.5"
2829
}
2930
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@keyframes phone-home {
2+
from {
3+
background-position: left calc(50vw + 20px) bottom -100vh;
4+
}
5+
6+
to {
7+
background-position: left calc(50vw + 20px) bottom -30vh;
8+
}
9+
}
10+
11+
@keyframes fade-in-down {
12+
from {
13+
opacity: 0;
14+
transform: translate3d(0, -100% ,0);
15+
}
16+
17+
to {
18+
opacity: 1;
19+
transform: translate3d(0, 0, 0);
20+
}
21+
}
22+
23+
// FIXME: needs to be on animation classes only
24+
.h-vp-in,
25+
.h-vp-in-once {
26+
&.is-in-view {
27+
animation-duration: 1s;
28+
animation-fill-mode: both;
29+
animation-delay: .25s;
30+
}
31+
}
32+
33+
.a-fade-in-down {
34+
&:not(.h-vp-in):not(.h-vp-in-once),
35+
&.is-in-view {
36+
animation-name: fade-in-down;
37+
}
38+
}

src/styles/elements/_baseline.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*,
2+
*:before,
3+
*:after {
4+
box-sizing: border-box;
5+
}
6+
7+
body {
8+
margin: 0;
9+
}
10+
11+
figure {
12+
margin: 0;
13+
}

0 commit comments

Comments
 (0)