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!

Comments

  1. Hmm, could you please explain what you're trying to achieve with formating, why add this style?

    ReplyDelete
  2. I 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

    Without a display:block
    https://lh3.googleusercontent.com/DNMF8A3eJEtKbXRQSScRV76BcD7jN8jnNja4iFKQqkcdhFkc5tY3qcFB_1s5Ou7BCEcyvXSv98xEP-I=s0

    ReplyDelete
  3. 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.

    Also just noticed my typo. Woops


    https://lh3.googleusercontent.com/w5p_y5FjDr_eK27DpccTIj3E-OHxskHqkn070vCVlDcQ4Vs_T-p573R4G71AhDYhmwjUISIfFxkiwYk=s0

    ReplyDelete
  4. 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

    ReplyDelete
  5. Sorry 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.

    If 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?

    ReplyDelete
  6. 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

Post a Comment

Popular posts from this blog

Hello friends

I'm really enjoy using checkvist, you are adding great features very quickly.