bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: definition styling


From: Per Bothner
Subject: Re: definition styling
Date: Wed, 3 Mar 2021 14:27:09 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 3/3/21 2:00 PM, Gavin Smith wrote:
On Tue, Feb 16, 2021 at 03:46:46PM -0800, Per Bothner wrote:
* Hide "Script license information" link or move it to "Help" page.
It's clutter that I don't want on my website, though I might be
ok with it in the help page.

It could be hidden with CSS as it has the "rel" attribute to identify it,
but if you do this please make sure the link is somewhere the reader can
still find it: probably in the help file.

After a search I found it is generated by HTML.pm - info.js does nothing with 
it.
So moving it to the help file would require some extra work.

However, the link can removed with the configuration option -c 
JS_WEBLABELS=omit.
Which seems to work for me.

* Fix [Function:] in synopsis to remove colon.
See http://per.bothner.com/tmp/DomTerm-txjs/The-DomTerm-JavaScript-class.html
[This can probably be done with a DomTerm-specific JavaScript hook.]

Where there is currently

<dl class="def">
<dt id="index-allowAttribute"><span class="category">Function: </span><span><strong>allowAttribute</strong> 
<em>(name, value elementInfo, parents)</em><a href='#index-allowAttribute' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>Overridable function called by the HTML sanitizer.
</p></dd></dl>

this should be changed to

<dl class="def">
<dt id="index-allowAttribute"><span class="category">Function</span>: <span 
class="prototype"><strong>allowAttribute</strong> <em>(name, value elementInfo, parents)</em><a href='#index-allowAttribute' 
class='copiable-anchor'> &para;</a></span></dt>
<dd><p>Overridable function called by the HTML sanitizer.
</p></dd></dl>

i.e. move the ": " string outside of the first span, and give a class
to the second span.  Then (I assume) you could hide the whole of
"dl.def dt", but make an exception for "dl.def dt span.category" and
for "dl.def dt span.prototype" to make that visible.  This would leave
only the ": " as invisible.
I don't know how to do that with CSS.  You can set {display: none} on
an element, but also hides the child elements, not just the text.

However, earlier today I wrote some JavaScript to fix the problem
by changing "Function: " to "Function".

I've been trying to make this change and will likely commit the following
change...

Well, I don't think it would help - but I have a working solution anyway.

--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]