mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 05:30:21 -04:00
Merge pull request #3755 from alphagov/remove-inlining-of-images
Remove inlining of images in CSS
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
// Copy of _url-helpers.scss in govuk_frontend_toolkit
|
||||
// to allow us to use gulp-base64-inline on all our images
|
||||
// gulp-base64-inline requires you to specify which of your
|
||||
// images you want encoded by using the `inline()` function
|
||||
// see https://github.com/goschevski/gulp-base64-inline
|
||||
// to prepend the path to where we store images
|
||||
|
||||
@function file-url($file) {
|
||||
$url: '';
|
||||
@if $path {
|
||||
$url: inline($path + $file);
|
||||
$url: url($path + $file);
|
||||
} @else {
|
||||
$url: image-url($file);
|
||||
$url: url($file);
|
||||
}
|
||||
@return $url;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ const stylish = require('jshint-stylish');
|
||||
const plugins = {};
|
||||
plugins.addSrc = require('gulp-add-src');
|
||||
plugins.babel = require('gulp-babel');
|
||||
plugins.base64 = require('gulp-base64-inline');
|
||||
plugins.cleanCSS = require('gulp-clean-css');
|
||||
plugins.concat = require('gulp-concat');
|
||||
plugins.cssUrlAdjuster = require('gulp-css-url-adjuster');
|
||||
@@ -209,7 +208,6 @@ const sass = () => {
|
||||
paths.govuk_frontend,
|
||||
]
|
||||
}))
|
||||
.pipe(plugins.base64('../..'))
|
||||
.pipe(plugins.cssUrlAdjuster({
|
||||
replace: [staticPathMatcher, '/']
|
||||
}))
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
"gulp": "4.0.0",
|
||||
"gulp-add-src": "1.0.0",
|
||||
"gulp-babel": "8.0.0",
|
||||
"gulp-base64-inline": "1.0.4",
|
||||
"gulp-better-rollup": "4.0.1",
|
||||
"gulp-clean-css": "4.2.0",
|
||||
"gulp-concat": "2.6.1",
|
||||
|
||||
Reference in New Issue
Block a user