R/parse_less.R

Defines functions parse_less

Documented in parse_less

# Created by: Jonas Vaclavek
# Modified by: Jonas Vaclavek
# Modify date: 05.06.2019
# Description: Parse less to css

if(getRversion() >= "2.15.1")  utils::globalVariables("output")

#' Parse LESS content to CSS
#'
#' Parse LESS file to CSS and return it as result
#'
#' Currently LESS \emph{`@import`} functionality is not supported.
#'
#' @param code text to be converted in LESS format
#' @examples
#' parse_less('.button { .red{ collor: red}}')
#' parse_less('@red: red; .red{ collor: @red}')
#' @return converted text to CSS
#'
#' @export
parse_less <-
  function(code) {
    get_v8_console()$call("rlessParse", code, "output")
    output
  }

Try the rless package in your browser

Any scripts or data that you put into this service are public.

rless documentation built on Aug. 1, 2019, 1:04 a.m.