Home Forums General XMetaL Discussion attribute display and styling Reply To: attribute display and styling

sapraaman

Reply to: attribute display and styling

Thanks Derek.

The first one works. But not of much use to us because there cant be styling

Tried the second one. Could not make it work. We have an element called “cit”, with attributes “year” and “jur”. So, how would the style you suggested look like so that only non-null attributes are displayed.

I tried the following:

cit:before {
  content: “Attributes: [year=”attr(year)” jur=”attr(jur)”]”;
  display: block;
  color: blue;
  font-size: 1em;
  background-color: yellow;
}

However,

1. I will have to programatically set this for all attributes for all elements. Can we shorten it somehow so that atleast all attributes can be taken care of automatically? You hinted on usage of star in the last solution, care to elaborate please.

2. The above automatically starts a new line after the element, displays all the attributes and then again inserts a new line. Is there a way to avoid those 2 newlines?

3. The above inserts non-null attributes as well. We need some mechanism to avoid that.

Somehow, this is becoming a critical thing for the editors to move to xmetal and seems like the last block.

Thanks,
Aman

Reply

Products
Downloads
Support