question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom style sheets

See original GitHub issue

Would it be possible to add an option to override specific CSS rules in a chosen theme?

For example, I’d like to be able to specify a maximum width for images, while using the default GitHub theme. A field in the advanced options, where I could enter my own CSS, would allow me to achieve this:

.markdown-body img {
    max-width: 20em;
}

The .markdown-body class selector would be required to override the specificity of the default stylesheet (which is annoying and confusing), however just appending this CSS to the end of the selected theme style sheet would be all that’s required to get it working.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simovcommented, Feb 19, 2021

No, I actually abandoned it due to multiple issues with it. For now you can use other extensions in combination with Markdown Viewer to modify the rendered output.

1reaction
JonathanHolveycommented, Jan 25, 2018

I found that placing a <style> tag at the end of the document was a simple solution to this. Previously I tried putting it at the top, which causes the Markdown parsing to fail.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About Custom Style Sheets - Oracle
A custom style sheet extends the styles defined in the style sheet for a parent look and feel. In ADF UIX, a custom...
Read more >
Create, edit, and attach CSS files to style your site
CSS (Cascading Style Sheets) are coded files that select elements of your page and control their presentation. Think of your custom ...
Read more >
Adding a Custom Stylesheet | Gantry Documentation
To create a custom CSS file, you just have to create a new css file at /templates/[TEMPLATE]/css/ and name it [TEMPLATE]-custom.css. The new...
Read more >
Style Sheets in HTML documents - W3C
14 Style Sheets. Contents. Introduction to style sheets; Adding style to HTML. Setting the default style sheet language; Inline style information; Header style ......
Read more >
HTML Styles CSS - W3Schools
Cascading Style Sheets (CSS) is used to format the layout of a webpage. With CSS, you can control the color, font, the size...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found