Answer the question
In order to leave comments, you need to log in
How to syntactically verify Compass files via SCSS or otherwise?
I wanted to use the capabilities of Compass to implement color functions (shade, etc.) in SCSS styles, which, as far as I understand, are implemented not by importing SASS functions, but by additional parsing and native calculations.
But at the same time, to be able to constantly check the SCSS syntax with a standard SCSS compiler, which does not know about these functions (shade, etc.), and will falsely swear at them.
This is to effectively not get out of the IDE (I have Komodo, but it probably doesn't matter).
If anyone knows how to verify the syntax of Compass-styles file-by-file - ?
My plan was to put in somehow cleverly false dummy definitions of Compass functions so that they are only included when compiling through vanilla SCSS and not included when compiling through Compass.
It is possible to throw knowledge (into a SASS variable) about whether SCCS or Compass is being compiled through user-defined functions in config.rb.
But further problems: Inside SCSS:
* You can’t make a function definition inside a conditional operator
* You can’t make an import inside a conditional operator
* You can’t make an import depending on the contents of a variable ...
...
In general, my imagination has been exhausted, and the questions are:
* How easy it is to solve the original problem - file by file syntax check of Compass files (for integration with IDE, not "compass watch")
* How can you conditionally define some function only if there is a pure SCSS compilation (i.e. shade will be defined, but for COMPASS it does not need to be defined, otherwise COMPASS substitution won't work)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question