action_menu.css 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. /* ----------------------------------
  2. * Action menu
  3. * ---------------------------------- */
  4. /* Main dialog setup */
  5. form[role="dialog"][data-type="action"],
  6. form[role="dialog"][data-type="object"] {
  7. background:
  8. url(action_menu/images/ui/pattern.png) repeat left top,
  9. url(action_menu/images/ui/gradient.png) no-repeat left top / 100% 100%;
  10. overflow: hidden;
  11. position: fixed;
  12. z-index: 100;
  13. top: 0;
  14. left: 0;
  15. right: 0;
  16. bottom: 0;
  17. padding: 0 0 7rem;
  18. /**
  19. * Using "font-size: 0" to avoid the unwanted visual space (about 3px) created
  20. * by white spaces and line breaks in the code between inline-block elements.
  21. */
  22. font-size: 0;
  23. color: #fff;
  24. }
  25. form[role="dialog"][data-type="action"]:before,
  26. form[role="dialog"][data-type="object"]:before {
  27. content: '';
  28. display: inline-block;
  29. vertical-align: top;
  30. width: 0.1rem;
  31. height: 100%;
  32. margin-left: -0.1rem;
  33. }
  34. form[role="dialog"][data-type="action"] > header,
  35. form[role="dialog"][data-type="object"] > header {
  36. -moz-box-sizing: border-box;
  37. font-size: 1.6rem;
  38. background: url(action_menu/images/ui/alpha.png) repeat 0 0;
  39. position: absolute;
  40. top: 0;
  41. left: 0;
  42. right: 0;
  43. z-index: 10;
  44. height: 5rem;
  45. line-height: 4.9rem;
  46. color: #fff;
  47. white-space: nowrap;
  48. text-overflow: ellipsis;
  49. display: block;
  50. overflow: hidden;
  51. font-weight: normal;
  52. padding: 0 3rem;
  53. border-bottom: 0.1rem solid #616262;
  54. }
  55. form[role="dialog"][data-type="action"] > header h1,
  56. form[role="dialog"][data-type="object"] > header h1 {
  57. font-size: 1.6rem;
  58. line-height: 4.9rem;
  59. text-align: left;
  60. color: #fff;
  61. white-space: nowrap;
  62. text-overflow: ellipsis;
  63. display: block;
  64. overflow: hidden;
  65. margin: 0;
  66. height: 100%;
  67. font-weight: normal;
  68. }
  69. /* Generic set of actions in toolbar */
  70. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] {
  71. height: 100%;
  72. float: right;
  73. margin: 0 -3rem 0 1rem;
  74. padding: 0;
  75. }
  76. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] a,
  77. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] button {
  78. -moz-box-sizing: border-box;
  79. position: relative;
  80. float: left;
  81. width: auto;
  82. min-width: 5rem;
  83. height: 4.9rem;
  84. margin-bottom: 0;
  85. padding: 0 1rem;
  86. border-radius: 0;
  87. line-height: 4.9rem;
  88. background: none;
  89. text-align: center;
  90. text-shadow: none;
  91. z-index: 5;
  92. }
  93. form[role="dialog"][data-type="action"] > header a,
  94. form[role="dialog"][data-type="action"] > header button {
  95. border: none;
  96. padding: 0;
  97. overflow: hidden;
  98. font-weight: 400;
  99. font-size: 1.5rem;
  100. line-height: 1.1em;
  101. color: #fff;
  102. border-radius: 0;
  103. text-decoration: none;
  104. }
  105. form[role="dialog"][data-type="action"] button::-moz-focus-inner,
  106. form[role="dialog"][data-type="object"] button::-moz-focus-inner {
  107. outline: none;
  108. border: none;
  109. }
  110. /* Pressed state */
  111. form[role="dialog"][data-type="action"] > header a:active .icon:after,
  112. form[role="dialog"][data-type="action"] > header button:active .icon:after,
  113. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] a:active,
  114. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] button:active {
  115. background: #008aaa !important;
  116. }
  117. /* Disabled state */
  118. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] a[aria-disabled="true"],
  119. form[role="dialog"][data-type="action"] > header menu[type="toolbar"] button[disabled] {
  120. opacity: 0.5;
  121. pointer-events: none;
  122. }
  123. /* Icon definitions */
  124. form[role="dialog"][data-type="action"] > header .icon {
  125. position: relative;
  126. float: none;
  127. display: inline-block;
  128. vertical-align: top;
  129. width: 4rem;
  130. height: 4.9rem;
  131. margin: 0 -1rem;
  132. background: transparent no-repeat center center / 3rem auto;
  133. font-size: 0;
  134. overflow: hidden;
  135. }
  136. form[role="dialog"][data-type="action"] > header .icon.icon-close {
  137. background-image: url(action_menu/images/icons/close.png);
  138. }
  139. form[role="dialog"][data-type="action"] > header .icon.icon-back {
  140. background-image: url(action_menu/images/icons/back.png);
  141. }
  142. /* Navigation links (back, cancel, etc) */
  143. form[role="dialog"][data-type="action"] > header > button,
  144. form[role="dialog"][data-type="action"] > header > a {
  145. float: left;
  146. width: 5rem;
  147. height: 4.9rem;
  148. background: none;
  149. overflow: visible;
  150. margin: 0 -1rem 0 -3rem;
  151. position: relative;
  152. }
  153. form[role="dialog"][data-type="action"] > header > button:after,
  154. form[role="dialog"][data-type="action"] > header > a:after {
  155. content: "";
  156. position: absolute;
  157. left: 0;
  158. top:0;
  159. width: 3.2rem;
  160. height: 4.9rem;
  161. background: url(action_menu/images/ui/separator.png) no-repeat 3rem top / 0.1rem 4.8rem;
  162. }
  163. form[role="dialog"][data-type="action"] > header > button::-moz-focus-inner {
  164. border: 0;
  165. padding: 0;
  166. }
  167. form[role="dialog"][data-type="action"] > header > button .icon,
  168. form[role="dialog"][data-type="action"] > header > a .icon {
  169. position: static;
  170. display: block;
  171. width: 3rem;
  172. height: 4.9rem;
  173. margin: 0;
  174. overflow: visible;
  175. font-size: 0;
  176. }
  177. form[role="dialog"][data-type="action"] > header > button .icon:after,
  178. form[role="dialog"][data-type="action"] > header > a .icon:after {
  179. content: "";
  180. position: absolute;
  181. left: 0;
  182. top: 0;
  183. z-index: -1;
  184. width: 3rem;
  185. height: 4.9rem;
  186. }
  187. /* Content */
  188. form[role="dialog"][data-type="action"] > section,
  189. form[role="dialog"][data-type="object"] > section {
  190. color: #fff;
  191. position: absolute;
  192. top: 7rem;
  193. left: 1.5rem;
  194. right: 1.5rem;
  195. bottom: 2rem;
  196. font-size: 1.6rem;
  197. overflow: scroll;
  198. }
  199. /* Specific component code */
  200. form[role="dialog"][data-type="action"] > menu,
  201. form[role="dialog"][data-type="object"] > menu {
  202. margin: 0;
  203. padding: 0;
  204. max-height: calc(100% - 13.5rem); /*header(5rem) + footer(7rem) + padding(1.5rem)*/
  205. padding-top: 1.5rem;
  206. overflow: auto;
  207. width: auto;
  208. border: none;
  209. background: none;
  210. position: absolute;
  211. left: 0;
  212. right: 0;
  213. bottom: 7rem;
  214. }
  215. form[role="dialog"][data-type="action"] > menu > button,
  216. form[role="dialog"][data-type="object"] > menu > button {
  217. width: calc(100% - 3rem);
  218. height: 4rem;
  219. -moz-box-sizing: border-box;
  220. vertical-align: middle;
  221. text-overflow: ellipsis;
  222. white-space: nowrap;
  223. overflow: hidden;
  224. font-weight: normal;
  225. line-height: 4rem;
  226. outline: none;
  227. font-size: 1.6rem;
  228. text-shadow: none;
  229. text-align: left;
  230. padding: 0 1.2rem;
  231. margin: 0 1.5rem 1rem 1.5rem;
  232. background: rgba(87, 87, 87, 0.8);
  233. border: none;
  234. border-radius: 0;
  235. position: relative;
  236. color: #fff;
  237. font-family: sans-serif;
  238. font-style: italic;
  239. }
  240. form[role="dialog"][data-type="action"] > menu > button:last-child,
  241. form[role="dialog"][data-type="object"] > menu > button:last-child {
  242. position: fixed;
  243. bottom: 0;
  244. left: 0;
  245. color: #333;
  246. background: #d8d8d8;
  247. text-align: center;
  248. border: none;
  249. margin-bottom: 1.5rem;
  250. border-radius: 2rem;
  251. }
  252. form[role="dialog"][data-type="action"] > menu > button:last-child:before,
  253. form[role="dialog"][data-type="object"] > menu > button:last-child:before {
  254. content: '';
  255. position: fixed;
  256. width: 100%;
  257. background: url(action_menu/images/ui/pattern.png) repeat scroll left top #2D2D2D;
  258. height: 7rem;
  259. left: 0;
  260. bottom: 0;
  261. z-index: -1;
  262. }
  263. form[role="dialog"][data-type="action"] > menu > button:nth-last-child(2),
  264. form[role="dialog"][data-type="object"] > menu > button:nth-last-child(2) {
  265. margin-bottom: 1.5rem;
  266. }
  267. /* Press state */
  268. form[role="dialog"][data-type="action"] > menu > button:active,
  269. form[role="dialog"][data-type="object"] > menu > button:active {
  270. background: #00aacc;
  271. color: #fff;
  272. }
  273. /* Disabled */
  274. form[role="dialog"][data-type="action"] > menu > button[disabled],
  275. form[role="dialog"][data-type="object"] > menu > button[disabled] {
  276. background-color: rgba(87, 87, 87, 0.8);
  277. color: rgba(255, 255, 255, 0.4);
  278. opacity: 0.5;
  279. pointer-events: none;
  280. }
  281. form[role="dialog"][data-type="action"] > menu > button[disabled]:last-child,
  282. form[role="dialog"][data-type="object"] > menu > button[disabled]:last-child {
  283. background-color: #e7e7e7;
  284. color: #a6a6a6;
  285. opacity: 1;
  286. }
  287. /*
  288. * Right to Left view
  289. */
  290. html[dir="rtl"] form[role="dialog"][data-type="action"]:before,
  291. form[role="dialog"][data-type="object"]:before {
  292. margin-left: auto;
  293. margin-right: -0.1rem;
  294. }
  295. html[dir="rtl"] form[role="dialog"][data-type="action"] > header h1,
  296. html[dir="rtl"] form[role="dialog"][data-type="object"] > header h1 {
  297. text-align: right;
  298. }
  299. html[dir="rtl"] form[role="dialog"][data-type="action"] > header menu[type="toolbar"] {
  300. float: left;
  301. margin-left: -3rem;
  302. margin-right: 1rem;
  303. }
  304. html[dir="rtl"] form[role="dialog"][data-type="action"] > header menu[type="toolbar"] a,
  305. html[dir="rtl"] form[role="dialog"][data-type="action"] > header menu[type="toolbar"] button {
  306. float: right;
  307. }
  308. html[dir="rtl"] form[role="dialog"][data-type="action"] > header menu[type="toolbar"] a:last-child,
  309. html[dir="rtl"] form[role="dialog"][data-type="action"] > header menu[type="toolbar"] button:last-child {
  310. background-position: right center;
  311. margin-left: auto;
  312. margin-right: -0.1rem;
  313. }
  314. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > button,
  315. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > a {
  316. float: right;
  317. margin-left: -1rem;
  318. margin-right: -3rem;
  319. }
  320. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > button:after,
  321. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > a:after {
  322. left: auto;
  323. right: 0;
  324. background-position: 0 top;
  325. }
  326. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > button .icon:after,
  327. html[dir="rtl"] form[role="dialog"][data-type="action"] > header > a .icon:after {
  328. left: auto;
  329. right: 0;
  330. }
  331. html[dir="rtl"] form[role="dialog"][data-type="action"] > menu > button,
  332. html[dir="rtl"] form[role="dialog"][data-type="object"] > menu > button {
  333. text-align: right;
  334. }
  335. html[dir="rtl"] form[role="dialog"][data-type="action"] > menu > button:last-child,
  336. html[dir="rtl"] form[role="dialog"][data-type="object"] > menu > button:last-child {
  337. left: auto;
  338. right: 0;
  339. }
  340. html[dir="rtl"] form[role="dialog"][data-type="action"] > menu > button:last-child:before,
  341. html[dir="rtl"] form[role="dialog"][data-type="object"] > menu > button:last-child:before {
  342. left: auto;
  343. right: 0;
  344. }