reschke / xml2rfc

A formatter for the "xml2rfc" vocabulary, implemented in XSLT.
12 stars 5 forks source link

DL for references? #4

Closed mnot closed 9 years ago

mnot commented 9 years ago

Would you take a pull request that uses DL instead of table for references? Arguably that's better HTML.

See (roughly): https://github.com/mnot/RFCbootstrap/commit/ab9b1c7b8cc17ce390dd3d9c3c23ad9eadb622fd

reschke commented 9 years ago

Yes, if we can find the right CSS for it. The text should be on the same line for short labels, and on the next line for long labels. Example: https://tools.ietf.org/html/rfc7516#section-12.2.

mnot commented 9 years ago

See: https://github.com/twbs/bootstrap/blob/5ea03fa259ccac4c7ea72f0a19b57f77957fe55d/less/type.less#L209

hildjj commented 9 years ago

Here's what I've got, resulting in http://hildjj.github.io/draft-hildebrand-html-rfc/test.3.html#n-references:

.reference {
  padding-bottom: 10px;
  float: left;
}
.reference dt {
  margin-top: 8px;
  font-weight: bold;
  float: left;
  text-align: right;
  width: 6em;
}
.reference dd {
  margin-top: 8px;
  margin-left: 6.5em;
}

very similar to Mark's example.

reschke commented 9 years ago

That doesn't seem to work to well if the anchor is wide. Edge cases :-)

reschke commented 9 years ago

See https://github.com/reschke/xml2rfc/commit/7b8c3dd4ce5a46a2b79662b6f03a35a9dc27cffb