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

[needs docs] Can you style footnote text? #243

Closed
cormullion opened this issue Oct 1, 2019 · 4 comments
Closed

[needs docs] Can you style footnote text? #243

cormullion opened this issue Oct 1, 2019 · 4 comments
Milestone

Comments

@cormullion
Copy link
Contributor

cormullion commented Oct 1, 2019

I can’t work out how to CSS-style the text in a footnote...

@tlienart
Copy link
Owner

tlienart commented Oct 1, 2019

Yes yes you can (and I need to add docs for it all)

References

For the reference basically a footnote is inserted as

<sup id="fnref:1"><a href="/pub/menu1.html#fndef:1" class="fnref">[1]</a></sup>

So you can style that with .jd_content sup a.fnref

Definitions

For definitions, it's inserted as a table like:

<table class="fndef" id="fndef:blah">
    <tr>
        <td class="fndef-backref"><a href="/pub/menu1.html#fnref:blah">[2]</a></td>
        <td class="fndef-content">this is another footnote</td>
    </tr>
</table>

so you can style the back-reference via the .jd-content fndef td.fndef-backref and the text of the definition via .jd-content fndef td.fndef-content; consider the following base styling:

.jd-content table.fndef  {
    margin: 0;
    margin-bottom: 10px;}
.jd-content .fndef tr, td {
    padding: 0;
    border: 0;
    text-align: left;}
.jd-content .fndef tr {
    border-left: 2px solid lightgray;
    }
.jd-content .fndef td.fndef-backref {
    vertical-align: top;
    font-size: 70%;
    padding-left: 5px;}
.jd-content .fndef td.fndef-content {
    font-size: 80%;
    padding-left: 10px;}

hope this helps! (I realise now that calling these things fn* was maybe a bit lazy and footnote* would have been better to improve readability of CSS...)

@tlienart tlienart changed the title Can you style footnote text? [needs docs] Can you style footnote text? Oct 1, 2019
@tlienart tlienart added the docs label Oct 1, 2019
@tlienart tlienart added this to the 0.4+ milestone Oct 1, 2019
@cormullion
Copy link
Contributor Author

cormullion commented Oct 1, 2019

Thanks. This is just what I wanted to know!

(My brain is just about coping with simultaneously using Literate, JuDoc, Markdown, and CSS, while upgrading Julia from 0.6/0.7 to 1.2. :))

@tlienart tlienart added the done label Oct 1, 2019
@tlienart tlienart closed this as completed Oct 7, 2019
@tlienart
Copy link
Owner

tlienart commented Oct 7, 2019

oops, closed this too quickly, still needs docs

@tlienart tlienart reopened this Oct 7, 2019
@tlienart
Copy link
Owner

tlienart commented Dec 21, 2019

now there's docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants