feat(faq): can render images
This commit is contained in:
parent
08c237c028
commit
7a5cb7dbd2
10 changed files with 141 additions and 5 deletions
20
app/assets/stylesheets/markdown-content.scss
Normal file
20
app/assets/stylesheets/markdown-content.scss
Normal file
|
@ -0,0 +1,20 @@
|
|||
.markdown-content {
|
||||
img {
|
||||
max-width: 100%;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
|
||||
display: block;
|
||||
|
||||
// In markdown img are always wrapped in p,
|
||||
// which already contains vertical margin.
|
||||
// We only add margin when there are siblings.
|
||||
// NOTE: CSS consider the img is only-child even
|
||||
// when there are only text node siblings, but it's still fine for us.
|
||||
margin: 1.5rem auto;
|
||||
|
||||
&:only-child {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue