# class attribute

**URL:** <https://discourse.citationstyles.org/t/class-attribute/160>\
**Category:** CSL Development\
**Created:** [July 28, 2006, 9:11pm UTC](https://discourse.citationstyles.org/t/class-attribute/160 "2006-07-28T21:11:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [July 28, 2006, 9:11pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/1 "2006-07-28T21:11:36Z")

</div>

I’m again not sure if stuff is getting through to the list. Anyway, I’m  
just about wrapped up with the schema rewrite I think. See repo.

I’m contemplating adding back a root attribute I had at the very  
beginning: class.

So it would be:

cs-class = attribute class { “author-date” | “number” | “label” |  
“note” | “custom” }

Each class would carry with it some default assumptions:

author-date===========

sorting keys are author-date  
author substitutions are: periodical title (and equivalent), title,  
anonymous

also: author-year disambiguated using year suffixes

# number

sort can be either “cited” or "author-year"  
substitutions probably work the same

# label

sort either “label” or “author-year”

All of the above require citation and bibliographic elements

# note

bibliography is optional; if present use author-year rules

# custom

assume nothing

Any objections to that?

The logic is that CSL allows custom sorting and substitutions, but it  
doesn’t require it of either style authors or software implementors.

Bruce

---

<div class="post-metadata">

**Author:** ![Johan\_Kool2](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Johan\_Kool2](https://discourse.citationstyles.org/u/Johan_Kool2)\
**Post date:** [July 28, 2006, 10:15pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/2 "2006-07-28T22:15:44Z")

</div>

Hi Bruce,

> I’m again not sure if stuff is getting through to the list.

Sorry, the list probably works okay now (your mail did come through)  
but I’ve been a bit quiet, because your questions are pretty difficult  
at times. 🙂

Anyway, no objections to the class tag. Sounds pretty straightforward to me.

About the annotated bibliographies: assume note and abstract are  
blocks sounds reasonable to me.

That makes me think though, me now use an attribute for prefix and  
suffix. What if a prefix or suffix needs a newline? I don’t think it’s  
possible to enter an enter in an attribute right? But making it a full  
element seems a bit too much too. Perhaps we could use \n for this  
purpose?

I like the new sort element.

I hope that this is at least somewhat useful to your questions.

Bye,

Johan

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [July 28, 2006, 10:21pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/3 "2006-07-28T22:21:45Z")

</div>

> Sorry, the list probably works okay now (your mail did come through)  
> but I’ve been a bit quiet, because your questions are pretty difficult  
> at times. 🙂

I was mainly confused because I wasn’t seeing my posts in the archive  
either.

> Anyway, no objections to the class tag. Sounds pretty straightforward  
> to me.

OK.

> About the annotated bibliographies: assume note and abstract are  
> blocks sounds reasonable to me.

OK.

> That makes me think though, me now use an attribute for prefix and  
> suffix. What if a prefix or suffix needs a newline? I don’t think it’s  
> possible to enter an enter in an attribute right? But making it a full  
> element seems a bit too much too. Perhaps we could use \n for this  
> purpose?

This is one of the reasons I was asking the question.

My guess is it’s probably best to use the unicode entity for the  
newline (don’t remember what it is though!), though hopefully it’ll be  
uncommon that people will need it.

Bruce

---

<div class="post-metadata">

**Author:** ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)\
**Post date:** [July 29, 2006, 3:44am UTC](https://discourse.citationstyles.org/t/class-attribute/160/4 "2006-07-29T03:44:45Z")

</div>

So long as we clearly define the behavior of each class and provide a fully  
featured “custom” option, the class attribute sounds good to me. It may be  
worth formalizing the definition of the various classes by demonstrating the  
markup one would have to add to the CSL file to achieve the same behavior  
with class=“custom”.

Simon

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [July 28, 2009, 10:02pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/5 "2009-07-28T22:02:02Z")

</div>

Looking at the class attribute on the group element, this appears to  
be the last item (now that font-family has been dropped) that accepts  
a free-form argument.

Should there be a fixed set of possible class names for this attribute?

If so, would anyone like to propose an initial list of possible names?

Frank

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [July 31, 2009, 12:54am UTC](https://discourse.citationstyles.org/t/class-attribute/160/6 "2009-07-31T00:54:27Z")

</div>

It might be fine with dropping the attribute at this point.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [July 31, 2009, 1:33am UTC](https://discourse.citationstyles.org/t/class-attribute/160/7 "2009-07-31T01:33:49Z")

</div>

> > Looking at the class attribute on the group element, this appears to  
> > be the last item (now that font-family has been dropped) that accepts  
> > a free-form argument.
> > 
> > Should there be a fixed set of possible class names for this attribute?
> > 
> > If so, would anyone like to propose an initial list of possible names?
> 
> It might be fine with dropping the attribute at this point.

I think you suggested on a Zotero thread that moving toward classed  
groups would relieve some of the pressure to create dedicated options  
to support idiosyncratic bibliography formats. The leading example is  
our old friend the American Anthropological Association (?):

> **[CSL: how to omit subsequent-author in bibliography?](https://forums.zotero.org/discussion/4775/csl-how-to-omit-subsequentauthor-in-bibliography/#Comment_20571)**
>
> Working on a few anthropological styles, I think I may have run into a limitation of CSL (or at least Zotero's implementation of it) - but I want to check here first whether others perhaps have already found a solution.

But, for HTML output at least, the necessary effects for that one  
should be within the reach of CSS, with a few supporting hints via  
display=“block” and display=“inline-block”. As far as I can see, it  
would be fine to remove it … oops, BUT …

A check of the repository shows that is used in 67  
styles. Extracting the arguments, it looks like it always has one of  
two values: container or containter-title [sic].

> From the consistency of usage and that spelling error, I guess it must  
> either have been in some early style code that’s been copy-pasted a  
> lot, or Zotero output contains CSS that supports those particular  
> class names, and the HTML output depends on it.

Not sure what happens next. Maybe someone from Zotero can tell what’s  
likely to break of this were to go away?

Frank

---

<div class="post-metadata">

**Author:** ![Dan\_Stillman](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@Dan\_Stillman](https://discourse.citationstyles.org/u/Dan_Stillman)\
**Post date:** [July 31, 2009, 10:12am UTC](https://discourse.citationstyles.org/t/class-attribute/160/8 "2009-07-31T10:12:24Z")

</div>

appears in only two styles, both  
committed by the same user, so that can obviously be ignored.

appeared in the first two styles added to  
Zotero, APA and Chicago, so Frank’s copy-and-paste hypothesis sounds  
about right.

I don’t see any references to “container” in the CSL or integration  
code, either now or in the earliest versions. So, Simon can correct me  
if I’m wrong, but I suspect it has no effect whatsoever.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [July 31, 2009, 10:49am UTC](https://discourse.citationstyles.org/t/class-attribute/160/9 "2009-07-31T10:49:12Z")

</div>

> > A check of the repository shows that is used in 67  
> > styles. Extracting the arguments, it looks like it always has one of  
> > two values: container or containter-title [sic].
> > 
> > From the consistency of usage and that spelling error, I guess it must  
> > either have been in some early style code that’s been copy-pasted a  
> > lot, or Zotero output contains CSS that supports those particular  
> > class names, and the HTML output depends on it.
> > 
> > Not sure what happens next. Maybe someone from Zotero can tell what’s  
> > likely to break of this were to go away?
> 
> appears in only two styles, both  
> committed by the same user, so that can obviously be ignored.
> 
> appeared in the first two styles added to  
> Zotero, APA and Chicago, so Frank’s copy-and-paste hypothesis sounds  
> about right.
> 
> I don’t see any references to “container” in the CSL or integration  
> code, either now or in the earliest versions. So, Simon can correct me  
> if I’m wrong, but I suspect it has no effect whatsoever.

Yay. Maybe I should stop messing around with inline markup and  
talking out the side of my mouth, and see if it really is possible to  
produce the AAA layout with the other markup we have available.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [July 31, 2009, 9:53pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/10 "2009-07-31T21:53:57Z")

</div>

> > > A check of the repository shows that is used in 67  
> > > styles. Extracting the arguments, it looks like it always has one of  
> > > two values: container or containter-title [sic].
> > > 
> > > From the consistency of usage and that spelling error, I guess it must  
> > > either have been in some early style code that’s been copy-pasted a  
> > > lot, or Zotero output contains CSS that supports those particular  
> > > class names, and the HTML output depends on it.
> > > 
> > > Not sure what happens next. Maybe someone from Zotero can tell what’s  
> > > likely to break of this were to go away?
> > 
> > appears in only two styles, both  
> > committed by the same user, so that can obviously be ignored.
> > 
> > appeared in the first two styles added to  
> > Zotero, APA and Chicago, so Frank’s copy-and-paste hypothesis sounds  
> > about right.
> > 
> > I don’t see any references to “container” in the CSL or integration  
> > code, either now or in the earliest versions. So, Simon can correct me  
> > if I’m wrong, but I suspect it has no effect whatsoever.
> 
> Yay. Maybe I should stop messing around with inline markup and  
> talking out the side of my mouth, and see if it really is possible to  
> produce the AAA layout with the other markup we have available.

The attached file “aaa-sample.html” is done using only DIV tags and  
appropriate CSS properties. The structure, at least, could be  
produced with current CSL, using subsequent-author-substitute=“”  
together with display=“block” and display=“inline-block”.

But a glance at the HTML shows that, although quite a few tweaks are  
necessary on individual elements to get the formatting right. A  
couple of the values (the widths of the two inline blocks) are context  
and style dependent, but cannot be reliably deduced during CSL  
processing.

[aaa-sample.html](https://canada1.discourse-cdn.com/flex029/uploads/citationstyles/original/1X/76e804e23722f679fe27bfb3e3b28e6c57096cdc.html) (2.56 KB)

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [July 31, 2009, 10:54pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/11 "2009-07-31T22:54:08Z")

</div>

So what exactly are you proposing?

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 1, 2009, 12:01am UTC](https://discourse.citationstyles.org/t/class-attribute/160/12 "2009-08-01T00:01:43Z")

</div>

Still just thinking out loud, but:

(1) Drop display=“block” and display=“inline-block” from the schema.  
(2) Retain the attribute.  
(3) Limit the permissible values to class= to the following tentative list:  
– csl-subheading  
– csl-label  
– csl-item  
(4) Provide documentation on the three classes above in (or with) the  
schema. Illustrated examples similar to those provided in the CSS  
specification docs would make things clear enough for implementors.  
(5) Make it clear in the schema documentation that the assignment of  
specific formatting attributes to the three classes above is the  
responsibility of the calling application.

To go whole hog on rationalization of bibliography formatting, it  
would be tempting to also delete the “second-field-align” and  
"hanging-indent" options. The former could be adequately covered with  
the “label” and “item” group classes. The latter would require its  
own “csl-hanging-indent” class. This would allow the removal of some  
black magic code from the CSL processor, and would allow user style  
settings in the word processor to take effect across bibliography  
styles, which would be a nice touch. But I do realize that the burden  
and risk of remangling the repository is an argument, maybe a strong  
argument, against going that far.

Frank

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [August 1, 2009, 12:15am UTC](https://discourse.citationstyles.org/t/class-attribute/160/13 "2009-08-01T00:15:32Z")

</div>

> > So what exactly are you proposing?
> 
> Still just thinking out loud, but:
> 
> (1) Drop display=“block” and display=“inline-block” from the schema.  
> (2) Retain the attribute.  
> (3) Limit the permissible values to class= to the following  
> tentative list:  
> – csl-subheading  
> – csl-label  
> – csl-item

How do these values address the use cases (AAA, annotated bibs, etc)?

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 1, 2009, 1:23am UTC](https://discourse.citationstyles.org/t/class-attribute/160/14 "2009-08-01T01:23:58Z")

</div>

> > > So what exactly are you proposing?
> > 
> > Still just thinking out loud, but:
> > 
> > (1) Drop display=“block” and display=“inline-block” from the schema.  
> > (2) Retain the attribute.  
> > (3) Limit the permissible values to class= to the following  
> > tentative list:  
> > – csl-subheading  
> > – csl-label  
> > – csl-item
> 
> How do these values address the use cases (AAA, annotated bibs, etc)?

Not sure how to explain in words. These are arbitrary names for  
blocks of text that have common features in the layout of the AAA and  
second-field-align type bibliographies. I’m attaching another copy of  
the HTML in which the inline CSS styling has been extracted to a  
header block, as an illustration. For HTML output, the calling  
application would need to supply that block in the finished HTML  
document that it delivers to the browser. The content of the block is  
not the responsibility of CSL.

I’m also attaching a test fixture that shows how the HTML code in the  
sample could be defined in a CSL style.

(For annotated bibliographies, you might want a add a class for an  
indented block.)

For reference, here is a link to a couple of related forum discussions:

> **[Use semantic, non-presentational markup for HTML citations](https://forums.zotero.org/discussion/2169/)**
>
> The markup used in HTML citations is too presentational to my taste.

> **[Word Plugin/Zotero Feature Request: Flexible Commentary in Footnotes (via...](https://forums.zotero.org/discussion/907/word-pluginzotero-feature-request-flexible-commentary-in-footnotes-via-flexible-fonts/#Comment_3565)**
>
> The following request seems rather non-trivial from a non-developer point of view but is nevertheless incredibly useful for researchers hoping to use the Zotero Plugin to Word (or OOo) for works requiring some variety of differing languages in...

(ignore the complaint about the forum in the second linked post – the  
body of Dan’s message talks about RTF and styles). I looked for a  
post in which you suggested something very similar to this, but the  
Zotero forum search interface is playing funny tricks, and I gave up.

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 1, 2009, 1:25am UTC](https://discourse.citationstyles.org/t/class-attribute/160/15 "2009-08-01T01:25:48Z")

</div>

Missed out the docs mentioned in the last message. Sorry for the  
extra traffic; they’re attached to this one.

Frank

[aaa-sample\_test.txt](https://canada1.discourse-cdn.com/flex029/uploads/citationstyles/original/1X/64c2d71467ac6f83b826a177f82d5aea50b6027e.txt) (2.51 KB)

[aaa-sample.html](https://canada1.discourse-cdn.com/flex029/uploads/citationstyles/original/1X/04a953757e7d44aca71166425851619bd92481fe.html) (2.17 KB)

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [August 1, 2009, 2:30pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/16 "2009-08-01T14:30:10Z")

</div>

It might just be me with insufficient caffeine, but I’m still not  
understanding a) how the formatting actually gets applied, and b) how  
this is any better than the existing block and inline-block  
attributes. In particular, what if the “csl-label” class should be  
rendered inline?

You, for example, point out that inline-block in CSS isn’t just a  
simple boolean, but that you need additional configuration (like  
width). But can we not just give some guidance in the spec on what  
that width should be?

Part of it may be that I don’t know what you mean by “block” in the above.

Bruce

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 1, 2009, 9:17pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/17 "2009-08-01T21:17:59Z")

</div>

> > > > > So what exactly are you proposing?
> > > > 
> > > > Still just thinking out loud, but:
> > > > 
> > > > (1) Drop display=“block” and display=“inline-block” from the schema.  
> > > > (2) Retain the attribute.  
> > > > (3) Limit the permissible values to class= to the following  
> > > > tentative list:  
> > > > – csl-subheading  
> > > > – csl-label  
> > > > – csl-item
> > > 
> > > How do these values address the use cases (AAA, annotated bibs, etc)?
> > 
> > Not sure how to explain in words. These are arbitrary names for  
> > blocks of text that have common features in the layout of the AAA and  
> > second-field-align type bibliographies. I’m attaching another copy of  
> > the HTML in which the inline CSS styling has been extracted to a  
> > header block, as an illustration. For HTML output, the calling  
> > application would need to supply that block in the finished HTML  
> > document that it delivers to the browser. The content of the block is  
> > not the responsibility of CSL.
> 
> It might just be me with insufficient caffeine, but I’m still not  
> understanding a) how the formatting actually gets applied, and b) how  
> this is any better than the existing block and inline-block  
> attributes. In particular, what if the “csl-label” class should be  
> rendered inline?

Mea culpa. The HTML file I sent was missing the CSS block. The  
correct file is attached (I hope).

As Rintze pointed out in a side discussion, how to define a format in  
CSL, and how to deliver it to a client are separate issues, and  
implicit styling classes for the currently implemented use cases could  
be provided to a client, without any change to the current CSL syntax  
and conventions.

The reason I think using named class attibutes on CSL-side would be  
better than display=“block|inline-block”, in particular, is that the  
latter are purely presentational, and as such provide no handle or  
hint with which to assign an appropriate class on the output side.  
That compels the use of localized styling (i.e. inline styling in  
HTML) with explicit parameters (like the width dimension), and that in  
turn makes the output unavoidably stiff and brittle.

Frank

[aaa-sample.html](https://canada1.discourse-cdn.com/flex029/uploads/citationstyles/original/1X/04a953757e7d44aca71166425851619bd92481fe.html) (2.17 KB)

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 1, 2009, 9:28pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/18 "2009-08-01T21:28:09Z")

</div>

Ha. The CSS block was not missing from the file, but some web based  
mail readers (like GMail) will strip it when the file is opened via  
the “View” option. To get the full file, download and open locally.  
I might have put the block in the wrong spot in the file – thought it  
belonged in the header, maybe that’s not correct.

Sorry for the extra traffic.

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 6, 2009, 9:01am UTC](https://discourse.citationstyles.org/t/class-attribute/160/19 "2009-08-06T09:01:10Z")

</div>

Further to the discussion of class names and bibliography formatting,  
I have put up a sample document that illustrates the way CSL markup  
could map through to named classes in HTML output. The output uses  
the following classes:

– csl-bib-body (implicit in all output)  
– csl-entry (implicit in all output)  
– csl-entry-heading (used by the AAA style)  
– csl-left-label (used by second-field-align type styles)  
– csl-item (used by second-field-align type styles).

Here is the page:

[http://gsl-nagoya-u.net/http/pub/csl-bibliography.html](http://gsl-nagoya-u.net/http/pub/csl-bibliography.html)

The page shows the CSL that generates the HTML output markup in the  
current revision of citeproc-js. As the  
"actually-the-same-as-csl-entry" style class shows, some of the  
manipulations require a change in the CSS parameters (and so cannot be  
smoothly illustrated in a single document with a single CSS header).  
The bibliography would be delivered as a two-item list, the first a  
bundle of parameters, the second the formatted bibliography string.  
The calling application would assemble the style header using the  
supplied parameters, so that the size of indents and whatnot are  
correct for the content.

Anyway, this is all running. All that would be required to firm it up  
is the retain the class attribute, and inclusion of the class names  
and the processor-supplied formatting parameters in the CSL  
documentation somewhere.

At least that’s all I can think of; will look forward to reactions and views.

Frank

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [August 6, 2009, 12:31pm UTC](https://discourse.citationstyles.org/t/class-attribute/160/20 "2009-08-06T12:31:17Z")

</div>

> Further to the discussion of class names and bibliography formatting,  
> I have put up a sample document that illustrates the way CSL markup  
> could map through to named classes in HTML output. The output uses  
> the following classes:
> 
> – csl-bib-body (implicit in all output)  
> – csl-entry (implicit in all output)  
> – csl-entry-heading (used by the AAA style)  
> – csl-left-label (used by second-field-align type styles)  
> – csl-item (used by second-field-align type styles).
> 
> Here is the page:
> 
> [gsl-nagoya-u.net&nbsp;-&nbsp;This website is for sale!&nbsp;-&nbsp;gsl nagoya u Resources and Information.](http://gsl-nagoya-u.net/http/pub/csl-bibliography.html)

This is awesome!

However …

> The page shows the CSL that generates the HTML output markup in the  
> current revision of citeproc-js. As the  
> “actually-the-same-as-csl-entry” style class shows, some of the  
> manipulations require a change in the CSS parameters (and so cannot be  
> smoothly illustrated in a single document with a single CSS header).  
> The bibliography would be delivered as a two-item list, the first a  
> bundle of parameters, the second the formatted bibliography string.  
> The calling application would assemble the style header using the  
> supplied parameters, so that the size of indents and whatnot are  
> correct for the content.
> 
> Anyway, this is all running. All that would be required to firm it up  
> is the retain the class attribute, and inclusion of the class names  
> and the processor-supplied formatting parameters in the CSL  
> documentation somewhere.
> 
> At least that’s all I can think of; will look forward to reactions and views.

As I mentioned on the ticket you posted yesterday, I’m getting  
overwhelmed. I can’t follow all these threads (in part because of  
other obligations).

I think one way to address this is, rather than suggesting things in  
fairly general terms, you propose actual spec text. I, for example,  
don’t know what the class names mean. So take a shot at explaining  
them formally.

I also don’t know why we need this; why is this any different than  
using block and inline block? I realize it may well be, but I just  
don’t have the cycles to figure it out myself ATM.

Finally, I’ll just observe that using group in many of your examples  
isn’t strictly necessary.

Bruce

[Next page](https://discourse.citationstyles.org/t/class-attribute/160.md?page=2)
