Hi all!
Hi all! I've been playing with the code formatting CSS... is there a class being added to the "code" tag when it's a multi-line block (using ```...```)
I'm basically adding a "display:block", but I don't want it to show up on the inline, single backtick items... not sure if there's a better way, or I'm just missing something in the attributes to do so.
Line numbers would be cool on the multi-line blocks, but that's a problem for another day
Thanks!
I'm basically adding a "display:block", but I don't want it to show up on the inline, single backtick items... not sure if there's a better way, or I'm just missing something in the attributes to do so.
Line numbers would be cool on the multi-line blocks, but that's a problem for another day
Thanks!
Hmm, could you please explain what you're trying to achieve with formating, why add this style?
ReplyDeleteI want the code blocks to show up on a separate line, not inline (perhaps this is the default way). I've added some padding and some extra styles to differentiate it. I keep a lot of code-bits in my checklists
ReplyDeleteWithout a display:block
https://lh3.googleusercontent.com/DNMF8A3eJEtKbXRQSScRV76BcD7jN8jnNja4iFKQqkcdhFkc5tY3qcFB_1s5Ou7BCEcyvXSv98xEP-I=s0
And then with a display: block, where I'm actually also wanting the multi-line block to go 100% width, but that's not a big deal.
ReplyDeleteAlso just noticed my typo. Woops
https://lh3.googleusercontent.com/w5p_y5FjDr_eK27DpccTIj3E-OHxskHqkn070vCVlDcQ4Vs_T-p573R4G71AhDYhmwjUISIfFxkiwYk=s0
But, with a class added to the multi-block tag, then it makes it dead-simple to only do a "display: block; width: 100%" on that
ReplyDeleteSorry for the delayed answer. With ```..``` code, the tag is also wrapped in tag. Thus, the code becomes a separate block, so there is no need for display:block on the code tag.
ReplyDeleteIf you just want to set background color - you can do it both on and on - thus you'll have width:100% background for code elements.
Would it help?
No prob! And got it! I didn't see that it was wrapped in tags, I set the width and block display on "pre code { }" and that worked. Thanks!!
ReplyDelete