Skip to content

Commit

Permalink
build: use postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 3, 2024
1 parent b26322a commit 5fe5a51
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 37 deletions.
17 changes: 10 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict'

const strip = require('gulp-strip-css-comments')
const prefix = require('gulp-autoprefixer')
const cssnano = require('gulp-cssnano')
const uglify = require('gulp-uglify')
const postcss = require('gulp-postcss')
const concat = require('gulp-concat')
const uglify = require('gulp-uglify')
const gulp = require('gulp')

const src = {
Expand All @@ -24,9 +22,14 @@ const styles = () =>
gulp
.src(src.css)
.pipe(concat(`${dist.name.css}.min.css`))
.pipe(prefix())
.pipe(strip({ all: true }))
.pipe(cssnano())
.pipe(
postcss([
require('postcss-focus'),
require('cssnano')({
preset: require('cssnano-preset-advanced')
})
])
)
.pipe(gulp.dest(dist.path))

const scripts = () =>
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,20 @@
"ava": "5",
"browser-sync": "latest",
"concurrently": "latest",
"cssnano": "latest",
"cssnano-preset-advanced": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"github-generate-release": "latest",
"gulp": "latest",
"gulp": "4",
"gulp-autoprefixer": "latest",
"gulp-concat": "latest",
"gulp-cssnano": "latest",
"gulp-strip-css-comments": "latest",
"gulp-postcss": "latest",
"gulp-uglify": "latest",
"nano-staged": "latest",
"npm-check-updates": "latest",
"postcss": "latest",
"postcss-focus": "latest",
"simple-git-hooks": "latest",
"standard": "latest",
"standard-markdown": "latest",
Expand Down
53 changes: 27 additions & 26 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@
::-moz-selection {
background: var(--selection-color);
}

@keyframes octocat {

0%,
to {
transform: rotate(0);
}

20%,
60% {
transform: rotate(-25deg);
}

40%,
80% {
transform: rotate(10deg);
}
}

* {
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
Expand All @@ -75,7 +56,26 @@ body {
overflow-x: hidden;
}

.github-corner {
/* github corner */

@keyframes b {
0%,
100% {
transform: rotate(0);
}

20%,
60% {
transform: rotate(-25deg);
}

40%,
80% {
transform: rotate(10deg);
}
}

.github-corner svg {
border-bottom: 0;
position: fixed;
right: 0;
Expand All @@ -84,17 +84,18 @@ body {
z-index: 1;
}

.github-corner:hover svg .octo-arm {
opacity: 1;
animation: b 560ms ease-in-out;
}

.github-corner svg {
color: var(--bg-color);
fill: var(--primary-color);
color: white;
fill: black;
height: 80px;
width: 80px;
}

.github-corner:hover .octo-arm {
animation: octocat 0.5 ease-in-out;
}

main {
display: block;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion public/css/style.min.css

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

0 comments on commit 5fe5a51

Please sign in to comment.