confirm.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /* ----------------------------------
  2. * Confirm
  3. * ---------------------------------- */
  4. /* Main dialog setup */
  5. form[role="dialog"][data-type="confirm"] {
  6. background:
  7. url(confirm/images/ui/pattern.png) repeat left top,
  8. url(confirm/images/ui/gradient.png) no-repeat left top / 100% 100%;
  9. overflow: hidden;
  10. position: absolute;
  11. z-index: 100;
  12. top: 0;
  13. left: 0;
  14. right: 0;
  15. bottom: 0;
  16. padding-bottom: 7rem;
  17. font-size: 0;
  18. /* Using font-size: 0; we avoid the unwanted visual space (about 3px)
  19. created by white-spaces and break lines in the code betewen inline-block elements */
  20. color: #fff;
  21. text-align: left;
  22. }
  23. form[role="dialog"][data-type="confirm"]:before {
  24. content: "";
  25. display: inline-block;
  26. vertical-align: middle;
  27. width: 0.1rem;
  28. height: 100%;
  29. margin-left: -0.1rem;
  30. }
  31. form[role="dialog"][data-type="confirm"] > section {
  32. font-weight: lighter;
  33. font-size: 2.2rem;
  34. color: #FAFAFA;
  35. padding: 0 1.5rem;
  36. -moz-box-sizing: padding-box;
  37. width: 100%;
  38. display: inline-block;
  39. overflow-y: scroll;
  40. max-height: 100%;
  41. vertical-align: middle;
  42. white-space: normal;
  43. }
  44. form[role="dialog"][data-type="confirm"] h1 {
  45. font-weight: normal;
  46. font-size: 1.6rem;
  47. line-height: 1.5em;
  48. color: #fff;
  49. margin: 0;
  50. padding: 1rem 1.5rem 0;
  51. }
  52. /* Menu & buttons setup */
  53. form[role="dialog"][data-type="confirm"] menu {
  54. white-space: nowrap;
  55. margin: 0;
  56. padding: 1.5rem;
  57. background: #2d2d2d url(confirm/images/ui/pattern.png) repeat left top;
  58. display: block;
  59. overflow: hidden;
  60. position: absolute;
  61. left: 0;
  62. right: 0;
  63. bottom: 0;
  64. }
  65. form[role="dialog"][data-type="confirm"] menu button::-moz-focus-inner {
  66. border: none;
  67. outline: none;
  68. margin-top: -0.2rem; /* To fix line-height bug (697451) */
  69. }
  70. form[role="dialog"][data-type="confirm"] menu button {
  71. font-family: sans-serif;
  72. font-style: italic;
  73. width: 100%;
  74. height: 4rem;
  75. margin: 0 0 1rem;
  76. padding: 0 1.2rem;
  77. -moz-box-sizing: border-box;
  78. display: inline-block;
  79. vertical-align: middle;
  80. text-overflow: ellipsis;
  81. white-space: nowrap;
  82. overflow: hidden;
  83. background: #d8d8d8;
  84. border: none;
  85. border-radius: 2rem;
  86. font-weight: normal;
  87. font-size: 1.6rem;
  88. line-height: 4rem;
  89. color: #333;
  90. text-align: center;
  91. text-shadow: none;
  92. text-decoration: none;
  93. outline: none;
  94. }
  95. /* Recommend */
  96. form[role="dialog"][data-type="confirm"] menu button.recommend {
  97. background-color: #00caf2;
  98. color: #fff;
  99. }
  100. /* Danger */
  101. form[role="dialog"][data-type="confirm"] menu button.danger {
  102. background-color: #e51e1e;
  103. color: #fff;
  104. }
  105. /* Pressed */
  106. form[role="dialog"][data-type="confirm"] menu button:active {
  107. background: #00aacc;
  108. color: #fff;
  109. }
  110. /* Disabled */
  111. form[role="dialog"][data-type="confirm"] > menu > button[disabled] {
  112. background-color: #565656;
  113. color: rgba(255,255,255,0.4);
  114. pointer-events: none;
  115. }
  116. form[role="dialog"][data-type="confirm"] > menu > button[disabled].recommend {
  117. background-color: #006579;
  118. }
  119. form[role="dialog"][data-type="confirm"] > menu > button[disabled].danger {
  120. background-color: #730f0f;
  121. }
  122. button[disabled]::-moz-selection {
  123. -moz-user-select: none;
  124. }
  125. form[role="dialog"][data-type="confirm"] menu button:last-child {
  126. margin-left: 1rem;
  127. }
  128. form[role="dialog"][data-type="confirm"] menu button,
  129. form[role="dialog"][data-type="confirm"] menu button:first-child {
  130. margin: 0;
  131. }
  132. form[role="dialog"][data-type="confirm"] menu button {
  133. width: calc((100% - 1rem) / 2);
  134. }
  135. form[role="dialog"][data-type="confirm"] menu button.full {
  136. width: 100%;
  137. }
  138. /* Specific component code */
  139. form[role="dialog"][data-type="confirm"] p {
  140. word-wrap: break-word;
  141. margin: 1rem 0 0;
  142. padding: 1rem 1.5rem;
  143. border-top: 0.1rem solid #686868;
  144. line-height: 3rem;
  145. }
  146. form[role="dialog"][data-type="confirm"] p span {
  147. font-size: 1.5rem;
  148. display: block;
  149. line-height: 1.7rem;
  150. color: rgba(255,255,255,0.6);
  151. }
  152. form[role="dialog"][data-type="confirm"] p img {
  153. float: left;
  154. margin-right: 2rem;
  155. }
  156. form[role="dialog"][data-type="confirm"] p strong {
  157. font-weight: lighter;
  158. }
  159. form[role="dialog"][data-type="confirm"] p small {
  160. font-size: 1.4rem;
  161. font-weight: normal;
  162. color: #cbcbcb;
  163. display: block;
  164. }
  165. form[role="dialog"][data-type="confirm"] dl {
  166. border-top: 0.1rem solid #686868;
  167. margin: 1rem 0 0;
  168. overflow: hidden;
  169. padding-top: 1rem;
  170. font-size: 1.6rem;
  171. line-height: 2.2rem;
  172. }
  173. form[role="dialog"][data-type="confirm"] dl > dt {
  174. clear: both;
  175. float: left;
  176. width: 7rem;
  177. padding-left: 1.5rem;
  178. font-weight: 500;
  179. text-align: left;
  180. }
  181. form[role="dialog"][data-type="confirm"] dl > dd {
  182. padding-right: 1.5rem;
  183. font-weight: 300;
  184. text-overflow: ellipsis;
  185. vertical-align: top;
  186. overflow: hidden;
  187. }
  188. form[role="dialog"][data-type="confirm"] figure {
  189. margin: 1.5rem;
  190. display: flex;
  191. align-items: center;
  192. }
  193. form[role="dialog"][data-type="confirm"] figure img {
  194. padding-right: 1.5rem;
  195. flex-shrink: 0;
  196. }
  197. form[role="dialog"][data-type="confirm"] figure figcaption {
  198. font-size: 2.1rem;
  199. font-weight: 300;
  200. }
  201. form[role="dialog"][data-type="confirm"] ul {
  202. margin: 0;
  203. padding: 2rem 1.5rem;
  204. border-top: 0.1rem solid #686868;
  205. list-style: none;
  206. font-size: 1.6rem;
  207. font-weight: normal;
  208. }
  209. form[role="dialog"][data-type="confirm"] ul li {
  210. word-wrap: break-word;
  211. line-height: 2rem;
  212. padding-bottom: 1.5rem;
  213. }
  214. form[role="dialog"][data-type="confirm"] ul li:last-child {
  215. padding-bottom: 0;
  216. }
  217. form[role="dialog"][data-type="confirm"] ul li ul {
  218. border: none;
  219. margin: 0;
  220. padding: 0;
  221. }
  222. /*
  223. * Right to left View
  224. */
  225. html[dir="rtl"] form[role="dialog"][data-type="confirm"] {
  226. text-align: right;
  227. }
  228. html[dir="rtl"] form[role="dialog"][data-type="confirm"]:before {
  229. margin-left: auto;
  230. margin-right: -0.1rem;
  231. }
  232. html[dir="rtl"] form[role="dialog"][data-type="confirm"] menu button:last-child {
  233. margin-left: auto;
  234. margin-right: 1rem;
  235. }
  236. html[dir="rtl"] form[role="dialog"][data-type="confirm"] p img {
  237. float: right;
  238. margin-left: 2rem;
  239. margin-right: auto;
  240. }
  241. html[dir="rtl"] form[role="dialog"][data-type="confirm"] dl > dt {
  242. float: right;
  243. padding-left: inherit;
  244. padding-right: 1.5rem;
  245. text-align: right;
  246. }
  247. html[dir="rtl"] form[role="dialog"][data-type="confirm"] dl > dd {
  248. padding-left: 1.5rem;
  249. padding-right: inherit;
  250. }
  251. html[dir="rtl"] form[role="dialog"][data-type="confirm"] figure img {
  252. padding-left: 1.5rem;
  253. padding-right: inherit;
  254. }