闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
5.2 KiB

  1. .poll {
  2. margin-top: 16px;
  3. font-size: 14px;
  4. li {
  5. margin-bottom: 10px;
  6. position: relative;
  7. }
  8. &__chart {
  9. border-radius: 4px;
  10. display: block;
  11. background: darken($ui-primary-color, 5%);
  12. height: 5px;
  13. min-width: 1%;
  14. &.leading {
  15. background: $ui-highlight-color;
  16. }
  17. }
  18. progress {
  19. border: 0;
  20. display: block;
  21. width: 100%;
  22. height: 5px;
  23. appearance: none;
  24. background: transparent;
  25. &::-webkit-progress-bar {
  26. background: transparent;
  27. }
  28. // Those rules need to be entirely separate or they won't work, hence the
  29. // duplication
  30. &::-moz-progress-bar {
  31. border-radius: 4px;
  32. background: darken($ui-primary-color, 5%);
  33. }
  34. &::-ms-fill {
  35. border-radius: 4px;
  36. background: darken($ui-primary-color, 5%);
  37. }
  38. &::-webkit-progress-value {
  39. border-radius: 4px;
  40. background: darken($ui-primary-color, 5%);
  41. }
  42. }
  43. &__option {
  44. position: relative;
  45. display: flex;
  46. padding: 6px 0;
  47. line-height: 18px;
  48. cursor: default;
  49. overflow: hidden;
  50. &__text {
  51. display: inline-block;
  52. word-wrap: break-word;
  53. overflow-wrap: break-word;
  54. max-width: calc(100% - 45px - 25px);
  55. }
  56. input[type=radio],
  57. input[type=checkbox] {
  58. display: none;
  59. }
  60. .autossugest-input {
  61. flex: 1 1 auto;
  62. }
  63. input[type=text] {
  64. display: block;
  65. box-sizing: border-box;
  66. width: 100%;
  67. font-size: 14px;
  68. color: $inverted-text-color;
  69. outline: 0;
  70. font-family: inherit;
  71. background: $simple-background-color;
  72. border: 1px solid darken($simple-background-color, 14%);
  73. border-radius: 4px;
  74. padding: 6px 10px;
  75. &:focus {
  76. border-color: $highlight-text-color;
  77. }
  78. }
  79. &.selectable {
  80. cursor: pointer;
  81. }
  82. &.editable {
  83. display: flex;
  84. align-items: center;
  85. overflow: visible;
  86. }
  87. }
  88. &__input {
  89. display: inline-block;
  90. position: relative;
  91. border: 1px solid $ui-primary-color;
  92. box-sizing: border-box;
  93. width: 18px;
  94. height: 18px;
  95. flex: 0 0 auto;
  96. margin-right: 10px;
  97. top: -1px;
  98. border-radius: 50%;
  99. vertical-align: middle;
  100. margin-top: auto;
  101. margin-bottom: auto;
  102. flex: 0 0 18px;
  103. &.checkbox {
  104. border-radius: 4px;
  105. }
  106. &.active {
  107. border-color: $valid-value-color;
  108. background: $valid-value-color;
  109. }
  110. &:active,
  111. &:focus,
  112. &:hover {
  113. border-color: lighten($valid-value-color, 15%);
  114. border-width: 4px;
  115. }
  116. &::-moz-focus-inner {
  117. outline: 0 !important;
  118. border: 0;
  119. }
  120. &:focus,
  121. &:active {
  122. outline: 0 !important;
  123. }
  124. }
  125. &__number {
  126. display: inline-block;
  127. width: 45px;
  128. font-weight: 700;
  129. flex: 0 0 45px;
  130. }
  131. &__voted {
  132. padding: 0 5px;
  133. display: inline-block;
  134. &__mark {
  135. font-size: 18px;
  136. }
  137. }
  138. &__footer {
  139. padding-top: 6px;
  140. padding-bottom: 5px;
  141. color: $dark-text-color;
  142. }
  143. &__link {
  144. display: inline;
  145. background: transparent;
  146. padding: 0;
  147. margin: 0;
  148. border: 0;
  149. color: $dark-text-color;
  150. text-decoration: underline;
  151. font-size: inherit;
  152. &:hover {
  153. text-decoration: none;
  154. }
  155. &:active,
  156. &:focus {
  157. background-color: rgba($dark-text-color, .1);
  158. }
  159. }
  160. .button {
  161. height: 36px;
  162. padding: 0 16px;
  163. margin-right: 10px;
  164. font-size: 14px;
  165. }
  166. }
  167. .compose-form__poll-wrapper {
  168. border-top: 1px solid darken($simple-background-color, 8%);
  169. ul {
  170. padding: 10px;
  171. }
  172. .poll__footer {
  173. border-top: 1px solid darken($simple-background-color, 8%);
  174. padding: 10px;
  175. display: flex;
  176. align-items: center;
  177. button,
  178. select {
  179. flex: 1 1 50%;
  180. &:focus {
  181. border-color: $highlight-text-color;
  182. }
  183. }
  184. }
  185. .button.button-secondary {
  186. font-size: 14px;
  187. font-weight: 400;
  188. padding: 6px 10px;
  189. height: auto;
  190. line-height: inherit;
  191. color: $action-button-color;
  192. border-color: $action-button-color;
  193. margin-right: 5px;
  194. }
  195. li {
  196. display: flex;
  197. align-items: center;
  198. .poll__option {
  199. flex: 0 0 auto;
  200. width: calc(100% - (23px + 6px));
  201. margin-right: 6px;
  202. }
  203. }
  204. select {
  205. appearance: none;
  206. box-sizing: border-box;
  207. font-size: 14px;
  208. color: $inverted-text-color;
  209. display: inline-block;
  210. width: auto;
  211. outline: 0;
  212. font-family: inherit;
  213. 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;
  214. border: 1px solid darken($simple-background-color, 14%);
  215. border-radius: 4px;
  216. padding: 6px 10px;
  217. padding-right: 30px;
  218. }
  219. .icon-button.disabled {
  220. color: darken($simple-background-color, 14%);
  221. }
  222. }
  223. .muted .poll {
  224. color: $dark-text-color;
  225. &__chart {
  226. background: rgba(darken($ui-primary-color, 14%), 0.2);
  227. &.leading {
  228. background: rgba($ui-highlight-color, 0.2);
  229. }
  230. }
  231. }