You can still do that.
If you, say used 'quote' as your class and replaced [q] with <div
class='quote'> and [/q] with </div> then in your css you could use

div.quote
{
padding-left:10px;
}
div.quote div.quote /* 2nd level */
{
padding-left:20px; /* yeilds a total of 30px padding */
}
div.quote div.quote div.quote /* third level */
{
padding-left:30px; /* total of 60px padding */
color:#999999;
}
etc.
You'd still need to define a fixed number of quote styles but once you get
beyond, say, 4, i'd just leave them all the same.

Gareth

On Nov 9, 2007 3:50 PM, s.ross <[EMAIL PROTECTED]> wrote:

>
>
> Yeah, that's what I wound up doing. I did (at one point) want to count and
> style differently based on level of nesting, but prob'ly not worth the
> extra
> work.
>
> thx
>
>
> Gareth Evans-6 wrote:
> >
> > wouldn't just replacing [q] with <div class='padleft'> and [/q] with
> > </div>
> > give you that effect if the class gave some left padding?
> > You'd end up with nested divs which each gave their own amount of
> > padding...
> >
> >
> > On Nov 9, 2007 10:43 AM, s.ross <[EMAIL PROTECTED]> wrote:
> >
> >>
> >>
> >> Thanks for the pointer. It seems that wrap allows you to conditionally
> >> change
> >> existing functionality, allowing for fallback to original functionality
> >> in
> >> the default case. Good if you don't want to edit nice, tested framework
> >> code.
> >>
> >> In my case, I want to replace tags from the outside in kind of
> >> iteratively.
> >> So, in pseudo-code:
> >>
> >> startString = '[q]outside level[q]inner level[/q]back to
> >> outer[/q]completely
> >> outside quote block';
> >>
> >> I'm guessing that iteration and greedy matching is the only way to do
> it.
> >> Am
> >> I missing something?
> >>
> >> Thanks again,
> >>
> >> Steve
> >>
> >>
> >> Dan Dorman wrote:
> >> >
> >> >
> >> > On Nov 8, 2007 2:16 PM, s.ross <[EMAIL PROTECTED]> wrote:
> >> >> Is there a straightforward
> >> >> way to match and process the nestings using a function as a second
> >> >> argument
> >> >> to gsub?
> >> >
> >> > I'm not sure this will work for what you're doing, but using 1.6's
> >> > wrap feature sounds like it could be just the ticket.
> >> >
> >> > Kangax wrote a great lil' article about it:
> >> >
> >> > <http://thinkweb2.com/projects/prototype/2007/09/14/wrap-it-up/>
> >> >
> >> > Hope that helps.
> >> >
> >> > :Dan Dorman
> >> >
> >> > >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Help-W--gsub-on-Nested-Expression-tf4773701.html#a13656395
> >> Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.
> >>
> >>
> >> >
> >>
> >
> > >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Help-W--gsub-on-Nested-Expression-tf4773701.html#a13660603
> Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to