What do the grey numbered boxes mean?

I found several of these grey numbered boxes similar to footnotes

Here:

SuttaCentral?

What are they for?

They are numbering sections. They really look like footnotes, don’t they?

If you are using a custom css plugin like Stylus, you can add this for the site to move them to the start of the paragraph (where I think they make more sense.

.highlight [data-counter]::before {
  content: attr(data-counter);
}

.highlight [data-counter]::after {
  content: attr(data-counter);
    display:none;
}

.highlight [data-counter]::before {
  padding: 0 0.25rem;
  margin:  0 0.5rem 0 0;
  background-color: var(--sc-icon-color);
  color: white;
  font-weight: 600;
  font-family: var(--sc-sans-font);
  font-size: var(--sc-skolar-font-size-xs);
  border-radius: 4px;
}

And if you think that the box style makes them far too prominent, you can add this instead so that they are the more traditional number followed by a close paren:

.highlight [data-counter]::after {
  content: attr(data-counter);
    display:none;
}

.highlight [data-counter]::before {
  content: attr(data-counter) ") ";
}
3 Likes

Yeah, very confusing that they come after

Yes. The content attribute in css kind of violates the principles of content vs styling. But in this case it makes it easy to put it where you like.

But the disadvantage of violating that principle is that when you do a copy paste you don’t get the numbering.

Well, when the content really is just decorative it’s fine. But, as you say, numbers are content, not style (and confusing the two is leading to the downfall of civilization)

I believe that the thinking here on SC is that the numbers don’t appear in the root text, therefore they shouldn’t appear in the translation text either. So then it’d easy to treat them as decoration. Really, since they are content, they should be inserted as content using javascript. But then the snake starts to eat it’s own tail because I guess there is the idea that JS should only be used for function, not for content or decoration?

Websites are difficult, eh? Easy to criticize, hard to make.

And yes, I have always felt that auto numbering was just wrong.

1 Like

Idk Bhante @sujato is generally against square brackets around text added to a translation…

Well, that ship sailed long ago as all the content is built/pulled in/rendered by JS code already…