From 15923f76331e71fbffbfd605458ea6fec5aca109 Mon Sep 17 00:00:00 2001 From: KTB <10225525+ktb83@users.noreply.github.com> Date: Sun, 12 Jul 2020 03:40:33 -0400 Subject: [PATCH] Replace deprecated Ruby Sass with SassC #734 (#740) * Update README.md with instructions to use SassC Updates the Build It instructions for using SassC instead of Ruby Sass * Updates Makefile to replace Ruby Sass with SassC This commit replaces the use of the Ruby Sass scss command with SassC's sassc command. Due to the more limited functionality of sassc, output directories must be created prior to running the command and only one file may be processed at a time unlike the many-to-many mode functionality of the scss command. * Makes import directive relative in _gnome-terminal.scss This commit changes the "widgets/button" import directive to be relative in the gtk-3.20 _gnome-terminal.scss file which is necessary when using SassC. * Removes import directive in _gnome-terminal.scss This commit removes the "widgets/button" import directive in the gtk-3.20 _gnome-terminal.scss file which is unnecessary. Co-authored-by: KTB --- Makefile | 12 ++++++++---- README.md | 12 +++++------- src/gtk-3.20/scss/apps/_gnome-terminal.scss | 2 -- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d2735a9..c580a2a 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SASS=scss -SASSFLAGS=--sourcemap=none +SASS=sassc +SASSFLAGS=-M -t expanded GLIB_COMPILE_RESOURCES=glib-compile-resources RES_DIR=src/gtk-3.0 SCSS_DIR=$(RES_DIR)/scss @@ -14,8 +14,12 @@ UTILS=scripts/utils.sh all: clean gresource css: - $(SASS) --update $(SASSFLAGS) $(SCSS_DIR):$(DIST_DIR) - $(SASS) --update $(SASSFLAGS) $(SCSS_DIR320):$(DIST_DIR320) + mkdir $(DIST_DIR) + $(SASS) $(SASSFLAGS) $(SCSS_DIR)/gtk.scss $(DIST_DIR)/gtk.css + $(SASS) $(SASSFLAGS) $(SCSS_DIR)/gtk-dark.scss $(DIST_DIR)/gtk-dark.css + mkdir $(DIST_DIR320) + $(SASS) $(SASSFLAGS) $(SCSS_DIR320)/gtk.scss $(DIST_DIR320)/gtk.css + $(SASS) $(SASSFLAGS) $(SCSS_DIR320)/gtk-dark.scss $(DIST_DIR320)/gtk-dark.css gresource: css $(GLIB_COMPILE_RESOURCES) --sourcedir=$(RES_DIR) $(RES_DIR)/gtk.gresource.xml diff --git a/README.md b/README.md index e2badb9..4c9191c 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,16 @@ First, you need to compile the theme using the [Sass](http://sass-lang.com/) compiler. -To install Sass, install Ruby and the gem command using your distribution's package manager. Then install `sass` with the `gem` command, - -`gem install sass` (not needed for Ubuntu/Debian) +You will need to install SassC (`sassc`) which is likely to be available as a package in your distribution's software repositories. You'll also need the ```glib-compile-schemas``` and ```gdk-pixbuf-pixdata``` commands in your path to generate the gresource binary. Install them using your distribution's package manager. |Distro|Commands| |:----:|:----:| -|![arch][arch]  ![antergos][antergos]|`sudo pacman -S glib2 gdk-pixbuf2`| -|![opensuse][opensuse]|`sudo zypper install glib2-devel gdk-pixbuf-devel`| -|![fedora][fedora]|`sudo dnf install glib2-devel gdk-pixbuf2-devel`| -|![debian][debian]  ![ubuntu][ubuntu]|`sudo apt-get install ruby-sass libglib2.0-dev libgdk-pixbuf2.0-dev libxml2-utils`| +|![arch][arch]  ![antergos][antergos]|`sudo pacman -S sassc glib2 gdk-pixbuf2`| +|![opensuse][opensuse]|`sudo zypper install sassc glib2-devel gdk-pixbuf-devel`| +|![fedora][fedora]|`sudo dnf install sassc glib2-devel gdk-pixbuf2-devel`| +|![debian][debian]  ![ubuntu][ubuntu]|`sudo apt-get install sassc libglib2.0-dev libgdk-pixbuf2.0-dev libxml2-utils`| After installing all the dependencies, change to the cloned directory and, run the following in Terminal, diff --git a/src/gtk-3.20/scss/apps/_gnome-terminal.scss b/src/gtk-3.20/scss/apps/_gnome-terminal.scss index fd3af1c..6e9ee4e 100644 --- a/src/gtk-3.20/scss/apps/_gnome-terminal.scss +++ b/src/gtk-3.20/scss/apps/_gnome-terminal.scss @@ -1,5 +1,3 @@ -@import "widgets/button"; - /********************** ! Genome Terminal * ***********************/