#4069 Align markdown block of code and citation with GitHub CSS.
Merged 5 years ago by pingou. Opened 5 years ago by jaruga.
https://pagure.io/forks/jaruga/pagure.git feature/github-style-markdown  into  master

Align markdown block of code and citation with GitHub CSS.
Jun Aruga • 5 years ago  
pagure/static/pagure.css
file modified
+6 -4
@@ -36,13 +36,13 @@

  }

  

  blockquote {

-   border-left: 5px solid #ccc;

+   border-left: .25em solid #ccc;

    padding-left: 0.5em;

-   margin-bottom: 1.5rem;

  }

  

  blockquote p {

-   padding: 1rem;

+   padding: 0 1em;

+   color: #6a737d;

  }

  

  .nowrap{
@@ -211,9 +211,11 @@

    font-size: 100%;

  }

  

+ .card blockquote,

  .card pre

  {

- margin-bottom:0;

+   margin-top: 0;

+   margin-bottom: 16px;

  }

  

  a.notblue {

no initial comment

This fixes https://pagure.io/pagure/issue/4066 .

For a block of code (pre tag) and citation (blockquote tag),

$ npm install generate-github-markdown-css
$ ./node_modules/.bin/github-markdown-css > github-markdown.css

For the code of the block (pre)'s margin, I referred below part on GitHub CSS.
https://github.com/junaruga/github-markdown/blob/master/github-markdown.css#L418-L427

For the citation (blockquote) 's padding, border-left and (font) color, I referred below part of GitHub CSS.
https://github.com/junaruga/github-markdown/blob/master/github-markdown.css#L437-L441

I only checked these from Firefox's Inspect Element changing the values.

I do not know which is better to define the values for under card class or global level.

I removed the duplicated "padding", and rebased. But not updated in the page.

I removed the duplicated "padding", and rebased. But not updated in the page.

Did you force push to your fork?

rebased onto 196b50c

5 years ago

You had force pushed, I just had to refresh the PR manually (since you used the remote PR feature :))

Looks good to me and local tests show it works as expected, let's get it in :)

Commit 3e8c63f fixes this pull-request

Pull-Request has been merged by pingou

5 years ago

@pingou Sorry for my late reply. I was in vacation.

You had force pushed, I just had to refresh the PR manually (since you used the remote PR feature :))

Yeah, I might do it. "remote PR feature" does not work?
Anyway, thanks for checking my code and merging!

"remote PR feature" does not work?

It does, it just surprised me since the fork is on pagure, so it's simpler to use the regular PRs rather than the remote PRs, but both definitely work :)

Sure. I wanted to do a regular PR, but I did a remote PR by my wrong operation ;<

Metadata