[TxMt] Nested Styles Interaction

thomas Aylott taylott at design42.net
Sat Sep 10 13:54:45 UTC 2005


Hello.
I'm experimenting with crazy nested syntax coloring.
I can't seem to figure out how to make all the transparent background  
colors interact properly.

Ideally I'd like to define a scope:
     scope test = everything within "(...)"

Then set a syntax color of transparent background color.
     scope: test = White 10% opaque

Then nest a bunch of them inside each other.
     zero (one (two (three (four (five (six (seven (eight ))))))))

result: The transparent background color would compound and gradually  
get stronger:
     n/a (10% (20% (30% (40% (50% (60% (70% (80% ))))))))


If I could get this to work, I could color different block types with  
a massive background color & the content colors would be based on the  
block color.
     EG: HTML tags = blue BG, embedded ASP = red BG, strings = yellow  
BG ... string in html tags = green, string in asp = orange.

With what I know now I could simulate this by explicitly setting the  
background colors for every possible combination of elements, but  
that's a lot of work. And if I decide to change the hue of something  
I have to manually recalculate all of those static simulations of  
color interactions.

---
I can get things to interact with the background color.
If I change the BG color for the scope "source" all the transparent  
things define their transparency based on that color.
Also the line highlight & selection colors.

---
Am I asking for too much?
Will this make performance suffer?
Is this already possible, but I just can't figure it out?




More information about the textmate mailing list