Re: [PATCH v4 16/16] md2html: change css name to not conflict with highlight
On Thu, Jun 28, 2018 at 05:58:42AM +0800, Andy Green wrote: > On 06/28/2018 01:37 AM, Jason A. Donenfeld wrote: > > This seems like an obvious thing to merge, but I'm actually not so > > certain I understand its necessity. md2html uses the highlight class. > > Our css uses the highlight class. You're saying this conflicts with > > something? From where? Third-party CSS? If that's the case, and if > > I'm saying blame renders wrongly on Fedora 28 for these reasons and the > patch fixes it. > > > it's a serious problem to recon with, do we then want to just > > namespace all of our classes as .cgit subclasses, or as > > .cgit-highlight, .cgit-whatever prefixes? > > I dunno what you want to do about it, but I wanted it to render > correctly on Fedora 28, which this patch is enough to do. >From the original discussion, I concluded that the problem is that both Pygments and md2html use "highlight" as a CSS class and previously we never output both of these on the same page. For some reason, Andy is getting both of these outputting their styles in ui-blame. I can't see how md2html output is ending up in that page though. John ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit
Re: [PATCH v4 16/16] md2html: change css name to not conflict with highlight
On 06/28/2018 01:37 AM, Jason A. Donenfeld wrote: Hi Andy, This seems like an obvious thing to merge, but I'm actually not so certain I understand its necessity. md2html uses the highlight class. Our css uses the highlight class. You're saying this conflicts with something? From where? Third-party CSS? If that's the case, and if I'm saying blame renders wrongly on Fedora 28 for these reasons and the patch fixes it. it's a serious problem to recon with, do we then want to just namespace all of our classes as .cgit subclasses, or as .cgit-highlight, .cgit-whatever prefixes? I dunno what you want to do about it, but I wanted it to render correctly on Fedora 28, which this patch is enough to do. -Andy ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit
Re: [PATCH v4 16/16] md2html: change css name to not conflict with highlight
Hi Andy, This seems like an obvious thing to merge, but I'm actually not so certain I understand its necessity. md2html uses the highlight class. Our css uses the highlight class. You're saying this conflicts with something? From where? Third-party CSS? If that's the case, and if it's a serious problem to recon with, do we then want to just namespace all of our classes as .cgit subclasses, or as .cgit-highlight, .cgit-whatever prefixes? Jason ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit
[PATCH v4 16/16] md2html: change css name to not conflict with highlight
md2html gets pygments to define the css for "highlight", making display of the blame view fragile against pygments version. On Fedora 28 / python3-pygments-2.2.0-10.fc28.noarch, "highlight" gets redefined so it no longer displays at the top of its parent. This patch changes the css class name used by md2html to "md2html_highlight" so there is no conflict with other definitions of "highlight". Signed-off-by: Andy Green --- filters/html-converters/md2html |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html index 6f4f1b3..00cf73a 100755 --- a/filters/html-converters/md2html +++ b/filters/html-converters/md2html @@ -305,7 +305,7 @@ sys.stdout.write(''' border: none; background: transparent; } -.markdown-body .highlight pre, .markdown-body pre { +.markdown-body .md2html_highlight pre, .markdown-body pre { background-color: #f8f8f8; border: 1px solid #ccc; font-size: 13px; @@ -321,7 +321,7 @@ sys.stdout.write(''' border: none; } ''') -sys.stdout.write(HtmlFormatter(style='pastie').get_style_defs('.highlight')) +sys.stdout.write(HtmlFormatter(style='pastie').get_style_defs('.md2html_highlight')) sys.stdout.write(''' ''') @@ -334,7 +334,7 @@ extensions = [ "markdown.extensions.tables" ] extension_configs = { -"markdown.extensions.codehilite":{"css_class":"highlight"} +"markdown.extensions.codehilite":{"css_class":"md2html_highlight"} } if len(sys.argv) > 2: ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit