Hi, I was thinking it would be nice if the HTML output from mandoc also added the section name to the class of the section divs. For example <div class="section name">. It would allow section specific styling, for example the EXAMPLES sections could be styled better, maybe with syntax highlighting etc. :) I will probably try to implement this if it isn't too difficult. Is this something which will be accepted? Regards Abhinav -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
Hi Abhinav, Abhinav Upadhyay writes: > I was thinking it would be nice if the HTML output from mandoc also > added the section name to the class of the section divs. For example > <div class="section name">. > > It would allow section specific styling, for example the EXAMPLES > sections could be styled better, maybe with syntax highlighting etc. > :) Seems like you could do the same with ~ in CSS. See CSS Selectors Level 3 section 8.3.2 "General sibling combinator": https://www.w3.org/TR/css3-selectors/#general-sibling-combinators For example, "h1#EXAMPLES ~ pre.display { ... }" -- Anthony J. Bentley -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
Hi Anthony,
On Sat, May 7, 2016 at 12:48 AM, Anthony J. Bentley <anthony@anjbe.name> wrote:
> Hi Abhinav,
>
> Abhinav Upadhyay writes:
>> I was thinking it would be nice if the HTML output from mandoc also
>> added the section name to the class of the section divs. For example
>> <div class="section name">.
>>
>> It would allow section specific styling, for example the EXAMPLES
>> sections could be styled better, maybe with syntax highlighting etc.
>> :)
>
> Seems like you could do the same with ~ in CSS. See CSS Selectors Level 3
> section 8.3.2 "General sibling combinator":
>
> https://www.w3.org/TR/css3-selectors/#general-sibling-combinators
>
> For example, "h1#EXAMPLES ~ pre.display { ... }"
Thanks, I didn't know of that. I tried it, and it works for my
purposes. However, the ids of the h1 tags seems to be some kind of
encoding or hash (I didn't see the code to see how is it generated).
As long as that id is consistent, I guess the solution you suggested
will work for me.
Thanks again.
--
Abhinav
--
To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
Hi Abhinav,
Abhinav Upadhyay writes:
> Thanks, I didn't know of that. I tried it, and it works for my
> purposes. However, the ids of the h1 tags seems to be some kind of
> encoding or hash (I didn't see the code to see how is it generated).
> As long as that id is consistent, I guess the solution you suggested
> will work for me.
The version of mandoc in CVS just uses the name of the section directly.
Older releases used hex ASCII values (for compliance with HTML4, which
is no longer necessary).
--
Anthony J. Bentley
--
To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
On Sat, May 7, 2016 at 2:24 AM, Anthony J. Bentley <anthony@anjbe.name> wrote:
> Hi Abhinav,
>
> Abhinav Upadhyay writes:
>> Thanks, I didn't know of that. I tried it, and it works for my
>> purposes. However, the ids of the h1 tags seems to be some kind of
>> encoding or hash (I didn't see the code to see how is it generated).
>> As long as that id is consistent, I guess the solution you suggested
>> will work for me.
>
> The version of mandoc in CVS just uses the name of the section directly.
> Older releases used hex ASCII values (for compliance with HTML4, which
> is no longer necessary).
Thanks, that should work. :)
--
Abhinav
--
To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv