SpringAll icon indicating copy to clipboard operation
SpringAll copied to clipboard

Consistent styling for code tags

Open jhass opened this issue 13 years ago • 6 comments

I like the styling for code tags we get from Bootstrap in the SPV. Lets port it to the whole page and add some overflow: auto and display: block

Currently (SPV):

screenshot at 2013-11-04 22 42 31

Currently (stream): screenshot at 2013-11-04 22 42 53

Desired:

screenshot at 2013-11-04 22 43 26

jhass avatar Nov 04 '13 21:11 jhass

What is SPV?

qmaruf avatar Jan 16 '14 18:01 qmaruf

Single post view.

jhass avatar Jan 16 '14 18:01 jhass

+1 - the different styling is so annoying, the SPV style is better for defo

jaywink avatar Jan 18 '14 10:01 jaywink

I agree that the views should be consistent, but I am not sure display: block and overflow is appropriate here. In Markdown, there is a difference between inline code and code blocks. In the example above a complete line of code is quoted, so putting it in a block would make more sense semantically. Also, a Markdown code block will be converted to a <pre> tag, which already is a block-level element.


Inline code:

In UNIX, the `echo` command is used to output to the console.

code block:

```lang
function foo() {
  return bar;
}
```

eins78 avatar Feb 22 '14 10:02 eins78

Third form which generates a <pre> tag instead of a <code> tag is achieved by an empty line, code indented by four spaces and a final empty line. The code fences generate a <code> tag.

jhass avatar Sep 22 '14 23:09 jhass

Fixed through the boostrap port.

jhass avatar Mar 02 '15 00:03 jhass