Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent html class allocations for links #663

Open
ietf-svn-bot opened this issue Jul 28, 2021 · 1 comment
Open

Consistent html class allocations for links #663

ietf-svn-bot opened this issue Jul 28, 2021 · 1 comment
Labels
html Issues in HTML output medium

Comments

@ietf-svn-bot
Copy link

type_defect | by mt@lowentropy.net


There are a few different types of link that xml2rfc can produce. There are internal cross references (Section 3.2), bare citations ([RFC2931]), citations with sections (Section 3.2 of [RFC2931]; which is two links), bare links to sections of citations (where the literal text is just turned into a link in HTML), bare URL links (with the URL rendered or text displayed with a hyperlink), and more combinations of the above.

The classes that are used for these in the HTML rendering is fairly limited and not very consistent. For <xref section="3.2" target="CITATION"/>, the rendering produces two links "Section 3.2" has a class of "relref" and "[CITATION]" has a class of "xref". For internal references like <xref target="sec-foo"/>, the link on "Section 3.2" has a class of "xref".

This makes styling these links properly nearly impossible. Though you might like to have markers that indicate external vs. internal, the use of "xref" for both makes that impossible. And though "Section 3.2" likely needs similar rendering treatment (use of white-space: nowrap), the use of different classes makes consistent styling impossible. Linked text that doesn't have any generated text that uses bare links (like <xref sectionFormat="bare" section="3.2" target="CITATION">some text</xref>) also uses "relref", but this form generally does not want special whitespace treatment.

Links that use <eref> don't see to get classes, but these don't distinguish between a bare link (<eref target="foo"/>) and linked text (<eref target="foo">text</eref>), again making the use of consistent styling more challenging.

More consistent use of classes would be appreciated. There are several things that would be interesting to know when styling the link:

  • If the link text is a bare URL, free form text, "Section X" or "Appendix Q", or a citation anchor
  • If the link is to a an arbitrary URL, internal anchor, a citation block, or a section in a citation
  • (For completeness only because I think that selfRef is already consistent) If the link is for the purposes of establishing a clickable anchor only, which is used for headings and pilcrows.

Issue migrated from trac:663 at 2022-02-08 07:16:47 +0000

@kesara kesara removed the new label Jun 19, 2022
@martinthomson
Copy link
Contributor

See also #861.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html Issues in HTML output medium
Projects
None yet
Development

No branches or pull requests

3 participants