]> cat aescling's git repositories - mastodon.git/commitdiff
Get rid of the Content Warning rainbows (#8129)
authorThibG <thib@sitedethib.com>
Wed, 15 Aug 2018 17:38:56 +0000 (19:38 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 15 Aug 2018 17:38:56 +0000 (19:38 +0200)
* Disable the animated rainbow text when the “Reduce motion” setting is set

* Get rid of the Content Warning rainbows

* Revert to default color for CWs in admin view

Since that colorscheme is apparently broken for some colorblind people.

* Use HTML5's details and summary for statuses with CWs in admin interface

app/javascript/styles/mastodon/tables.scss
app/views/admin/reports/_status.html.haml

index e54c55947e63b3ea0810a20497c503fedcaf4f7d..c2206cf55dde70265295b5a78cc7480584399036 100644 (file)
@@ -1,9 +1,3 @@
-@keyframes Swag {
-  0% { background-position: 0% 0%; }
-  50% { background-position: 100% 0%; }
-  100% { background-position: 200% 0%; }
-}
-
 .table {
   width: 100%;
   max-width: 100%;
@@ -191,14 +185,12 @@ a.table-action-link {
   .status__content {
     padding-top: 0;
 
+    summary {
+      display: list-item;
+    }
+
     strong {
       font-weight: 700;
-      background: linear-gradient(to right, orange , yellow, green, cyan, blue, violet,orange , yellow, green, cyan, blue, violet);
-      background-size: 200% 100%;
-      -webkit-background-clip: text;
-      background-clip: text;
-      color: transparent;
-      animation: Swag 2s linear 0s infinite;
     }
   }
 }
index 5e174f312ec1c3b34c830e6d9fd7287485cde862..5b410ec84d64c35f17ca7804a7b8918e145417ca 100644 (file)
@@ -3,11 +3,13 @@
     = f.check_box :status_ids, { multiple: true, include_hidden: false }, status.id
   .batch-table__row__content
     .status__content><
-      - unless status.proper.spoiler_text.blank?
-        %p><
-          %strong> Content warning: #{Formatter.instance.format_spoiler(status.proper)}
-
-      = Formatter.instance.format(status.proper, custom_emojify: true)
+      - if status.proper.spoiler_text.blank?
+        = Formatter.instance.format(status.proper, custom_emojify: true)
+      - else
+        %details<
+          %summary><
+            %strong> Content warning: #{Formatter.instance.format_spoiler(status.proper)}
+          = Formatter.instance.format(status.proper, custom_emojify: true)
 
     - unless status.proper.media_attachments.empty?
       - if status.proper.media_attachments.first.video?