Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Sass Sources

Source Sass SCSS files to build CSS stylesheets used in this project.

NOTE — The project has swtiched to Dart Sass now.


Table of Contents


About

These Sass SCSS source are used to create the custom CSS which is then injected into the docinfo file required for each highlighter, with the exception of highlight.js, which uses the bare CSS file.

Multiple Highlighters Support

Because some documents rely on different syntax highlighters, this folder builds different CSS stylesheets and docinfo files, each targetting a specific highlighter.

The Sass sources are broken into modular units so that highlighter specific modules are kept separate from shared modules, but always ensuring that common modules are reusable with all lighters stylesheets.

Colour Schemes

The custom CSS generated is mostly used to customize the different colour themes for ALAN source code (more than one theme available for ALAN), as well as other languages and mockup blocks styles (e.g. CMD, game transcript, BNF, etc.)

For more info on the colour schemes used here, and their palette swatches, see:

Building

To compile all the Sass sources to CSS and update the dependencies of all HTML documents:

Beside compiling the Sass sources to CSS, the script will also build the docinfo files required for HTML docs that use Highlight or Rouge; all target files are built in the assets folder of their highlighter.

Build Targets

The build.sh script will generate a different target file for each highlighter, as indicated below.

highlighter scss source output file
Highlight highlight.scss ../../_assets/hl/adoc/docinfo.html
highlight.js highlight-js.scss ../../_assets/hjs/styles/github.min.css
Rouge rouge.scss ../../_assets/rouge/docinfo.html

Installing Dart Sass

Since March 11 2019 this project has switched from using Ruby Sass to the newest Dart Sass because starting from March 26 2019 Ruby Sass will no longer be maintained.

Since Dart Sass behaviour is slightly different from Ruby Sass, anyone working on the repository Sass sources must ensure to switch to Dart Sass to avoid creating divergent CSS stylesheets.

The easiest way to install Dart Sass on Windows, and keep it always updated, is to install it via Chocolatey:

Credits and Licenses

Due credits to third party assets used in this directory of the project.

Base16 Color Schemes

The Sass/CSS themes use the following Base16 color schemes:

The Base16 project was created by Chris Kempson:

Base16 Sass

The following Base16 SCSS files:

were taken from the Base16 Sass project by Tristano Ajmone:

released under MIT License.

MIT License

Copyright (c) 2019 Tristano Ajmone <tajmone@gmail.com>
https://github.com/tajmone/Base16-Sass

Copyright (c) 2012 Chris Kempson (http://chriskempson.com)
https://github.com/chriskempson/base16-builder

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.