indents and block quotes

tim.at.ast@gmail.com's Avatar

tim.at.ast@gmail.com

06 Mar, 2014 04:32 PM

Hi Brett,

I've been modifying the swiss.css to learn more.
In the markdown document I have a poetry/code block.
Marked2 identifies it as such.
But I am getting more indentation than I had expected.
I set all the padding, left indent, left margins and so on to 0. (see below for example)
But still marked2 displays the poetry block as indented, about 5 character widths.
What setting might I be missing?
Are there some default CSS settings which the swiss.css hasn't over-ridden?

Thanks

tim

blockquote p {
font-size: 1.0em; margin-left: 0px; font-style: italic; line-height: 1.1em; }

  1. Support Staff 1 Posted by Brett on 06 Mar, 2014 05:41 PM

    Brett's Avatar

    Do you have automatic syntax higlighting turned on? Some of the
    highlight styles add padding.

  2. 2 Posted by tim.at.ast@gmai... on 06 Mar, 2014 06:20 PM

    tim.at.ast@gmail.com's Avatar

    Hi,

    padding doesn’t seem to be the issue. Every padding and indent and margin is set to zero. But I’ve still got a certain amount of indentation.

    Does the markdown processor (or marked2) convert the block quote character “>” to a tab?
    In this case the > character doesn’t just signal block quote but itself acts as an additional indent.

    I just noticed that if I use two of them ">>” the indentation is now double what was before.

    And also that this indentation is not proportional to the font size used in the body or in the code block. It is a fixed indent.

    I guess I expected that markdown would have several ‘levels’ of block B1 B2 B3 etc just like it has H1 H2 H3…, and that I would be able to set the indentation of the various levels within the CSS file. I was not expecting that the > character would be the indent itself.

    On a related note, in the swiss.css file there is a section like this:
    .poetry pre {
      display: block;
      ...
      margin-left: 1em; }

      .poetry pre code {
      ... }

    blockquote p {
      ..
     margin-left 1em;
     }

    I am assuming this is the relevant section of the css to adjust margins and indentations.
    But no matter what I set the margin-left to in any of this section, there is no impact on the marked2 display.

    I have tried switching “Code blocks are poetry” on and off but this also makes no difference. Now I don’t understand what this switch does, in terms of the css sheet.

    Thanks

    tim

  3. Support Staff 3 Posted by Brett on 06 Mar, 2014 06:40 PM

    Brett's Avatar

    Could you send me a copy of the markdown you're using? I was initially
    under the impression that we were talking about code blocks, not block
    quotes.

    -Brett

  4. Support Staff 4 Posted by Brett on 06 Mar, 2014 06:41 PM

    Brett's Avatar

    Also, code blocks are poetry adds a "poetry" class to the body, allowing
    different styling (as seen in the `.poetry pre code` section).

  5. 5 Posted by tim.at.ast@gmai... on 06 Mar, 2014 08:09 PM

    tim.at.ast@gmail.com's Avatar

    current problems:
    1) I can’t seem to remove the indents of the blockquotes section
    2) when I go change the “code blocks a pretty”, marked2 crashes. This is something I just encountered.

    additional question: is the swiss.css in the default_styles folder identical to the swiss.css which marked2 uses internally, and which cannot be altered?

    tim

  6. Support Staff 6 Posted by Brett on 06 Mar, 2014 08:25 PM

    Brett's Avatar

    Blockquotes by default have a 1em margin. You're adjusting a rule that
    affects paragraphs inside of blockquotes, you just need to add:

    blockquote { margin: 0 }

    Doing so will prevent nested quotes from indenting at all as well, so
    you may want a rule for those:

    blockquote blockquote { margin: 1em }

    Code blocks don't nest. Inside of a code block all whitespace is
    preserved, so indentation there will be preserved as is.

    the Swiss.css in the default styles folder is identical. Very, very few
    elements cannot be adjusted by using a custom CSS file, only default
    interface elements are defined in stylesheets that aren't available for
    modification.

  7. Support Staff 7 Posted by Brett on 06 Mar, 2014 08:26 PM

    Brett's Avatar

    Also, can you provide more info on this crash? Does it happen when you
    check the box, when you hit save and apply, or at some other point?

  8. tim.at.ast@gmail.com closed this discussion on 21 Sep, 2015 09:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac