I’ve been looking into amrita for my ruby web development, but I am
concerned about what I see as a potential conflict with my CSS
stylesheets. From what I can tell, amrita looks for items that I have
given a specific id to, such as
dynamic data goes
here
, so that it can then replace them with my dynamic data and
remove the id portion of the tag.
The problem I see is that I want the id tag to remain so that my CSS can
use it to add formatting information to different portions of my page.
I’ve been reading a good book called “Designing with Web Standards,” by
Jeff Zeldman, that strongly advocates the use of XHTML transitional with
CSS to reduce page size, separate structure from presentation and
improve cross-platform compatibility. If amrita takes out all my id
tags, how do I do CSS?
Thanks,
Carl
I’m pretty sure amrita has a method that allows you to specify what
the “id” attribute is; i.e. you can use something different if you
like. I don’t remember what the methods is, though.
Gavin
···
On Sunday, October 5, 2003, 2:17:12 PM, Carl wrote:
If amrita takes out all my id tags, how do I do CSS?
Carl Youngblood wrote:
I’ve been looking into amrita for my ruby web development, but I am
concerned about what I see as a potential conflict with my CSS
stylesheets. From what I can tell, amrita looks for items that I have
given a specific id to, such as
dynamic data goes
here
, so that it can then replace them with my dynamic data and
remove the id portion of the tag.
The problem I see is that I want the id tag to remain so that my CSS can
use it to add formatting information to different portions of my page.
I’ve been reading a good book called “Designing with Web Standards,” by
Jeff Zeldman, that strongly advocates the use of XHTML transitional with
CSS to reduce page size, separate structure from presentation and
improve cross-platform compatibility. If amrita takes out all my id
tags, how do I do CSS?
I’ve not used Amrita, but does it munge all id attribiutes, or just
the matching items? If the latter, then you could work with bad XHTML,
using two ID attributes, with amrita emitting correct markup by removing
the extraneous attribute.
Of course, this may zap your editing tool if it finds templates with
malformed markup.
Can amrita use a namespace for special elements and attributes, to avoid
conflicting with proper XHTML?
James
PS Zeldman’s book really is quite good.
···
Thanks,
Carl
Hi Carl,
I’ve been looking into amrita for my ruby web development, but I
am
concerned about what I see as a potential conflict with my CSS
stylesheets. From what I can tell, amrita looks for items that I
have
given a specific id to, such as
dynamic data
goes
here
, so that it can then replace them with my dynamic data
and
remove the id portion of the tag.
According to Amrita’s RDoc, to keep id’s not for Amrita
expansion in your template, set “keep_id” of your template
to true, i.e:
your_template.keep_id = true
Or, use the “amrita_id” to use another attribute name for
Amrita expansion, like,
your_template.amrita_id = amrita
Hope this helps,
Takashi Sano
···
Carl Youngblood carl@ycs.biz wrote:
Thanks for the information. I had looked at the RDoc but didn’t notice
that part. Might I suggest that another nice option would be to have
amrita populate the tags with the appropriate ids but also keep those
same ids in the output, rather than always removing the ids that for
matched data?
Regardless, these options will allow me to do what I need to.
Thanks,
Carl
Takashi & Kayoko Sano wrote:
···
Hi Carl,
Carl Youngblood carl@ycs.biz wrote:
I’ve been looking into amrita for my ruby web development, but I
am
concerned about what I see as a potential conflict with my CSS
stylesheets. From what I can tell, amrita looks for items that I
have
given a specific id to, such as
dynamic data
goes
here
, so that it can then replace them with my dynamic data
and
remove the id portion of the tag.
According to Amrita’s RDoc, to keep id’s not for Amrita
expansion in your template, set “keep_id” of your template
to true, i.e:
your_template.keep_id = true
Or, use the “amrita_id” to use another attribute name for
Amrita expansion, like,
your_template.amrita_id = amrita
Hope this helps,
Takashi Sano