~sircmpwn/sr.ht-discuss

5 3

Missing spacing on top-level Markdown headings

Details
Message ID
<20200925110733.6a6bn6uskkdgukae@tarta.nabijaczleweli.xyz>
DKIM signature
pass
Download raw message
In these two files:
  https://git.sr.ht/~nabijaczleweli/klapki
  https://git.sr.ht/~nabijaczleweli/klapki/tree/trunk/README.md

The badges (and, presumably other elements would as well) are laid out
directly against the heading text due to the display: flex; on
.markdown h[123456].

I tried adding 
-- >8 --
& > :not(:first-child) {
	margin: 0 .2rem;
}
-- >8 --
to [core.sr.ht]/base.scss style which did work, for the top-level
headings, but indented the Manpage heading (which is just a link).

This is unfortunately where my CSS prowess ends, so I'm posting here
instead, maybe someone has a brighter idea.

наб
Ivar Løvlie
Details
Message ID
<b45042db-6210-40d1-b4c4-1ba063552e3c@www.fastmail.com>
In-Reply-To
<20200925110733.6a6bn6uskkdgukae@tarta.nabijaczleweli.xyz> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
>This is unfortunately where my CSS prowess ends, so I'm posting here
>instead, maybe someone has a brighter idea.

Would this work:
-- >8 --
.markdown h1 *:not(:first-child),
.markdown h2 *:not(:first-child),
.markdown h3 *:not(:first-child),
.markdown h4 *:not(:first-child),
.markdown h5 *:not(:first-child),
.markdown h6 *:not(:first-child) {
    margin: 0 .2rem;
}
-- >8 --
Details
Message ID
<1b6adf60-5a15-4467-c358-4a75deee0e38@orbital.rocks>
In-Reply-To
<b45042db-6210-40d1-b4c4-1ba063552e3c@www.fastmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
On 9/25/2020 7:32 AM, Ivar Løvlie wrote:
> Would this work:
> -- >8 --
> .markdown h1 *:not(:first-child),
> -- >8 --
> 

Thinking this might be better. Should avoid matching cases where there 
is an anchor in a header other than the one wrapping the badge.

.markdown h1 img,
.markdown h2 img,
.markdown h3 img,
.markdown h4 img,
.markdown h5 img,
.markdown h6 img {
	margin: 0 .2rem;
}

-gildarts
Ivar Løvlie
Details
Message ID
<9ab90269-216d-46aa-a73c-36c96d0a6870@www.fastmail.com>
In-Reply-To
<1b6adf60-5a15-4467-c358-4a75deee0e38@orbital.rocks> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
> Should avoid matching cases where there is an 
> anchor in a header other than the one wrapping the badge.

I agree.
Details
Message ID
<20200928201218.wzii5x5rqyurdz35@tarta.nabijaczleweli.xyz>
In-Reply-To
<1b6adf60-5a15-4467-c358-4a75deee0e38@orbital.rocks> (view parent)
DKIM signature
pass
Download raw message
On Fri, Sep 25, 2020 at 10:40:10AM -0400, gildarts wrote:
> .markdown h6 img {
> 	margin: 0 .2rem;
> }

Thanks for that implementation, works a charm!

I've ported it to the SCSS and posted to sr.ht-dev@ as
  <20200928200807.in3j63qkdcwhd4tx@tarta.nabijaczleweli.xyz>

Best,
наб
Details
Message ID
<b774732e-a322-7747-5c68-ec3477583bec@orbital.rocks>
In-Reply-To
<20200928201218.wzii5x5rqyurdz35@tarta.nabijaczleweli.xyz> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
On 9/28/2020 4:12 PM, наб wrote:
> I've ported it to the SCSS and posted to sr.ht-dev@ as
>    <20200928200807.in3j63qkdcwhd4tx@tarta.nabijaczleweli.xyz>
> 

Saw the patch, looks good!

-gildarts
Reply to thread Export thread (mbox)