How we use SASS-Compass to design our VisualForce page? Where we place .scss files? And how to compile .scss files?

  • welcome to salesforce.stackexchange Anuray! Please understand that providing more info on a question will help others answering you. Could you explain SASS, what you're trying to do and what you've already tried ? – Samuel De Rycke Jan 14 '15 at 8:17
  • Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. There are number of frameworks built with Sass. Compass is one of that. I am trying to style my page using SASS-Compass. I already did Sass-Compass on normal HTML page. Here I use Commands for compiling .scss files. – Anuraj Jan 14 '15 at 10:42

Salesforce cannot compile SASS, LESS, or any other web pre-compiled languages. Any code you add to salesforce must be in a CSS format to use in Visualforce. If you use Grunt to manage your compile task for SASS, I know there is a grunt plugin that allows a deployment to Salesforce as a static resource. I've automated a deployment process that automatically deployed my compiled LESS and JavaScript to Salesforce whenever I ran the compile task.

| improve this answer | |
  • Can we have more information about this automated deployment process? – mcmc Jul 2 '15 at 15:42
  • @mcmc I used this grunt task (github.com/kevinohara80/grunt-ant-sfdc) to run an ant deploy to my sandbox after creating the static resource metadata file and compressing all the necessary files into a zip. – Bradley Delaune Jul 2 '15 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.