From 94e5f856d323a5bcf14611522d4394ddafd47a61 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 6 Sep 2018 18:40:47 +0200 Subject: [PATCH] Extract some CSS in a .message class --- .../stylesheets/new_design/messagerie.scss | 22 +++++++++---------- app/assets/stylesheets/new_design/print.scss | 8 +++---- .../shared/dossiers/_messagerie.html.haml | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/new_design/messagerie.scss b/app/assets/stylesheets/new_design/messagerie.scss index 6e575540b..b44c180bc 100644 --- a/app/assets/stylesheets/new_design/messagerie.scss +++ b/app/assets/stylesheets/new_design/messagerie.scss @@ -10,19 +10,19 @@ padding: 2 * $default-spacer; margin-bottom: $default-spacer; border-radius: 4px; +} - > li { - display: flex; - align-items: flex-start; - margin-bottom: $default-padding; - padding: $default-padding; - background: #FFFFFF; - width: 80%; - border-radius: 3px; +.message { + display: flex; + align-items: flex-start; + margin-bottom: $default-padding; + padding: $default-padding; + background: #FFFFFF; + width: 80%; + border-radius: 3px; - &.from-me { - margin-left: auto; - } + &.from-me { + margin-left: auto; } } diff --git a/app/assets/stylesheets/new_design/print.scss b/app/assets/stylesheets/new_design/print.scss index 0a62ad243..2a6ebd178 100644 --- a/app/assets/stylesheets/new_design/print.scss +++ b/app/assets/stylesheets/new_design/print.scss @@ -44,10 +44,6 @@ th { padding-left: 0; max-height: none; - li { - margin-bottom: 40px; - } - h2 { font-size: 110%; } @@ -58,6 +54,10 @@ th { } } +.message { + margin-bottom: 40px; +} + .updated-at { display: none; } diff --git a/app/views/shared/dossiers/_messagerie.html.haml b/app/views/shared/dossiers/_messagerie.html.haml index be8414010..ee380ee09 100644 --- a/app/views/shared/dossiers/_messagerie.html.haml +++ b/app/views/shared/dossiers/_messagerie.html.haml @@ -1,7 +1,7 @@ .messagerie.container %ul.messages-list - dossier.commentaires.each do |commentaire| - %li{ class: commentaire_is_from_me_class(commentaire, user_email) } + %li.message{ class: commentaire_is_from_me_class(commentaire, user_email) } = render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, user_email: user_email, messagerie_seen_at: messagerie_seen_at } = render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }