about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-25 15:09:19 +0200
committerGitHub <noreply@github.com>2019-08-25 15:09:19 +0200
commit2e99e3cab349db6102505736e3b4b94abe776b80 (patch)
tree5d287f295f9460ed998359ba5f906ef99ac4625c /app/javascript/styles
parente72bac7576263445630926dd9992004ece7b73c4 (diff)
Fix more visual issues with the audio player (#11654)
* Fix more visual issues with the audio player

- Add horizontal baseline in the middle of waveform
- Fix audio player colors in light theme
- Use audio element instead of web audio API
- Do not render any bars until the file is loaded
- Do not allow interactions with waveform until the file is loaded

* Fix code style issue
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/mastodon-light/diff.scss10
-rw-r--r--app/javascript/styles/mastodon/components.scss13
2 files changed, 22 insertions, 1 deletions
diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss
index ee8a7d265..e7114ed07 100644
--- a/app/javascript/styles/mastodon-light/diff.scss
+++ b/app/javascript/styles/mastodon-light/diff.scss
@@ -104,7 +104,8 @@ html {
 .box-widget input[type="email"],
 .box-widget input[type="password"],
 .box-widget textarea,
-.statuses-grid .detailed-status {
+.statuses-grid .detailed-status,
+.audio-player {
   border: 1px solid lighten($ui-base-color, 8%);
 }
 
@@ -700,3 +701,10 @@ html {
 .compose-form .compose-form__warning {
   box-shadow: none;
 }
+
+.audio-player .video-player__controls button,
+.audio-player .video-player__time-sep,
+.audio-player .video-player__time-current,
+.audio-player .video-player__time-total {
+  color: $primary-text-color;
+}
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index c8c4af538..36466d5c1 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -5062,6 +5062,19 @@ a.status-card.compact:hover {
 
   &__waveform {
     padding: 15px 0;
+    position: relative;
+    overflow: hidden;
+
+    &::before {
+      content: "";
+      display: block;
+      position: absolute;
+      border-top: 1px solid lighten($ui-base-color, 4%);
+      width: 100%;
+      height: 0;
+      left: 0;
+      top: calc(50% + 1px);
+    }
   }
 
   &__progress-placeholder {