| Title: | Leaner Style Sheets | 
| Version: | 0.1.1 | 
| Description: | Converts LESS to CSS. It uses V8 engine, where LESS parser is run. Functions for LESS text, file or folder conversion are provided. This work was supported by a junior grant research project by Czech Science Foundation 'GACR' no. 'GJ18-04150Y'. | 
| Depends: | R (≥ 3.4) | 
| License: | MIT + file LICENSE | 
| URL: | https://github.com/ciirc-kso/rless | 
| BugReports: | https://github.com/ciirc-kso/rless/issues | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| Imports: | V8 | 
| RoxygenNote: | 6.1.1 | 
| Suggests: | testthat, knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2019-07-31 19:00:29 UTC; Jerryna | 
| Author: | Jonas Vaclavek [aut, cre], Jakub Kuzilek [aut] | 
| Maintainer: | Jonas Vaclavek <jonas.vaclavek@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2019-07-31 19:20:05 UTC | 
rless: css preprocessor R library
Description
rless is R package providing CSS preprocessor features to R users.
Details
It uses LESS language, which is an CSS extension giving option to use variables, functions or using operators while creating styles. Visit oficial LESS website (http://lesscss.org) for more information about language specifics. The provided LESS content is converted into CSS using V8 JavaScript engine (https://v8.dev/).
Author(s)
Maintainer: Jonas Vaclavek jonas.vaclavek@gmail.com
Authors:
- Jakub Kuzilek 
See Also
Useful links:
Converts content of file to CSS
Description
Passes content of file_name into V8 console and converts it using LESS engine to CSS. The converted CSS is saved into output_folder under original name. Only the extension is switched to css.
Usage
convert_file(base_path, file_name, output_folder = tempdir())
Arguments
| base_path | Base path to file to be converted | 
| file_name | Path relative to  | 
| output_folder | Output path where converted file should be placed.
File is placed to  | 
Value
Full path to created file with converted CSS file
Examples
path_to_less_files <- system.file("extdata", package="rless")
convert_file(path_to_less_files, "example.less")
convert_file(path_to_less_files, "example.less", tempdir())
Converts files in folder to CSS files
Description
Function goes through folder specified in input_folder and finds files
matching the pattern. If recursive is set to TRUE, scanner
are also subdirectories of the input_folder. Matching files are
converted using convert_file function.
Usage
convert_folder(input_folder, output_folder = tempdir(),
  recursive = FALSE, pattern = "*.less$")
Arguments
| input_folder | Path to files to be converted | 
| output_folder | Output path where converted files should be placed
Files are placed to  | 
| recursive | Boolean value used when searching for filed to be converted | 
| pattern | Pattern which files need to match to be converted | 
Value
List of file paths to converted files is returned
Examples
path_to_less_files <- system.file("extdata", package="rless")
convert_folder(path_to_less_files)
convert_folder(path_to_less_files, tempdir())
convert_folder(path_to_less_files, recursive = TRUE)
convert_folder(path_to_less_files, pattern = '*.css$')
Parse LESS content to CSS
Description
Parse LESS file to CSS and return it as result
Usage
parse_less(code)
Arguments
| code | text to be converted in LESS format | 
Details
Currently LESS '@import' functionality is not supported.
Value
converted text to CSS
Examples
parse_less('.button { .red{ collor: red}}')
parse_less('@red: red; .red{ collor: @red}')