Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I know this may be a fringe case, but I'd love to get this working.
This module is throwing the following error:
LESS error: parse error: failed at `@props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;` line: 791, sites/all/themes/cores/assets/less/global/style.less
Here is the line that is throwing the error:
@props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
The full write up can be found here for what I'm doing: http://www.toekneestuck.com/blog/2012/05/15/less-css-arguments-variable
Any ideas how I can get this working with the LESS drupal module?
Comments
Comment #1
corey.aufang CreditAttribution: corey.aufang commentedKeep in mind that this module uses thelessphp implementation, which tries to stick close to the lesscss.org but doesn't match 100%.
The particular operation you are trying to accomplish is specific to lesscss.org implementation as it evaluates javascript calls.
If you give me a specific example of what you're trying to accomplish, I might be able to direct you on how to accomplish it with lessphp's compliant syntax.
Comment #2
interestingaftermath CreditAttribution: interestingaftermath commentedThanks for replying so quickly. Somehow, I missed this so I am just now replying...
What I am trying to do is detailed here: http://toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/
Comment #3
corey.aufang CreditAttribution: corey.aufang commentedYou could do something similar to a solution I posted in an older issue, #1405704-3: Using @arguments.
Try something like this:
Comment #4
interestingaftermath CreditAttribution: interestingaftermath commentedThanks! This works.
Is there anyway to get it to work without the quotes?
.box-shadow(0 0 4px rgba(0,0,0,0.30))
Comment #5
corey.aufang CreditAttribution: corey.aufang commentedSadly, I don't think so. :/
Comment #6
corey.aufang CreditAttribution: corey.aufang commentedI'm going to go ahead and mark for documentation so I remember to get to this.
Comment #7
interestingaftermath CreditAttribution: interestingaftermath commentedThanks, Corey
Comment #8
corey.aufang CreditAttribution: corey.aufang commentedComment #9
corey.aufang CreditAttribution: corey.aufang commentedDocumented in:
https://www.drupal.org/node/2392685/revisions/7988463/view