polls.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. .autosuggest-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. margin-right: 10px;
  96. top: -1px;
  97. border-radius: 50%;
  98. vertical-align: middle;
  99. margin-top: auto;
  100. margin-bottom: auto;
  101. flex: 0 0 18px;
  102. &.checkbox {
  103. border-radius: 4px;
  104. }
  105. &.active {
  106. border-color: $valid-value-color;
  107. background: $valid-value-color;
  108. }
  109. &:active,
  110. &:focus,
  111. &:hover {
  112. border-color: lighten($valid-value-color, 15%);
  113. border-width: 4px;
  114. }
  115. &::-moz-focus-inner {
  116. outline: 0 !important;
  117. border: 0;
  118. }
  119. &:focus,
  120. &:active {
  121. outline: 0 !important;
  122. }
  123. &.disabled {
  124. border-color: $dark-text-color;
  125. &.active {
  126. background: $dark-text-color;
  127. }
  128. &:active,
  129. &:focus,
  130. &:hover {
  131. border-color: $dark-text-color;
  132. border-width: 1px;
  133. }
  134. }
  135. }
  136. &__number {
  137. display: inline-block;
  138. width: 45px;
  139. font-weight: 700;
  140. flex: 0 0 45px;
  141. }
  142. &__voted {
  143. padding: 0 5px;
  144. display: inline-block;
  145. &__mark {
  146. font-size: 18px;
  147. }
  148. }
  149. &__footer {
  150. padding-top: 6px;
  151. padding-bottom: 5px;
  152. color: $dark-text-color;
  153. }
  154. &__link {
  155. display: inline;
  156. background: transparent;
  157. padding: 0;
  158. margin: 0;
  159. border: 0;
  160. color: $dark-text-color;
  161. text-decoration: underline;
  162. font-size: inherit;
  163. &:hover {
  164. text-decoration: none;
  165. }
  166. &:active,
  167. &:focus {
  168. background-color: rgba($dark-text-color, 0.1);
  169. }
  170. }
  171. .button {
  172. height: 36px;
  173. padding: 0 16px;
  174. margin-right: 10px;
  175. font-size: 14px;
  176. }
  177. }
  178. .compose-form__poll-wrapper {
  179. border-top: 1px solid darken($simple-background-color, 8%);
  180. ul {
  181. padding: 10px;
  182. }
  183. .poll__footer {
  184. border-top: 1px solid darken($simple-background-color, 8%);
  185. padding: 10px;
  186. display: flex;
  187. align-items: center;
  188. button,
  189. select {
  190. flex: 1 1 50%;
  191. &:focus {
  192. border-color: $highlight-text-color;
  193. }
  194. }
  195. }
  196. .button.button-secondary {
  197. font-size: 14px;
  198. font-weight: 400;
  199. padding: 6px 10px;
  200. height: auto;
  201. line-height: inherit;
  202. color: $action-button-color;
  203. border-color: $action-button-color;
  204. margin-right: 5px;
  205. }
  206. li {
  207. display: flex;
  208. align-items: center;
  209. .poll__option {
  210. flex: 0 0 auto;
  211. width: calc(100% - (23px + 6px));
  212. margin-right: 6px;
  213. }
  214. }
  215. select {
  216. appearance: none;
  217. box-sizing: border-box;
  218. font-size: 14px;
  219. color: $inverted-text-color;
  220. display: inline-block;
  221. width: auto;
  222. outline: 0;
  223. font-family: inherit;
  224. 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;
  225. border: 1px solid darken($simple-background-color, 14%);
  226. border-radius: 4px;
  227. padding: 6px 10px;
  228. padding-right: 30px;
  229. }
  230. .icon-button.disabled {
  231. color: darken($simple-background-color, 14%);
  232. }
  233. }
  234. .muted .poll {
  235. color: $dark-text-color;
  236. &__chart {
  237. background: rgba(darken($ui-primary-color, 14%), 0.2);
  238. &.leading {
  239. background: rgba($ui-highlight-color, 0.2);
  240. }
  241. }
  242. }