[kwlug-disc] CSS: varying colours based on inheritance

unsolicited unsolicited at swiz.ca
Thu Jul 7 11:14:19 EDT 2011


So ... would flow in a make / scc environment.

Interesting.

I'd bet money that few of us use revision control as much as we 
probably should.

Perhaps that's a lug topic - making scc (git, I think) in your 
'non-programming' daily use part of one's normal routine?

Granted, we've had various scc topics presented recently. Not sure if 
from a GUI perspective / integrated into one's normal daily use, though.

*NO* - I'm not volunteering.

Andrew Sullivan Cant wrote, On 07/07/2011 10:25 AM:
> 
> SASS (which is a CSS like language which compiles into CSS, might be 
> helpful)
> http://sass-lang.com/docs.html
> 
> It lets you set variables, and then do various extra operations. Such as 
> operations on colours.
> http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#color_operations
> 
> This is big in the Ruby/Rails community, but it is being used in other 
> frameworks, too.
> You can also compile it manually, or whatever framework you are working 
> with might already support it.
> 
> On 11-07-06 9:45 PM, Paul Nijjar wrote:
>>
>> Right. That is what I would consider setting colours individually at 
>> each level.
>>
>> I can set opacity at different levels:
>>
>> ul { color: #00ff00; }
>>
>>
>> ul ul {
>>   filter:alpha(opacity=80); /* ie */
>>   opacity:0.8;  /* CSS3 */
>> }
>>
>> ul ul ul {
>>   filter:alpha(opacity=60); /* ie */
>>   opacity:0.6;  /* CSS3 */
>> }
>>
>>
>> But I don't know how to set colours programmatically, and I do not 
>> know how to
>> make this nest to arbitary depth without stating levels explicitly.
>>
>> It turns out that trying to do this programatically might be a bad 
>> idea because
>> I need more contrast from ul to ul. It still seems weird that CSS 
>> can't do this.
>> (That last sentence has never been uttered in the history of the 
>> Internet.
>> Ever.)





More information about the kwlug-disc mailing list