buttons.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /* ----------------------------------
  2. * Buttons
  3. * ---------------------------------- */
  4. .button::-moz-focus-inner,
  5. a[role="button"]::-moz-focus-inner,
  6. button::-moz-focus-inner {
  7. border: none;
  8. outline: none;
  9. margin-top: -0.2rem; /* To fix line-height bug (697451) */
  10. }
  11. button,
  12. a[role="button"],
  13. .button {
  14. width: 100%;
  15. height: 3.8rem;
  16. margin: 0 0 1rem;
  17. padding: 0 1.5rem;
  18. -moz-box-sizing: border-box;
  19. display: inline-block;
  20. vertical-align: middle;
  21. text-overflow: ellipsis;
  22. white-space: nowrap;
  23. overflow: hidden;
  24. background: #fafafa url(buttons/images/ui/default.png) repeat-x left bottom / auto 100%;
  25. border: 0.1rem solid #a6a6a6;
  26. border-radius: 0.2rem;
  27. font-weight: 500;
  28. font-size: 1.6rem;
  29. line-height: 3.8rem;
  30. color: #333;
  31. text-align: center;
  32. text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
  33. text-decoration: none;
  34. outline: none;
  35. }
  36. /* Press (default & recommend) */
  37. button:active,
  38. a[role="button"]:active,
  39. button.recommend:active,
  40. a.recommend[role="button"]:active {
  41. border-color: #008aaa;
  42. background: #008aaa;
  43. background-size: auto 100%;
  44. color: #333;
  45. }
  46. /* Recommend */
  47. button.recommend,
  48. a[role="button"].recommend {
  49. background-image: url(buttons/images/ui/recommend.png);
  50. background-color: #00caf2;
  51. border-color: #008eab;
  52. }
  53. /* Danger */
  54. button.danger,
  55. a.danger[role="button"],
  56. span.danger[role="button"] {
  57. background-image: url(buttons/images/ui/danger.png);
  58. background-color: #b70404;
  59. color: #fff;
  60. text-shadow: none;
  61. border-color: #820000;
  62. }
  63. /* Danger Press */
  64. button.danger:active,
  65. a[role="button"].danger:active,
  66. .button.danger:active {
  67. background-image: url(buttons/images/ui/danger-press.png);
  68. background-color: #890707;
  69. }
  70. /* Disabled (default & recommend) */
  71. button[disabled],
  72. a[role="button"][aria-disabled="true"],
  73. .button[aria-disabled="true"],
  74. button[disabled].recommend,
  75. a[role="button"][aria-disabled="true"].recommend,
  76. .button[aria-disabled="true"].recommend {
  77. background: #e7e7e7;
  78. border-color: #c7c7c7;
  79. color: #c7c7c7;
  80. text-shadow: none;
  81. pointer-events: none;
  82. }
  83. /* Danger disabled */
  84. button[disabled].danger,
  85. .button[aria-disabled="true"].danger,
  86. a[role="button"][aria-disabled="true"].danger {
  87. background: #c68484;
  88. border-color: #a56464;
  89. color: #a56464;
  90. text-shadow: none;
  91. pointer-events: none;
  92. }
  93. /* Disabled with dark background */
  94. .dark button[disabled],
  95. .dark .button[aria-disabled="true"],
  96. .dark a[role="button"][aria-disabled="true"] {
  97. background: #5f5f5f;
  98. color: #4d4d4d;
  99. border-color: #4d4d4d;
  100. text-shadow: none;
  101. pointer-events: none;
  102. }
  103. /* ----------------------------------
  104. * Buttons inside lists
  105. * ---------------------------------- */
  106. li button,
  107. li a[role="button"],
  108. li .button {
  109. position: relative;
  110. background: #e7e7e7;
  111. text-align: left;
  112. /* For hacking box-shadows we need overflow:visible; so we lose text-overflows...*/
  113. white-space: normal;
  114. overflow: visible;
  115. }
  116. /* Hacking box-shadow */
  117. li button:after,
  118. li a[role="button"]:after,
  119. li .button:after {
  120. content: "";
  121. position: absolute;
  122. top: 100%;
  123. left: 0;
  124. right: 0;
  125. height: 0.2rem;
  126. background: url( buttons/images/ui/shadow.png) repeat-x left bottom / auto 100%;
  127. }
  128. /* Press */
  129. li a[role="button"]:active:after,
  130. li .button:active:after,
  131. li button:active:after {
  132. opacity: 0;
  133. }
  134. /* Disabled */
  135. li button[disabled]:after,
  136. li a[role="button"][aria-disabled="true"]:after,
  137. li .button[aria-disabled="true"]:after {
  138. background: none;
  139. }
  140. /* Icons */
  141. li button.icon,
  142. li a[role="button"].icon,
  143. li .button.icon {
  144. padding-right: 3rem;
  145. }
  146. li button.icon:before,
  147. li a[role="button"].icon:before,
  148. li .button.icon:before {
  149. content: "";
  150. width: 3rem;
  151. height: 3rem;
  152. position: absolute;
  153. top: 50%;
  154. right: 0;
  155. margin-top: -1.5rem;
  156. background: transparent no-repeat center center / 100% auto;
  157. pointer-events: none;
  158. }
  159. li button.icon-view:before,
  160. li a[role="button"].icon-view:before {
  161. background: url(buttons/images/icons/view.png) no-repeat 1.6rem 0 / 1rem 9rem;
  162. }
  163. li button.icon-view:active:before,
  164. li a[role="button"].icon-view:active:before {
  165. background-position: 1.6rem -3rem;
  166. }
  167. li button.icon-view:disabled:before,
  168. li a[role="button"][aria-disabled="true"].icon-view:before {
  169. background-position: 1.6rem -6rem;
  170. }
  171. li button.icon-dialog,
  172. li a[role="button"].icon-dialog,
  173. li .button.icon-dialog {
  174. font-size: 1.7rem;
  175. }
  176. li button.icon-dialog:before,
  177. li a[role="button"].icon-dialog:before,
  178. li .button.icon-dialog:before {
  179. background: url(buttons/images/icons/dialog.png) no-repeat 1.6rem 0 / 1rem 9rem;
  180. top: 100%;
  181. margin-top: -2.4rem;
  182. }
  183. li button.icon-dialog:active:before,
  184. li a[role="button"].icon-dialog:active:before,
  185. li .button.icon-dialog:active:before {
  186. background-position: 1.6rem -3rem;
  187. }
  188. li button.icon-dialog:disabled:before,
  189. li a[role="button"][aria-disabled="true"].icon-dialog:before,
  190. li .button[aria-disabled="true"].icon-dialog:before {
  191. background-position: 1.6rem -6rem;
  192. }
  193. /* ----------------------------------
  194. * Buttons inside lists, compact mode
  195. * ---------------------------------- */
  196. ul.compact,
  197. ol.compact {
  198. padding: 0 1.5rem 1.5rem 1.5rem;
  199. }
  200. ul.compact li,
  201. ol.compact li {
  202. padding: 1.5rem 0 0.5rem 0;
  203. border-bottom: solid #bdbdbd 0.1rem;
  204. display: block;
  205. overflow: hidden;
  206. }
  207. ul.compact li label,
  208. ol.compact li label {
  209. padding: 0 1.5rem 1rem 1.5rem;
  210. color: #333;
  211. font-weight: normal;
  212. font-size: 1.6rem;
  213. line-height: 1.8rem;
  214. display: block;
  215. text-overflow: ellipsis;
  216. white-space: nowrap;
  217. overflow: hidden;
  218. }
  219. /* Inputs inside of .button */
  220. .button input,
  221. body[role="application"] .button input {
  222. border: 0;
  223. background: none;
  224. }
  225. /* Hides dropdown arrow until bug #649849 is fixed */
  226. .button.icon select {
  227. width: 130%;
  228. }
  229. /******************************************************************************
  230. * Right-To-Left layout
  231. */
  232. html[dir="rtl"] li button,
  233. html[dir="rtl"] li a[role="button"],
  234. html[dir="rtl"] li .button {
  235. text-align: right;
  236. }
  237. html[dir="rtl"] li button:after,
  238. html[dir="rtl"] li a[role="button"]:after,
  239. html[dir="rtl"] li .button:after {
  240. background-position: right bottom;
  241. }
  242. html[dir="rtl"] li button.icon,
  243. html[dir="rtl"] li a[role="button"].icon,
  244. html[dir="rtl"] li .button.icon {
  245. padding-left: 3rem;
  246. padding-right: 1rem;
  247. }
  248. html[dir="rtl"] li button.icon:before,
  249. html[dir="rtl"] li a[role="button"].icon:before,
  250. html[dir="rtl"] li .button.icon:before {
  251. left: -1rem;
  252. right: inherit;
  253. }
  254. html[dir="rtl"] li button.icon-view:before,
  255. html[dir="rtl"] li a[role="button"].icon-view:before {
  256. background-image: url(buttons/images/icons/view_rtl.png);
  257. background-position: 1.6rem 0;
  258. }
  259. html[dir="rtl"] li button.icon-dialog:before,
  260. html[dir="rtl"] li a[role="button"].icon-dialog:before,
  261. html[dir="rtl"] li .button.icon-dialog:before {
  262. background-image: url(buttons/images/icons/dialog_rtl.png);
  263. background-position: 1.6rem 0;
  264. }