<commit_before>(ns braid.core.client.ui.styles.message
  (:require
   [braid.core.client.ui.styles.hljs :refer [hljs-styles]]
   [braid.core.client.ui.styles.mixins :as mixins]
   [braid.core.client.ui.styles.pills :as pills]
   [braid.core.client.ui.styles.vars :refer [avatar-size pad card-width]]
   [garden.arithmetic :as m]
   [garden.units :refer [rem px]]))

(def message-left-pad  (m/+ avatar-size (rem 0.5)))

(def message
  [:>.message
   {:position "relative"
    :margin [[0 0 pad]]}

   [:&.failed-to-send
    {:background-color "rgba(239, 72, 72, 0.53)"}]

   [:&.collapse
    {:margin-top (m/- pad)}
     [:.avatar :.info
      {:display "none"}]]

    [:&.seen
     {:transition [["opacity" "0.5s" "linear"]]}
     ; cannot apply opacity to .message or .content or .dummy
     ; b/c it creates a new stacking context
     ; causing hover-cards to display under subsequent messages
     ["> .info"
      "> .avatar img"
      "> .post-message"
      "> .content > img"
      "> .content > .dummy > .user > .pill"
      "> .content > .dummy > .tag > .pill"
      "> .content > .dummy > .external"
      {:opacity 0.6}]

     ["> .content"
      {:color "rgba(0,0,0,0.6)"}]]

    [:&.unseen {}]

   [:>.delete
    {:display "none"}]
   [:&:hover
    [:>.delete
     {:position "absolute"
      :display "block"
      :right 0
      :z-index 1000}
     [:>button
      {:font-family "fontawesome"
       :color "red"}]]]

   [:>.avatar
    [:>img
     {:cursor "pointer"
      :width avatar-size
      :height avatar-size
      :display "inline-block"<commit_msg>Fix missing rename from last commit<commit_after>(ns braid.core.client.ui.styles.message
  (:require
   [braid.core.client.ui.styles.hljs :refer [hljs-styles]]
   [braid.core.client.ui.styles.mixins :as mixins]
   [braid.core.client.ui.styles.pills :as pills]
   [braid.core.client.ui.styles.vars :refer [avatar-size pad card-width]]
   [garden.arithmetic :as m]
   [garden.units :refer [rem px]]))

(def message-left-pad  (m/+ avatar-size (rem 0.5)))

(def message
  [:>.message
   {:position "relative"
    :margin [[0 0 pad]]}

   [:&.failed-to-send
    {:background-color "rgba(239, 72, 72, 0.53)"}]

   [:&.collapse
    {:margin-top (m/- pad)}
     [:.avatar :.info
      {:display "none"}]]

    [:&.seen
     {:transition [["opacity" "0.5s" "linear"]]}
     ; cannot apply opacity to .message or .content or .dummy
     ; b/c it creates a new stacking context
     ; causing hover-cards to display under subsequent messages
     ["> .info"
      "> .avatar img"
      "> .footer"
      "> .content > img"
      "> .content > .dummy > .user > .pill"
      "> .content > .dummy > .tag > .pill"
      "> .content > .dummy > .external"
      {:opacity 0.6}]

     ["> .content"
      {:color "rgba(0,0,0,0.6)"}]]

    [:&.unseen {}]

   [:>.delete
    {:display "none"}]
   [:&:hover
    [:>.delete
     {:position "absolute"
      :display "block"
      :right 0
      :z-index 1000}
     [:>button
      {:font-family "fontawesome"
       :color "red"}]]]

   [:>.avatar
    [:>img
     {:cursor "pointer"
      :width avatar-size
      :height avatar-size
      :display "inline-block"
{'fraction_non_alphanumeric': 0.18793430195830702, 'fraction_numerical': 0.017687934301958308, 'mean_word_length': 2.3584305408271473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4617063', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1145, 'n_words': 270}