Remove the "div-css" gulp task (PR 15968 follow-up)
After the compatibility updates in PR 15968 it's no longer strictly necessary to build the `viewer.css` file in order for the *development viewer* to work in Chromium-based browsers. *Please note:* Given that Chromium-based browsers still don't support the *unprefixed* `mask-image` property the icons won't look right, however the development viewer itself works. Given that Firefox is the *primary* development target, and that running `gulp generic` locally will generate polyfilled CSS, it seems reasonable to make this simplification here.
This commit is contained in:
parent
72abcedf48
commit
8f37301d1f
28
gulpfile.js
28
gulpfile.js
@ -2004,27 +2004,6 @@ gulp.task(
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task("dev-css", function createDevCSS() {
|
||||
console.log();
|
||||
console.log("### Building development CSS");
|
||||
|
||||
const defines = builder.merge(DEFINES, { GENERIC: true, TESTING: true });
|
||||
const cssDir = BUILD_DIR + "dev-css/";
|
||||
|
||||
return merge([
|
||||
gulp.src("web/images/*", { base: "web/" }).pipe(gulp.dest(cssDir)),
|
||||
|
||||
preprocessCSS("web/viewer.css", defines)
|
||||
.pipe(
|
||||
postcss([
|
||||
postcssDirPseudoClass(),
|
||||
autoprefixer({ overrideBrowserslist: ["last 1 versions"] }),
|
||||
])
|
||||
)
|
||||
.pipe(gulp.dest(cssDir)),
|
||||
]);
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
"dev-sandbox",
|
||||
gulp.series(
|
||||
@ -2053,13 +2032,6 @@ gulp.task(
|
||||
gulp.task(
|
||||
"server",
|
||||
gulp.parallel(
|
||||
function watchDevCSS() {
|
||||
gulp.watch(
|
||||
["web/*.css", "web/images/*"],
|
||||
{ ignoreInitial: false },
|
||||
gulp.series("dev-css")
|
||||
);
|
||||
},
|
||||
function watchDevFitCurve() {
|
||||
gulp.watch(
|
||||
["src/display/editor/*"],
|
||||
|
@ -61,13 +61,6 @@ function getViewerConfiguration() {
|
||||
function webViewerLoad() {
|
||||
const config = getViewerConfiguration();
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) {
|
||||
if (window.chrome) {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "../build/dev-css/viewer.css";
|
||||
|
||||
document.head.append(link);
|
||||
}
|
||||
window.isGECKOVIEW = true;
|
||||
|
||||
import("pdfjs-web/genericcom.js").then(function (genericCom) {
|
||||
|
@ -207,14 +207,6 @@ function getViewerConfiguration() {
|
||||
function webViewerLoad() {
|
||||
const config = getViewerConfiguration();
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) {
|
||||
if (window.chrome) {
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "../build/dev-css/viewer.css";
|
||||
|
||||
document.head.append(link);
|
||||
}
|
||||
|
||||
Promise.all([
|
||||
import("pdfjs-web/genericcom.js"),
|
||||
import("pdfjs-web/pdf_print_service.js"),
|
||||
|
Loading…
Reference in New Issue
Block a user