Prettifying preformatted text

Apr 27, 2022 0 comments

If you have many blog posts that contain preformatted text, as is the case with my blog, you can add the following code in Custom CSS. You get the same aspect as the code below.

pre{
  border-style: dotted; 
  border-width: 2px; 
  border-color: #aaaaaa;
  background-color: #f2f2f2;
  padding: 10px;
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
  word-break: break-word;
  white-space: pre-wrap;
}

Photo by Teng Yuhong on Unsplash

Comments

Related Posts

{{posts[0].title}}

{{posts[0].date}} {{posts[0].commentsNum}} {{messages_comments}}

{{posts[1].title}}

{{posts[1].date}} {{posts[1].commentsNum}} {{messages_comments}}

{{posts[2].title}}

{{posts[2].date}} {{posts[2].commentsNum}} {{messages_comments}}

Recent Comments

Contact Form