Skip to content

Commit

Permalink
#2205 Add max-width to img in strategies & moments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxthew authored and julianguyen committed Dec 8, 2022
1 parent 0d6e0df commit d9e34cd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/assets/stylesheets/core/containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
width: 100%;
margin: 0;
}

.imageContainer {
img {
max-width: 100%;
}
}
2 changes: 1 addition & 1 deletion app/views/moments/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>

<% if @moment.why.present? %>
<div class="smallMarginTop">
<div class="smallMarginTop imageContainer">
<% if @moment.fix.present? %>
<div class="label">
<%= label_tag t('moments.form.why_legacy') %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/strategies/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>

<% if @strategy.description.present? %>
<div class="smallMarginTop">
<div class="smallMarginTop imageContainer">
<%= sanitize(@strategy.description) %>
</div>
<% end %>
Expand Down
4 changes: 4 additions & 0 deletions client/app/components/Input/InputTextarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
p {
margin: $size-0;
}

img {
max-width: 100%;
}
}

.dark {
Expand Down

0 comments on commit d9e34cd

Please sign in to comment.