Bugzilla – Attachment 113950 Details for
Bug 27072
Don't process staff interface CSS with rtlcss
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27072: Don't process staff interface CSS with rtlcss
Bug-27072-Dont-process-staff-interface-CSS-with-rt.patch (text/plain), 2.77 KB, created by
Jonathan Druart
on 2020-11-24 14:04:21 UTC
(
hide
)
Description:
Bug 27072: Don't process staff interface CSS with rtlcss
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-24 14:04:21 UTC
Size:
2.77 KB
patch
obsolete
>From 33a7ae068a4f575ec9ff719824850e8834d033fd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 23 Nov 2020 14:15:14 +0000 >Subject: [PATCH] Bug 27072: Don't process staff interface CSS with rtlcss > >This patch changes Koha's gulpfile to add a check for the "OPAC" context >before using rtlcss to automatically build right-to-left versions of >CSS. > >To test, apply the patch and test the process of building CSS for both >the OPAC and staff client: > >- "yarn css --view opac" : This should build unminified CSS for the > OPAC, including map files in bootstrap/css/maps > >- "yarn build --view opac" : This should build minified CSS for the > OPAC and generate the RTL versions. > >- "yarn css" : This should build unminified CSS for the staff > interface, including map files in prog/css/maps. > >- "yarn build" : This should build minified CSS for the > staff interface, with no creation of RTL versions. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > gulpfile.js | 32 ++++++++++++++++++++++---------- > 1 file changed, 22 insertions(+), 10 deletions(-) > >diff --git a/gulpfile.js b/gulpfile.js >index 1a37a15e3c..cc3ba2ee17 100644 >--- a/gulpfile.js >+++ b/gulpfile.js >@@ -42,35 +42,47 @@ var sassOptions = { > > // CSS processing for development > function css() { >- return src(css_base + "/src/**/*.scss") >+ var stream = src(css_base + "/src/**/*.scss") > .pipe(sourcemaps.init()) > .pipe(sass(sassOptions).on('error', sass.logError)) > .pipe(autoprefixer()) >- .pipe(sourcemaps.write('./maps')) >- .pipe(dest(css_base)) >+ .pipe(dest(css_base)); > >- .pipe(rtlcss()) >- .pipe(rename({ >- suffix: '-rtl' >- })) // Append "-rtl" to the filename. >+ if (args.view == "opac") { >+ stream = stream >+ .pipe(rtlcss()) >+ .pipe(rename({ >+ suffix: '-rtl' >+ })) // Append "-rtl" to the filename. >+ .pipe(dest(css_base)); >+ } >+ >+ stream = stream.pipe(sourcemaps.write('./maps')) > .pipe(dest(css_base)); >+ >+ return stream; >+ > } > > // CSS processing for production > function build() { >- return src(css_base + "/src/**/*.scss") >+ var stream = src(css_base + "/src/**/*.scss") > .pipe(sass(sassOptions).on('error', sass.logError)) > .pipe(autoprefixer()) > .pipe(cssnano({ > zindex: false > })) >- .pipe(dest(css_base)) >+ .pipe(dest(css_base)); > >- .pipe(rtlcss()) >+ if( args.view == "opac" ){ >+ stream = stream.pipe(rtlcss()) > .pipe(rename({ > suffix: '-rtl' > })) // Append "-rtl" to the filename. > .pipe(dest(css_base)); >+ } >+ >+ return stream; > } > > const poTasks = { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27072
:
113925
|
113938
|
113950
|
113951