about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-06 11:29:06 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-06 11:29:06 +0100
commit48062329973398fe5b12cadcc389c8602f1bb17f (patch)
treee2bfa37e2985b90f2de03d7a47c4ffbd76ed8949 /app/javascript/styles
parente80fabfd84c1e2d157ca1cd536f68f3c75f011c1 (diff)
parentad6f7ea25036e7065a1a04d020e2f51023e2e614 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/mastodon/polls.scss92
1 files changed, 92 insertions, 0 deletions
diff --git a/app/javascript/styles/mastodon/polls.scss b/app/javascript/styles/mastodon/polls.scss
index 7c6e61d63..4f8c94d83 100644
--- a/app/javascript/styles/mastodon/polls.scss
+++ b/app/javascript/styles/mastodon/polls.scss
@@ -5,6 +5,7 @@
   li {
     margin-bottom: 10px;
     position: relative;
+    height: 18px + 12px;
   }
 
   &__chart {
@@ -27,15 +28,43 @@
     padding: 6px 0;
     line-height: 18px;
     cursor: default;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
 
     input[type=radio],
     input[type=checkbox] {
       display: none;
     }
 
+    input[type=text] {
+      display: block;
+      box-sizing: border-box;
+      flex: 1 1 auto;
+      width: 20px;
+      font-size: 14px;
+      color: $inverted-text-color;
+      display: block;
+      outline: 0;
+      font-family: inherit;
+      background: $simple-background-color;
+      border: 1px solid darken($simple-background-color, 14%);
+      border-radius: 4px;
+      padding: 6px 10px;
+
+      &:focus {
+        border-color: $highlight-text-color;
+      }
+    }
+
     &.selectable {
       cursor: pointer;
     }
+
+    &.editable {
+      display: flex;
+      align-items: center;
+    }
   }
 
   &__input {
@@ -45,6 +74,7 @@
     box-sizing: border-box;
     width: 18px;
     height: 18px;
+    flex: 0 0 auto;
     margin-right: 10px;
     top: -1px;
     border-radius: 50%;
@@ -98,3 +128,65 @@
     font-size: 14px;
   }
 }
+
+.compose-form__poll-wrapper {
+  border-top: 1px solid darken($simple-background-color, 8%);
+
+  ul {
+    padding: 10px;
+  }
+
+  .poll__footer {
+    border-top: 1px solid darken($simple-background-color, 8%);
+    padding: 10px;
+    display: flex;
+    align-items: center;
+
+    button,
+    select {
+      flex: 1 1 50%;
+    }
+  }
+
+  .button.button-secondary {
+    font-size: 14px;
+    font-weight: 400;
+    padding: 6px 10px;
+    height: auto;
+    line-height: inherit;
+    color: $action-button-color;
+    border-color: $action-button-color;
+    margin-right: 5px;
+  }
+
+  li {
+    display: flex;
+    align-items: center;
+
+    .poll__text {
+      flex: 0 0 auto;
+      width: calc(100% - (23px + 6px));
+      margin-right: 6px;
+    }
+  }
+
+  select {
+    appearance: none;
+    box-sizing: border-box;
+    font-size: 14px;
+    color: $inverted-text-color;
+    display: inline-block;
+    width: auto;
+    outline: 0;
+    font-family: inherit;
+    background: $simple-background-color url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.933 18.467' height='19.698' width='15.929'><path d='M3.467 14.967l-3.393-3.5H14.86l-3.392 3.5c-1.866 1.925-3.666 3.5-4 3.5-.335 0-2.135-1.575-4-3.5zm.266-11.234L7.467 0 11.2 3.733l3.733 3.734H0l3.733-3.734z' fill='#{hex-color(darken($simple-background-color, 14%))}'/></svg>") no-repeat right 8px center / auto 16px;
+    border: 1px solid darken($simple-background-color, 14%);
+    border-radius: 4px;
+    padding: 6px 10px;
+    padding-right: 30px;
+  }
+
+  .icon-button.disabled {
+    color: darken($simple-background-color, 14%);
+  }
+}