newTab.css 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. html {
  5. width: 100%;
  6. height: 100%;
  7. }
  8. body {
  9. font: message-box;
  10. width: 100%;
  11. height: 100%;
  12. padding: 0;
  13. margin: 0;
  14. background-color: #eee;
  15. display: -moz-box;
  16. position: relative;
  17. -moz-box-flex: 1;
  18. -moz-user-focus: normal;
  19. -moz-box-orient: vertical;
  20. }
  21. input {
  22. font: message-box;
  23. font-size: 16px;
  24. }
  25. input[type=button] {
  26. cursor: pointer;
  27. }
  28. /* UNDO */
  29. #newtab-undo-container {
  30. transition: opacity 100ms ease-out;
  31. -moz-box-align: center;
  32. -moz-box-pack: center;
  33. }
  34. #newtab-undo-container[undo-disabled] {
  35. opacity: 0;
  36. pointer-events: none;
  37. }
  38. /* TOGGLE */
  39. #newtab-toggle {
  40. position: absolute;
  41. top: 12px;
  42. right: 12px;
  43. }
  44. #newtab-toggle:-moz-locale-dir(rtl) {
  45. left: 12px;
  46. right: auto;
  47. }
  48. /* MARGINS */
  49. #newtab-vertical-margin {
  50. display: -moz-box;
  51. position: relative;
  52. -moz-box-flex: 1;
  53. -moz-box-orient: vertical;
  54. }
  55. #newtab-margin-undo-container {
  56. display: -moz-box;
  57. left: 6px;
  58. position: absolute;
  59. top: 6px;
  60. z-index: 1;
  61. }
  62. #newtab-margin-undo-container:dir(rtl) {
  63. left: auto;
  64. right: 6px;
  65. }
  66. #newtab-undo-close-button:dir(rtl) {
  67. float:left;
  68. }
  69. #newtab-horizontal-margin {
  70. display: -moz-box;
  71. -moz-box-flex: 5;
  72. }
  73. #newtab-margin-top {
  74. min-height: 10px;
  75. max-height: 30px;
  76. display: -moz-box;
  77. -moz-box-flex: 1;
  78. -moz-box-align: center;
  79. -moz-box-pack: center;
  80. }
  81. #newtab-margin-bottom {
  82. min-height: 40px;
  83. max-height: 80px;
  84. -moz-box-flex: 1;
  85. }
  86. .newtab-side-margin {
  87. min-width: 40px;
  88. max-width: 300px;
  89. -moz-box-flex: 1;
  90. }
  91. /* GRID */
  92. #newtab-grid {
  93. display: -moz-box;
  94. -moz-box-flex: 5;
  95. -moz-box-orient: vertical;
  96. min-width: 600px;
  97. min-height: 400px;
  98. transition: 175ms ease-out;
  99. transition-property: opacity;
  100. }
  101. #newtab-grid[page-disabled] {
  102. opacity: 0;
  103. }
  104. #newtab-grid[locked],
  105. #newtab-grid[page-disabled] {
  106. pointer-events: none;
  107. }
  108. /* ROWS */
  109. .newtab-row {
  110. display: -moz-box;
  111. -moz-box-orient: horizontal;
  112. -moz-box-direction: normal;
  113. -moz-box-flex: 1;
  114. }
  115. /*
  116. * Thumbnail image sizes are determined in the preferences:
  117. * toolkit.pageThumbs.minWidth
  118. * toolkit.pageThumbs.minHeight
  119. */
  120. /* CELLS */
  121. .newtab-cell {
  122. display: -moz-box;
  123. -moz-box-flex: 1;
  124. }
  125. /* SITES */
  126. .newtab-site {
  127. position: relative;
  128. -moz-box-flex: 1;
  129. transition: 150ms ease-out;
  130. transition-property: top, left, opacity;
  131. }
  132. .newtab-site[frozen] {
  133. position: absolute;
  134. pointer-events: none;
  135. }
  136. .newtab-site[dragged] {
  137. transition-property: none;
  138. z-index: 10;
  139. }
  140. /* LINK + THUMBNAILS */
  141. .newtab-link,
  142. .newtab-thumbnail {
  143. position: absolute;
  144. left: 0;
  145. top: 0;
  146. right: 0;
  147. bottom: 0;
  148. }
  149. /* TITLES */
  150. .newtab-title {
  151. overflow: hidden;
  152. position: absolute;
  153. right: 0;
  154. text-align: center;
  155. }
  156. .newtab-title {
  157. bottom: 0;
  158. white-space: nowrap;
  159. text-overflow: ellipsis;
  160. vertical-align: middle;
  161. }
  162. .newtab-title {
  163. left: 0;
  164. padding: 0 4px;
  165. }
  166. /* CONTROLS */
  167. .newtab-control {
  168. position: absolute;
  169. opacity: 0;
  170. transition: opacity 100ms ease-out;
  171. }
  172. .newtab-control:-moz-focusring,
  173. .newtab-cell:not([ignorehover]) > .newtab-site:hover > .newtab-control {
  174. opacity: 1;
  175. }
  176. .newtab-control[dragged] {
  177. opacity: 0 !important;
  178. }
  179. @media (-moz-touch-enabled) {
  180. .newtab-control {
  181. opacity: 1;
  182. }
  183. }
  184. /* DRAG & DROP */
  185. /*
  186. * This is just a temporary drag element used for dataTransfer.setDragImage()
  187. * so that we can use custom drag images and elements. It needs an opacity of
  188. * 0.01 so that the core code detects that it's in fact a visible element.
  189. */
  190. .newtab-drag {
  191. width: 1px;
  192. height: 1px;
  193. background-color: #fff;
  194. opacity: 0.01;
  195. }
  196. /* SEARCH */
  197. #searchContainer {
  198. display: -moz-box;
  199. position: relative;
  200. -moz-box-pack: center;
  201. margin: 10px 0 15px;
  202. }
  203. #searchForm {
  204. width: 470px;
  205. display: -moz-box;
  206. position: relative;
  207. height: 36px; /* 32 px logo + 2*1px pad + 2*1px border */
  208. -moz-box-flex: 1;
  209. max-width: 600px;
  210. }
  211. #searchEngineLogo {
  212. border: 1px transparent;
  213. padding: 2px 4px 2px 2px;
  214. margin: 0;
  215. width: 32px;
  216. height: 32px;
  217. position: absolute;
  218. }
  219. #searchText {
  220. -moz-box-flex: 1;
  221. padding-top: 6px;
  222. padding-bottom: 6px;
  223. padding-inline-start: 38px; /* room for logo */
  224. padding-inline-end: 8px;
  225. background: rgba(255, 255, 255, 0.9) padding-box;
  226. border: 1px solid;
  227. border-color: rgba(37, 46, 65, 0.15) rgba(37, 46, 65, 0.17) rgba(37, 46, 65, 0.2);
  228. box-shadow: 0 1px 0 rgba(37, 46, 65, 0.02) inset,
  229. 0 0 2px rgba(37, 46, 65, 0.1) inset,
  230. 0 1px 0 rgba(255, 255, 255, 0.2);
  231. border-radius: 2.5px 0 0 2.5px;
  232. }
  233. #searchText:-moz-dir(rtl) {
  234. border-radius: 0 2.5px 2.5px 0;
  235. }
  236. #searchText:focus,
  237. #searchText[autofocus] {
  238. border-color: rgba(92, 133, 214, 0.6) rgba(78, 114, 188, 0.6) rgba(41, 82, 163, 0.6);
  239. }
  240. #searchText::placeholder {
  241. font-style: italic;
  242. opacity: 0.3;
  243. }
  244. #searchSubmit {
  245. margin-inline-start: -1px;
  246. background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1)) padding-box;
  247. padding: 0 9px;
  248. border: 1px solid;
  249. border-color: rgba(37, 46, 65, 0.2) rgba(37, 46, 65, 0.2) rgba(37, 46, 65, 0.2);
  250. border-inline-start: 1px solid transparent;
  251. border-radius: 0 2.5px 2.5px 0;
  252. box-shadow: 0 0 2px rgba(255, 255, 255, 0.5) inset,
  253. 0 1px 0 rgba(255, 255, 255, 0.2);
  254. cursor: pointer;
  255. transition-property: background-color, border-color, box-shadow;
  256. transition-duration: 150ms;
  257. }
  258. #searchSubmit:-moz-dir(rtl) {
  259. border-radius: 2.5px 0 0 2.5px;
  260. }
  261. #searchText:focus + #searchSubmit,
  262. #searchText + #searchSubmit:hover,
  263. #searchText[autofocus] + #searchSubmit {
  264. border-color: #8da1c8 #768bb5 #6579a2;
  265. color: white;
  266. }
  267. #searchText:focus + #searchSubmit,
  268. #searchText[autofocus] + #searchSubmit {
  269. background-image: linear-gradient(#85a8e0, #3d75cf);
  270. box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
  271. 0 0 0 1px rgba(255, 255, 255, 0.1) inset,
  272. 0 1px 0 rgba(23, 46, 67, 0.03);
  273. }
  274. #searchText + #searchSubmit:hover {
  275. background-image: linear-gradient(#85a8e0, #3d75cf);
  276. box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
  277. 0 0 0 1px rgba(255, 255, 255, 0.1) inset,
  278. 0 1px 0 rgba(23, 42, 79, 0.03),
  279. 0 0 4px rgba(0, 34, 102, 0.2);}
  280. #searchText + #searchSubmit:hover:active {
  281. box-shadow: 0 1px 1px rgba(3, 11, 27, 0.1) inset,
  282. 0 0 1px rgba(3, 11, 27, 0.2) inset;
  283. transition-duration: 0ms;
  284. }
  285. .contentSearchSuggestionTable {
  286. font: message-box;
  287. font-size: 16px;
  288. }