[haml] Exponential

2011-04-24 Thread davidyeiser
Forgive me if I'm missing something obvious, but is there a default way for SASS to execute exponential operators? So, for example: 2 ^ 3 = 8 Thank you! -- You received this message because you are subscribed to the Google Groups Haml group. To post to this group, send email to

Re: [haml] Exponential

2011-04-24 Thread Chris Eppstein
You're not missing it. There's no syntax or function for this. You can add a custom function to sass to implement this in ruby. Chris Hunt pecked on my iPhone... Sorry if it's brief! On Apr 23, 2011, at 10:29 PM, davidyeiser da...@designintellection.com wrote: Forgive me if I'm missing

[haml] Re: Exponential

2011-04-24 Thread davidyeiser
Ah, gotcha. Thanks. This is what I added to the functions.rb file: def exp(value, power) Sass::Script::Number.new(value**power) end (I added it beneath the def abs(value) function.) However, when I use it in my .scss file and then output it to .css it doesn't execute. For example:

Re: [haml] Re: Exponential

2011-04-24 Thread Chris Eppstein
I suspect that you're code is not being required at all because the code you pasted isn't going to work and the behavior you're seeing is as if it's not present. The code should be: def exp(value, power) Sass::Script::Number.new(value.value**power.value) end chris On Sun, Apr 24, 2011 at 11:32

[haml] HSV color model support?

2011-04-24 Thread Victor Costan
Dear Haml developers and users, I'm wondering if the omission of support for HSV colors in Scss is intentional. I know CSS3 uses HSL, but the color picker tools that I have played with seem to output HSV, not HSL. I know the principles behind HSL and HSV, and I know that H is identical, but I

Re: [haml] HSV color model support?

2011-04-24 Thread Nathan Weizenbaum
It is intentional that Sass uses HSL and not HSV. CSS has chosen to go with HSL, and Sass follows CSS here. Supporting HSV would add confusion for very little gain. If you want to make a plugin that adds HSV functions, you're more than welcome, but it's not something we'll add to core Sass. On

Re: [haml] HSV color model support?

2011-04-24 Thread Victor Costan
Thank you for the quick response, Nathan! This is exactly what I wanted to know.     Victor On Sun, Apr 24, 2011 at 6:23 PM, Nathan Weizenbaum nex...@gmail.com wrote: It is intentional that Sass uses HSL and not HSV. CSS has chosen to go with HSL, and Sass follows CSS here. Supporting HSV

Re: [haml] HSV color model support?

2011-04-24 Thread Eric Meyer
And, for clarification, yes: Saturation is used in two different ways in the two systems. More here: http://en.wikipedia.org/wiki/HSL_and_HSV -- You received this message because you are subscribed to the Google Groups Haml group. To post to this group, send email to haml@googlegroups.com.

Re: [haml] HSV color model support?

2011-04-24 Thread Chris Eppstein
Here's the most excellent HSL picker that Brandon made: http://hslpicker.com/ On Sun, Apr 24, 2011 at 6:43 PM, Eric Meyer eriii...@gmail.com wrote: And, for clarification, yes: Saturation is used in two different ways in the two systems. More here: http://en.wikipedia.org/wiki/HSL_and_HSV

[haml] Re: Exponential

2011-04-24 Thread davidyeiser
Yes, you are correct. I tried changing the spelling of one of the other functions and it still executed it fine. (I changed def abs(value) to def absl(value). Nothing happened.) I'm experimenting with all this on Mac OS X 10.6.6. The Ruby version is 1.8.7. The file where I am trying to add the

Re: [haml] Re: Exponential

2011-04-24 Thread Victor Costan
Any chance you're doing this under Rails? If so, you'll need to restart your server to pick up changes in gems and libraries. They're not auto-loaded. I hope this helps,     Victor On Sun, Apr 24, 2011 at 11:23 PM, davidyeiser da...@designintellection.com wrote: Yes, you are correct. I tried

Re: [haml] Re: Exponential

2011-04-24 Thread Chris Eppstein
Please don't modify the gem installation files, that is a sure way to lose your changes. If you're using sass on the command line make a file called sass_extensions.rb and add the following: module Sass::Script::Functions def exp(value, power)