Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
UX: Improve blockquote styling in emails (discourse#13527)
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX authored Jun 25, 2021
1 parent fa4e5e8 commit 203d567
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/email/styles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ def onebox_styles
style('aside.quote .avatar', 'margin-right: 5px; width:20px; height:20px; vertical-align:middle;')
style('aside.quote', 'border-left: 5px solid #e9e9e9; background-color: #f8f8f8; margin: 0;')

style('blockquote', 'border-left: 5px solid #e9e9e9; background-color: #f8f8f8; margin: 0;')
style('blockquote > p', 'padding: 1em;')
style('blockquote', 'border-left: 5px solid #e9e9e9; background-color: #f8f8f8; margin-left: 0; padding: 12px;')

# Oneboxes
style('aside.onebox', "border: 5px solid #e9e9e9; padding: 12px 25px 12px 12px; margin-bottom: 10px;")
Expand Down Expand Up @@ -198,9 +197,13 @@ def format_html
dir: Rtl.new(nil).enabled? ? 'rtl' : 'ltr'
)

style('blockquote > :first-child', 'margin-top: 0;')
style('blockquote > :last-child', 'margin-bottom: 0;')
style('blockquote > p', 'padding: 0;')

style('.with-accent-colors', "background-color: #{SiteSetting.email_accent_bg_color}; color: #{SiteSetting.email_accent_fg_color};")
style('h4', 'color: #222;')
style('h3', 'margin: 15px 0 20px 0;')
style('h3', 'margin: 30px 0 10px;')
style('hr', 'background-color: #ddd; height: 1px; border: 1px;')
style('a', "text-decoration: none; font-weight: bold; color: #{SiteSetting.email_link_color};")
style('ul', 'margin: 0 0 0 10px; padding: 0 0 0 20px;')
Expand Down

0 comments on commit 203d567

Please sign in to comment.