Download the PHP package redcatphp/stylize without Composer
On this page you can find all versions of the php package redcatphp/stylize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download redcatphp/stylize
More information about redcatphp/stylize
Files in redcatphp/stylize
Package stylize
Short Description Stylize - Css Preprocessor using Scss syntax ( SASS 3.x ) ported to PHP with added supports: php imbrication, php mixin, mixin autoload, extend autoload, font autoload - derived from leafo-scssphp
License LGPL-3.0+ CC0-1.0
Homepage http://redcatphp.com/stylize-scss
Informations about the package stylize
Stylize
Stylize is a CSS Pre-processor using Scss syntax from SASS ( version 3.x ) ported to PHP with additional features.
If you're not familiar with this language, you can consult the basic documentation on SASS. I'll describe here only the PHP API and exclusive features of Stylize. The source code is derived from the excellent leafo-scssphp.
Additional Features to SCSS
Basic Usage
Compiler
Server
The server will handle cache and rebuild it only if the files has changed and also deal in HTTP via Etag and Last-Modified. It also include by default, if they are present, "_config.scss" and "_var.scss". It will use a cache directory by default which is ".tmp/stylish/" from current working directory and which need to be writeable (chmod 0777).
PHP Support
The php will be executed before SCSS syntax parser.
By dint of tokenizer, the php support allow you tu use short php syntax even if short_open_tag is not enabled in php.ini.
Imbrication
Hybride PHP Mixin
The hybride PHP mixins allow you to get your parameters passed to include as php variables in mixin declaration and using a different syntax for include parameters.
The syntax of hybride php mixins parameters is simple: the separator is the comma "," and no quotes are required, all parameters will be automaticaly typed.
The difference in declaration is that you have to use a "@?" instead of "@" and same for include: "@?mixin " instead of "@mixin " and "@?include " instead of "@include ".
Let's take an example of declaration (the grid from RedCat's SCSS Toolbox):
And then, a usage:
Autoload Support
Mixin
If the mixin to include isn't allready defined when used, the autoload support will look for presence of file corresponding to name of mixin in import paths followed by "include" and then ".scss" extension: $import-path/include/$name-of-mixin.scss. If they exists it will import them.
This code will trigger autoload to look for include/clearfix.sccs and include/icon.scss in the import paths and import them.
Extend
If the class to extend isn't allready defined when used, the autoload support will look for presence of file corresponding to name of class in import paths followed by "extend" and then ".scss" extension: $import-path/extend/$name-of-class.scss. If they exists it will import them.
This code will trigger autoload to look for extend/surikat-powered.scss in the import paths and import it.
Font
If the font-face declaration corresponding to font-familly which is used isn't allready defined when used, the autoload support will look for presence of file corresponding to name of font-family (lowercase and with spaces replaced by hyphen -) in import paths followed by "font" and then ".scss" extension: $import-path/font/$name-of-font.scss. If they exists it will import them. That doesn't work with variable font-name.
This code will trigger autoload to look for font/indie-flower.scss and font/rock-salt.scss in the import paths and import it.