GithubHelp home page GithubHelp logo

csherstan / grails-lesscss-resources Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulfairless/grails-lesscss-resources

0.0 2.0 0.0 64 KB

Grails plugin for using the LESS CSS framework in conjunction with the grails-resource plugin family

License: Other

grails-lesscss-resources's Introduction

#less CSS Resource plugin# This plugin is designed to optimize the use of .less css files. The processing will compile specified .less files into their .css counterparts, and place the css into the processing chain to be available to the other resource plugin features. The plugin uses the Java Less Compiler to compile the .less files using Mozilla Rhino. The plugin uses the Resources plugin and plays nicely with both the zipped and cached resources plugins.

LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. Read more

##Installation##

grails install-plugin lesscss-resources

##Usage## An Example of using both .less and .css files together in a bundle

'style' {
        resource url:'less/test.less',attrs:[rel: "stylesheet/less", type:'css'], bundle:'bundle_style'
        resource url:'css/normal.css'
        resource url:'css/normal2.css'
    }

###Import### LESS supports importing of other less/css files. This is supported in lesscss-resources.

@import "imported_style.less";

Note that the files to be imported are not part of the resources bundle, so any changes will not trigger a rebuild of the resource.

###Options### You can use the LessCSS engine to compress the output by adding this to your Config.groovy:

grails.resources.mappers.lesscss.compress = true

By default the output is not compressed. Note: This compression offered by LESS is not as comprehensive as you might expect.

###Required Settings for LESS###

  • url: The location of the .less file
  • attrs[rel]: should be set to stylesheet/less for compatibility reasons
  • attrs[type]: must be set to css for resources to process
  • bundle: Must be set as will not default correctly. To add to default bundle use 'bundle_"

See the Resources plugin for more details on available configurations ##Changelog## 1.3.3 Updated version of less-compiler to 1.3.3 Supports latest Twitter Bootstrap Single and Double quotes for import statements

1.3.1 Updated version of less-compiler to 1.3.1 Memory optimisations now the less-compiler can be multi-threaded Added ability to use the compression option in the less-compiler

1.3.0 - Breaking Changes: Asual LessCSS compiler has been replaced with lesscss-java. Import statements must use double quotes

##Issues##

  • For the Bundle to work you must have a .css file at the end of the bundle, even if it is just a blank file.
  • Must specify the default bundle manually as this is calculated based on file extension by default.
  • When debug is switched on there is currently no way to fall back to the standard LESS javascript support. The less files will be rendered unprocessed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.