Compass is an open-source CSS authoring framework that can compile
.css stylesheet files from
.sass files as they are written, thus making the life of a web designer easier. In this tutorial we will install Compass on RHEL 8 / CentOS 8, with all of it's dependencies.
- How to install dependencies required by Compass
- How to Compass
- How to create a Compass project
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||RHEL 8 / CentOS 8|
|Other||Privileged access to your Linux system as root or via the
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of
How to install compass on Redhat 8 step by step instructions
Installing Compass is an easy task, if we know what packages it needs, but sort of tricky if we are not familiar with
ruby. All packages required are available if we have the subsription management repositories enabled.
- We'll use
dnfto install required packages:
# dnf install ruby ruby-devel rubygems gcc
- Next we use
rubygemsto install Compass:
# gem install compass
- To see our tool working, we can query for the version of Compass:
# compass --version Compass 1.0.3 (Polaris) Copyright (c) 2008-2019 Chris Eppstein Released under the MIT License. Compass is charityware. Please make a tax deductible donation for a worthy cause: http://umdf.org/compass
- The last step is to create an empty Compass project.
As the output suggests, we can begin populating the project with SASS files in the appropriate subdirectory,
$ compass create my_project directory my_project/ directory my_project/sass/ directory my_project/stylesheets/ create my_project/config.rb create my_project/sass/screen.scss [...]
my_project/sass/in the above example. We can set Compass to compile as we edit the
.sassfiles, or compile on demand, etc.