Skip to content

Commit 3121cb1

Browse files
committedOct 26, 2020
switch to postcss
1 parent 0691d14 commit 3121cb1

11 files changed

+1744
-1129
lines changed
 

‎dist/filepond-plugin-file-poster.css

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePondPluginFilePoster 2.3.0
2+
* FilePondPluginFilePoster 2.3.1
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/
@@ -12,7 +12,6 @@
1212
.filepond--image-preview-wrapper ~ .filepond--file-poster-wrapper {
1313
display: none;
1414
}
15-
1615
.filepond--file-poster-overlay {
1716
display: block;
1817
position: absolute;
@@ -32,34 +31,42 @@
3231
user-select: none;
3332
}
3433

34+
/* success (is second canvas) */
3535
.filepond--file-poster-overlay:nth-of-type(2) {
3636
mix-blend-mode: normal;
3737
}
3838

39+
/* error (is third canvas) */
3940
.filepond--file-poster-overlay:nth-of-type(3) {
4041
mix-blend-mode: normal;
4142
}
4243

44+
/* disable for Safari as mix-blend-mode causes the overflow:hidden of the parent container to not work */
4345
@supports (-webkit-marquee-repetition: infinite) and
4446
((-o-object-fit: fill) or (object-fit: fill)) {
4547
.filepond--file-poster-overlay {
4648
mix-blend-mode: normal;
4749
}
4850
}
49-
5051
.filepond--file-poster-wrapper {
52+
/* no interaction */
5153
pointer-events: none;
54+
55+
/* have preview fill up all available space */
5256
position: absolute;
5357
left: 0;
5458
top: 0;
5559
right: 0;
5660
height: 100%;
5761
margin: 0;
62+
63+
/* radius is .05em less to prevent the panel background color from shining through */
5864
border-radius: 0.45em;
5965
overflow: hidden;
66+
67+
/* this seems to prevent Chrome from redrawing this layer constantly */
6068
background: rgba(0, 0, 0, 0.01);
6169
}
62-
6370
.filepond--file-poster {
6471
position: relative;
6572
z-index: 1;
@@ -70,6 +77,8 @@
7077
-webkit-transform-origin: center center;
7178
transform-origin: center center;
7279
background: #222;
80+
81+
/* will be animated */
7382
will-change: transform, opacity;
7483
}
7584
.filepond--file-poster img {

‎dist/filepond-plugin-file-poster.esm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePondPluginFilePoster 2.3.0
2+
* FilePondPluginFilePoster 2.3.1
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/

‎dist/filepond-plugin-file-poster.esm.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/filepond-plugin-file-poster.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePondPluginFilePoster 2.3.0
2+
* FilePondPluginFilePoster 2.3.1
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/

‎dist/filepond-plugin-file-poster.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/filepond-plugin-file-poster.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json

+1,711-1,107
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "filepond-plugin-file-poster",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "File Poster Plugin for FilePond",
55
"license": "MIT",
66
"author": {
@@ -28,8 +28,8 @@
2828
"build": "npm run scripts | npm run styles",
2929
"scripts": "npx rollup -c",
3030
"styles": "npm run styles:pretty && npm run styles:nano",
31-
"styles:pretty": "cat src/css/* | npx node-sass | npx postcss --no-map --use autoprefixer | npx prettier --single-quote --parser css | node banner-cli.js FilePondPluginFilePoster > dist/filepond-plugin-file-poster.css",
32-
"styles:nano": "cat src/css/* | npx node-sass | npx postcss --no-map --use autoprefixer --use cssnano | node banner-cli.js FilePondPluginFilePoster > dist/filepond-plugin-file-poster.min.css"
31+
"styles:pretty": "cat src/css/* | npx postcss --no-map --use postcss-nested autoprefixer | npx prettier --single-quote --parser css | node banner-cli.js FilePondPluginFilePoster > dist/filepond-plugin-file-poster.css",
32+
"styles:nano": "cat src/css/* | npx postcss --no-map --use postcss-nested autoprefixer --use cssnano | node banner-cli.js FilePondPluginFilePoster > dist/filepond-plugin-file-poster.min.css"
3333
},
3434
"peerDependencies": {
3535
"filepond": ">=4.x <5.x"
@@ -40,7 +40,9 @@
4040
"autoprefixer": "^9.5.0",
4141
"cssnano": "^4.1.10",
4242
"node-sass": "^4.14.1",
43-
"postcss-cli": "^6.1.2",
43+
"postcss": "^8.1.4",
44+
"postcss-cli": "^8.1.0",
45+
"postcss-nested": "^5.0.1",
4446
"prettier": "^1.16.4",
4547
"rollup": "^1.7.0",
4648
"rollup-plugin-babel": "^4.3.2",
@@ -50,4 +52,4 @@
5052
"rollup-plugin-prettier": "^0.6.0",
5153
"rollup-plugin-terser": "^4.0.4"
5254
}
53-
}
55+
}

‎src/css/file-poster-overlay.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
user-select: none;
1515
}
1616

17-
// success (is second canvas)
17+
/* success (is second canvas) */
1818
.filepond--file-poster-overlay:nth-of-type(2) {
1919
mix-blend-mode: normal;
2020
}
2121

22-
// error (is third canvas)
22+
/* error (is third canvas) */
2323
.filepond--file-poster-overlay:nth-of-type(3) {
2424
mix-blend-mode: normal;
2525
}
2626

27-
// disable for Safari as mix-blend-mode causes the overflow:hidden of the parent container to not work
27+
/* disable for Safari as mix-blend-mode causes the overflow:hidden of the parent container to not work */
2828
@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill) {
2929
.filepond--file-poster-overlay {
3030
mix-blend-mode: normal;

‎src/css/file-poster-wrapper.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
.filepond--file-poster-wrapper {
2-
// no interaction
2+
/* no interaction */
33
pointer-events: none;
44

5-
// have preview fill up all available space
5+
/* have preview fill up all available space */
66
position: absolute;
77
left: 0;
88
top: 0;
99
right: 0;
1010
height:100%;
1111
margin: 0;
1212

13-
// radius is .05em less to prevent the panel background color from shining through
13+
/* radius is .05em less to prevent the panel background color from shining through */
1414
border-radius: 0.45em;
1515
overflow: hidden;
1616

17-
// this seems to prevent Chrome from redrawing this layer constantly
17+
/* this seems to prevent Chrome from redrawing this layer constantly */
1818
background: rgba(0, 0, 0, 0.01);
1919
}

‎src/css/file-poster.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
transform-origin: center center;
99
background: #222;
1010

11-
// will be animated
11+
/* will be animated */
1212
will-change: transform, opacity;
1313

1414
img {

0 commit comments

Comments
 (0)
Please sign in to comment.