You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

responsive.css 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. /*----------------------------------------*\
  2. RESPONSIVE CSS
  3. \*----------------------------------------*/
  4. /*
  5. CONTENTS
  6. A) BASIC MOBILE RESETS
  7. B) HEADER & TOP MENUS
  8. C) MAIN CONTENT & SIDEBAR
  9. D) TOGGLE BUTTON & FLYOUT MENU
  10. E) UX ELEMENTS
  11. F) PAGE SPECIFIC STYLES
  12. G) FORMS
  13. */
  14. /* Hide new elements (toggle button and flyout menu) above 900px */
  15. .mobile-toggle-button,
  16. .flyout-menu {
  17. display: none;
  18. }
  19. /*
  20. redmine's body is set to min-width: 900px
  21. add first breakpoint here and start adding responsiveness
  22. */
  23. @media all and (max-width: 899px)
  24. {
  25. /*----------------------------------------*\
  26. A) BASIC MOBILE RESETS
  27. \*----------------------------------------*/
  28. /*
  29. apply natural border box, see: http://www.paulirish.com/2012/box-sizing-border-box-ftw/
  30. this helps us to better deal with percentages and padding / margin
  31. */
  32. *,
  33. *:before,
  34. *:after {
  35. -webkit-box-sizing: border-box;
  36. -moz-box-sizing: border-box;
  37. box-sizing: border-box;
  38. }
  39. body,
  40. html {
  41. height: 100%;
  42. margin: 0;
  43. padding: 0;
  44. }
  45. html {
  46. overflow-y: auto; /* avoid 2nd scrollbar on desktop */
  47. }
  48. body {
  49. min-width: 0; /* reset the min-width of 900px */
  50. -webkit-overflow-scrolling: touch;
  51. }
  52. body,
  53. input,
  54. select,
  55. textarea,
  56. button {
  57. font-size: 14px; /* Set font-size for standard elements to 14px */
  58. }
  59. select {
  60. max-width: 100%; /* prevent long names within select menues from breaking content */
  61. }
  62. #wrapper {
  63. position: relative;
  64. overflow-x: hidden; /* hide horizontal overflow */
  65. max-width: 100%;
  66. }
  67. #wrapper,
  68. #wrapper2 {
  69. margin: 0;
  70. }
  71. /*----------------------------------------*\
  72. B) HEADER & TOP MENUS
  73. \*----------------------------------------*/
  74. #header {
  75. width: 100%;
  76. height: 64px; /* the height of our header on mobile */
  77. min-height: 0;
  78. margin: 0;
  79. padding: 0;
  80. border: none;
  81. background-color: #628db6;
  82. }
  83. /* Hide project name on mobile (project name is still visible in select menu) */
  84. #header h1 {
  85. display: none !important;
  86. }
  87. /* reset #header a color for mobile toggle button */
  88. #header a.mobile-toggle-button {
  89. color: #f8f8f8;
  90. }
  91. /* Hide top-menu and main-menu on mobile, because it's placed in our flyout menu */
  92. #top-menu,
  93. #header #main-menu {
  94. display: none;
  95. }
  96. /* the quick search within header holding search form and #project_quick_jump_box box*/
  97. #header #quick-search {
  98. float: none;
  99. clear: none; /* there are themes which set clear property, this resets it */
  100. max-width: 100%; /* reset max-width */
  101. margin: 0;
  102. background: inherit;
  103. }
  104. /* this represents the dropdown arrow to left of the mobile project menu */
  105. #header .jump-box-arrow:before {
  106. /* set a font-size in order to achive same result in different themes */
  107. font-family: Verdana, sans-serif;
  108. font-size: 2em;
  109. line-height: 64px;
  110. position: absolute;
  111. left: 0;
  112. width: 2em;
  113. padding: 0 .5em;
  114. /* achieve dropdwon arrow by scaling a caret character */
  115. content: '^';
  116. -webkit-transform: scale(1,-.8);
  117. -ms-transform: scale(1,-.8);
  118. transform: scale(1,-.8);
  119. text-align: right;
  120. pointer-events: none;
  121. opacity: .6;
  122. }
  123. /* styles for combobox within quick-search (#project_quick_jump_box) */
  124. #header #quick-search select {
  125. font-size: 1.5em;
  126. font-weight: bold;
  127. line-height: 1.2;
  128. position: absolute;
  129. top: 15px;
  130. left: 0;
  131. float: left;
  132. width: 100%;
  133. max-width: 100%;
  134. height: 2em;
  135. height: 35px;
  136. padding: 5px;
  137. padding-right: 72px;
  138. padding-left: 50px;
  139. text-indent: .01px;
  140. color: inherit;
  141. border: 0;
  142. -webkit-border-radius: 0;
  143. border-radius: 0;
  144. background: none;
  145. -webkit-box-shadow: none;
  146. box-shadow: none;
  147. /* hide default browser arrow */
  148. -webkit-appearance: none;
  149. -moz-appearance: none;
  150. }
  151. #header #quick-search form {
  152. display: none;
  153. }
  154. /*----------------------------------------*\
  155. C) MAIN CONTENT & SIDEBAR
  156. \*----------------------------------------*/
  157. #main {
  158. padding: 0;
  159. }
  160. #main.nosidebar #content,
  161. div#content {
  162. width: 100%;
  163. min-height: 0; /* reset min-height of #content */
  164. margin: 0;
  165. }
  166. /* hide sidebar and sidebar switch panel, since it's placed in mobile flyout menu */
  167. #sidebar,
  168. #sidebar-switch-panel {
  169. display: none;
  170. }
  171. .splitcontentleft {
  172. width: 100%;
  173. }
  174. .splitcontentright {
  175. width: 100%;
  176. }
  177. /*----------------------------------------*\
  178. D) TOGGLE BUTTON & FLYOUT MENU
  179. \*----------------------------------------*/
  180. .mobile-toggle-button {
  181. font-size: 42px;
  182. line-height: 64px;
  183. position: relative;
  184. z-index: 10;
  185. display: block; /* remove display: none; of non-mobile version */
  186. float: right;
  187. width: 60px;
  188. height: 64px;
  189. margin-top: 0;
  190. text-align: center;
  191. border-left: 1px solid #ddd;
  192. }
  193. .mobile-toggle-button:hover,
  194. .mobile-toggle-button:active {
  195. text-decoration: none;
  196. }
  197. .mobile-toggle-button:after {
  198. font-family: Verdana, sans-serif;
  199. display: block;
  200. margin-top: -3px;
  201. content: '\2261';
  202. }
  203. /* search magnifier icon */
  204. .search-magnifier {
  205. font-family: Verdana;
  206. color: #bbb;
  207. cursor: pointer;
  208. -webkit-transform: rotate(-45deg);
  209. -moz-transform: rotate(45deg);
  210. -o-transform: rotate(45deg);
  211. }
  212. .search-magnifier--flyout {
  213. font-size: 25px;
  214. line-height: 54px;
  215. position: absolute;
  216. z-index: 1;
  217. left: 12px;
  218. }
  219. /* Flyout Menu */
  220. .flyout-menu {
  221. position: absolute;
  222. right: -250px;
  223. display: block; /* remove display: none; of non-mobile version */
  224. overflow-x: hidden;
  225. width: 250px;
  226. height: 100%;
  227. margin: 0; /* reset margin for themes that define it */
  228. padding: 0; /* reset padding for themes that define it */
  229. color: white;
  230. background-color: #3e5b76;
  231. }
  232. /* avoid zoom on search input focus for ios devices */
  233. .flyout-menu input[type='text'] {
  234. font-size: 16px;
  235. }
  236. .flyout-menu h3 {
  237. font-size: 11px;
  238. line-height: 19px;
  239. height: 20px;
  240. margin: 0;
  241. padding: 0;
  242. letter-spacing: .1em;
  243. text-transform: uppercase;
  244. color: white;
  245. border-top: 1px solid #506a83;
  246. border-bottom: 1px solid #506a83;
  247. background-color: #628db6;
  248. }
  249. .flyout-menu h4 {
  250. color: white;
  251. }
  252. .flyout-menu h3,
  253. .flyout-menu h4,
  254. .flyout-menu > p,
  255. .flyout-menu > a,
  256. .flyout-menu ul li a,
  257. .flyout-menu__search,
  258. .flyout-menu__sidebar > div,
  259. .flyout-menu__sidebar > p,
  260. .flyout-menu__sidebar > a,
  261. .flyout-menu__sidebar > form,
  262. .flyout-menu > div,
  263. .flyout-menu > form {
  264. padding-left: 8px;
  265. }
  266. .flyout-menu .flyout-menu__avatar {
  267. margin-top: -1px; /* move avatar up 1px */
  268. padding-left: 0;
  269. }
  270. .flyout-menu__sidebar > form {
  271. display: block;
  272. }
  273. .flyout-menu__sidebar > form h3 {
  274. margin-left: -8px;
  275. }
  276. .flyout-menu__sidebar > form label {
  277. display: inline-block;
  278. margin: 8px 0;
  279. }
  280. .flyout-menu__sidebar > form br br {
  281. display: none;
  282. }
  283. /* Targets list containing checkboxes (e.g. activities sidebar) in flyout menu */
  284. .flyout-menu__sidebar form > ul {
  285. margin-left: -8px;
  286. padding-left: 0;
  287. }
  288. .flyout-menu__sidebar form > ul li {
  289. line-height: 39px;
  290. display: block;
  291. padding-left: 8px;
  292. border-top: 1px solid rgba(255,255,255,.1);
  293. }
  294. .flyout-menu__sidebar form > ul li:first-child {
  295. border-top: none;
  296. }
  297. .flyout-menu__sidebar form > ul li label {
  298. margin: 0;
  299. }
  300. .flyout-menu__sidebar form > ul li label a {
  301. line-height: 1;
  302. display: inline;
  303. padding-left: 0;
  304. border: none;
  305. }
  306. .flyout-menu ul {
  307. margin: 0;
  308. padding: 0;
  309. list-style: none;
  310. }
  311. .flyout-menu #watchers {
  312. display: -webkit-flex;
  313. display: -ms-flexbox;
  314. display: -webkit-box;
  315. display: flex;
  316. flex-direction: column;
  317. -webkit-flex-direction: column;
  318. -ms-flex-direction: column;
  319. -webkit-box-orient: vertical;
  320. -webkit-box-direction: normal;
  321. }
  322. .flyout-menu #watchers .contextual {
  323. -webkit-box-ordinal-group: 4;
  324. -webkit-order: 3;
  325. -ms-flex-order: 3;
  326. order: 3;
  327. }
  328. .flyout-menu #watchers h3 {
  329. margin-left: -8px;
  330. }
  331. .flyout-menu #watchers ul li {
  332. display: -webkit-flex;
  333. display: -ms-flexbox;
  334. display: -webkit-box;
  335. display: flex;
  336. flex-direction: row;
  337. -webkit-flex-direction: row;
  338. -ms-flex-direction: row;
  339. -webkit-box-orient: horizontal;
  340. -webkit-box-direction: normal;
  341. -webkit-align-items: center;
  342. -ms-flex-align: center;
  343. -webkit-box-align: center;
  344. align-items: center;
  345. }
  346. .flyout-menu ul li a {
  347. line-height: 40px;
  348. display: block;
  349. overflow: hidden;
  350. height: 40px;
  351. white-space: nowrap;
  352. text-overflow: ellipsis;
  353. border-top: 1px solid rgba(255,255,255,.1);
  354. }
  355. .flyout-menu ul li:first-child a {
  356. line-height: 39px;
  357. height: 39px;
  358. border-top: none;
  359. }
  360. .flyout-menu a {
  361. color: white;
  362. }
  363. .flyout-menu ul li a:hover {
  364. text-decoration: none;
  365. }
  366. .flyout-menu ul li a.new-object,
  367. .new-object ~ .menu-children {
  368. display: none;
  369. }
  370. /* Left flyout search container */
  371. .flyout-menu__search {
  372. line-height: 54px;
  373. height: 64px;
  374. padding-top: 3px;
  375. padding-right: 8px;
  376. }
  377. .flyout-menu__search input[type='text'] {
  378. line-height: 2;
  379. width: 100%;
  380. height: 38px;
  381. padding-left: 27px;
  382. vertical-align: middle;
  383. border: none;
  384. -webkit-border-radius: 3px;
  385. border-radius: 3px;
  386. background-color: #fff;
  387. }
  388. .flyout-menu__avatar {
  389. display: -webkit-box;
  390. display: -webkit-flex;
  391. display: -ms-flexbox;
  392. display: flex;
  393. width: 100%;
  394. border-top: 1px solid rgba(255,255,255,.1);
  395. }
  396. .flyout-menu__avatar img.gravatar {
  397. width: 40px;
  398. height: 40px;
  399. padding: 0;
  400. vertical-align: top;
  401. border-width: 0;
  402. }
  403. .flyout-menu__avatar a {
  404. line-height: 40px;
  405. height: auto;
  406. height: 40px;
  407. text-decoration: none;
  408. color: white;
  409. }
  410. /* avatar */
  411. .flyout-menu__avatar a:first-child {
  412. line-height: 0;
  413. width: 40px;
  414. padding: 0;
  415. }
  416. .flyout-menu__avatar .user {
  417. padding-left: 15px;
  418. }
  419. /* user link when no avatar is present */
  420. .flyout-menu__avatar--no-avatar a.user {
  421. line-height: 40px;
  422. padding-left: 8px;
  423. }
  424. .flyout-is-active body {
  425. overflow: hidden; /* for body not to have scrollbars when left flyout menu is active */
  426. }
  427. html.flyout-is-active {
  428. overflow: hidden;
  429. }
  430. .flyout-is-active #wrapper {
  431. right: 250px; /* when left flyout is active, move body to the right (same amount like flyout-menu's width) */
  432. overflow: visible;
  433. height: 100%;
  434. }
  435. .flyout-is-active .mobile-toggle-button:after {
  436. content: '\00D7'; /* close glyph */
  437. }
  438. .flyout-is-active #wrapper2 {
  439. /*
  440. * only relevant for devices with cursor when flyout it active, in order to show,
  441. * that whole wrapper content is clickable and closes flyout menu
  442. */
  443. cursor: pointer;
  444. }
  445. #admin-menu {
  446. padding-left: 0;
  447. }
  448. #admin-menu li {
  449. padding-bottom: 0;
  450. }
  451. #admin-menu a,
  452. #admin-menu a.selected {
  453. line-height: 40px;
  454. padding: 0;
  455. padding-left: 32px !important;
  456. background-position: 8px 50%;
  457. }
  458. /*----------------------------------------*\
  459. E) UX ELEMENTS
  460. \*----------------------------------------*/
  461. .mobile-hide {display:none;}
  462. .mobile-show {display:initial;}
  463. /* Contextual Buttons */
  464. #content>.contextual {
  465. width: 100%;
  466. margin-bottom: .5em;
  467. padding-left: 0; /* reset left padding in order to use whole space */
  468. white-space: normal;
  469. color: transparent;
  470. }
  471. #content>.contextual a,
  472. p.buttons a {
  473. font-weight: bold;
  474. display: inline-block;
  475. margin: 5px 0;
  476. margin-right: 2px;
  477. padding: 9px 9px 9px 9px;
  478. border: 1px solid #ddd;
  479. -webkit-border-radius: 3px;
  480. border-radius: 3px;
  481. background-color: transparent;
  482. background-position-x: 4px;
  483. }
  484. #content>.contextual a.icon,
  485. p.buttons a.icon {
  486. padding-left: 25px;
  487. }
  488. .flyout-menu .contextual {
  489. float: none;
  490. }
  491. /* loading indicator */
  492. #ajax-indicator {
  493. width: 60%;
  494. left: 20%;
  495. }
  496. /* jquery ui dialogs */
  497. .ui-dialog {
  498. max-width: 98%;
  499. margin: 1%;
  500. }
  501. .ui-dialog .ui-dialog-content {
  502. padding-left: 0;
  503. padding-right: 0;
  504. }
  505. #filters-table {width:100%; float:none;}
  506. .add-filter {width:100%; float:none; text-align: left; margin-top: 8px;}
  507. /*----------------------------------------*\
  508. F) PAGE SPECIFIC STYLES
  509. \*----------------------------------------*/
  510. /* page /login */
  511. #login-form table {
  512. width: 100%;
  513. }
  514. #login-form input#username,
  515. #login-form input#password,
  516. #login-form input#openid_url {
  517. width: 100%;
  518. height: auto;
  519. }
  520. /* some themes add a margin to login page, remove it on mobile */
  521. .action-login #main {
  522. margin: 0;
  523. }
  524. div#activity dl, #search-results {margin-left: 0;}
  525. .version-overview table.progress {width:75%;}
  526. div#version-summary {float:none; width:100%; margin-left:0;}
  527. body.controller-versions.action-show div#roadmap .related-issues {width:100%;}
  528. /*----------------------------------------*\
  529. G) FORMS
  530. \*----------------------------------------*/
  531. /* tabular forms resets for mobile */
  532. .tabular p, .tabular.settings p {
  533. padding-left: 0;
  534. }
  535. .tabular label, .tabular.settings label {
  536. display: block;
  537. width: 100%;
  538. margin-left: 0;
  539. text-align: left;
  540. }
  541. .tabular input, .tabular select, .tabular textarea {
  542. width: 100%;
  543. max-width: 100%;
  544. }
  545. .tabular input[type="checkbox"], .tabular input.date {
  546. width: auto;
  547. max-width: 95%;
  548. }
  549. /* new issue form */
  550. #all_attributes p:first-child {
  551. float: none !important;
  552. }
  553. #issue_is_private_label {
  554. display: inline;
  555. }
  556. span#watchers_inputs {
  557. width: 100%;
  558. }
  559. }
  560. @media all and (max-width: 599px) {
  561. .pagination ul.pages li {display:none;}
  562. .pagination ul.pages li.current,
  563. .pagination ul.pages li.previous,
  564. .pagination ul.pages li.next {display:inline-block; width:32%; overflow:hidden;}
  565. }