Question about amrita and XHTML/CSS

  • Thread starter Carl Youngblood
  • Start date
C

Carl Youngblood

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 <div id="identifier">dynamic data goes
here</div>, 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
 
G

Gavin Sinclair

If amrita takes out all my id tags, how do I do CSS?

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
 
J

James Britt

Carl said:
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 <div id="identifier">dynamic data goes
here</div>, 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.
 
T

Takashi & Kayoko Sano

Hi Carl,

Carl Youngblood said:
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 <div id="identifier">dynamic data
goes
here</div>, 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
 
C

Carl Youngblood

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top