]> cat aescling's git repositories - mastodon.git/commitdiff
Fix styling of polls in JS-less fallback on public pages (#13436)
authorThibG <thib@sitedethib.com>
Tue, 7 Apr 2020 16:21:58 +0000 (18:21 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 16:21:58 +0000 (18:21 +0200)
app/views/statuses/_poll.html.haml

index c174766579d3691a5224c99360510e4b049216ab..de5357e6d8c0876ed87cd391e7013cec9e4055cf 100644 (file)
             %span.poll__number><
               - if own_votes.include?(index)
                 %i.poll__voted__mark.fa.fa-check
-              = percent.round
-            = Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
+              = "#{percent.round}%"
+            %span.poll__option__text
+              = Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
 
-            %span.poll__chart{ style: "width: #{percent}%" }
+          %span.poll__chart{ style: "width: #{percent}%" }
         - else
           %label.poll__option><
             %span.poll__input{ class: poll.multiple? ? 'checkbox' : nil}><
-            = Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
+            %span.poll__option__text
+              = Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
   .poll__footer
     - unless show_results
       %button.button.button-secondary{ disabled: true }