Download the PHP package trampoline-digital/wp-scss without Composer

On this page you can find all versions of the php package trampoline-digital/wp-scss. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-scss

Enable SCSS CSS in WordPress

SCSS is an abstraction layer that adds some very powerful features to CSS. It will speed up your development process and make your life that much easier. Find out more from the links below and then head on back.

WP-SCSS is an add-on is for theme creators, and allows you to build a site using SCSS, and to use variables from the customizer that are live updated. It also allows you to pass arrays and have them converted to SCSS maps.

Installation:

WP-SCSS is installed via composer.

Simply add the following line to your composer.json file's require section :"trampoline-digital/wp-scss": "dev-master"

or

composer require trampoline-digital/wp-scss if you don't want to roll the dice with nightly builds. Then run composer update;

At the top of your functions.php file, add the following line : require_once(__DIR__ . '/vendor/trampoline-digital/wp-scss/wp-scss.php' );

You are now ready to use WP-SCSS

Usage:

To load an SCSS file, simply enqueue it the way you would any normal stylesheet.

`wp_enqueue_style('scss_styles', get_template_directory_uri() . '/assets/scss/scss_styles.scss');`

You won't need a link to your main style sheet in header.php. Just make sure that wp_head() is called in the document head.

All the standard SCSS features are supported as well as @import rules anywhere within the file.

Debugging Having define('WP_DEBUG', true); set will force WP-SCSS to recompile on every page reload.

Passing in variables from PHP

You can pass variables into your .scss files using the scss_vars hook or with the functions defined in the PHP Interface section:

This is an example of how to add a single variable.

This is an example of how to add an array of single variables that are set using the customizer with Kirki.

If you would like to use an SCSS map, just pass though an array in the following format:

You can access the values in SCSS the following way:

Default variables

There is a default variables you can use without worrying about the above code:

$theme-url is the URL of the current theme directory:

It is important to use this because you can't use relative paths - the compiled CSS is stored in the uploads folder as it is the only place you can guarantee being able to write to in any given WordPress installation. As a result relative URLs will break.

TODO

Further Reading

Read the DCDD.js documentation here.

Read the documentation specific to the PHP parser here.

Contributors

This project is a revival (started with a duplication) of Robert O'Rourke's WP-LESS

It goes without saying that this project would never have been possible without the hard work of Robert O'Rourke

Alos, big massive thanks to those whose contributions and discussion helped to build the original WP-LESS plugin.

License

The software is licensed under the MIT Licence.


All versions of wp-scss with dependencies

PHP Build Version
Package Version
Requires php Version >5.2.4
composer/installers Version ~1.0
leafo/scssphp Version ^v0.6.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package trampoline-digital/wp-scss contains the following files

Loading the files please wait ....