haskell / haskell-wiki-configuration

Issue tracking for Haskell Wiki
https://wiki.haskell.org/
4 stars 4 forks source link

Formatting of Haskell source code is kinda ugly #15

Closed m-renaud closed 5 years ago

m-renaud commented 6 years ago

The separation of the source code from the surrounding text (in terms of spacing and whitespace separatior) makes it difficult to read.

Current Formatting

haskell-wiki-current

Proposed Formatting

haskell-wiki-proposed

CSS Changes

Adding the following rules to .source-haskell:

border: 1px solid #EEE;
padding: 1ex;
margin: 1em;

.source-haskell .st0

Remove background #ddd, change color: #363

We also need to prevent inline code from getting the border, padding, and margin from above. There's probably a cleaner way to do this, I was just playing around in the developer console. Potentially adding a class for block code samples, then you could use .code-block .source-haskell for the rules above.

.inline-code .source-haskell {
    display: inline;
    border: 0 !important;
    padding: 3px !important;
    margin: 0 !important;
m-renaud commented 6 years ago

I'm also not a huge fan of the inline code, the grey background plus purple font isn't super readable either. That's a relatively minor change though, something like a slightly lighter background and slightly darker font would probably do it. Even going from #F0F0F0 to #F6F6F6 is noticeable better.

hgolden commented 5 years ago

The latest version of the Hawiki skin, just put into production, has fixed the formatting of Haskell source code.