getnikola / nikola-themes

Themes for Nikola
https://themes.getnikola.com/
71 stars 51 forks source link

[lanyon] code block paddings #136

Open gnohz opened 6 years ago

gnohz commented 6 years ago

I am new to Nikola, and I am wondering if we can adjust paddings for code blocks. It seems "lanyon" sets more space at top than bottom for code blocks. Can I change some parameters in lanyon.css to balance the paddings? Thanks.

gnohz commented 6 years ago

I changed two line in poole.css:

margin-bottom: 1rem;
     padding: 1rem;

Before, they were both 0. Problem solve!

Kwpolska commented 6 years ago

Which two lines? Care to make a pull request?

AdriaanRol commented 4 years ago

I had the exact same problem.

After inspecting the code I changed pre in themes/lanyon/assets/css/poole.css to the following.

pre {
  display: block;
  border-radius: 4px;
  padding: .6rem .5rem;
  font-size: .8rem;
  line-height: 1.4;
  white-space: pre;
  overflow: auto;
  word-break: break-all;
  word-wrap: break-word;
  background-color: #f9f9f9;
}

You may want to tweak the border-radius and padding settings to get something to your personal preferences.