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 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  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 screen 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. -webkit-text-size-adjust: 100%; /* prevent font scaling in landscape mode on webkit */
  48. }
  49. body {
  50. min-width: 0; /* reset the min-width of 900px */
  51. -webkit-overflow-scrolling: touch;
  52. }
  53. body,
  54. input,
  55. select,
  56. textarea,
  57. button {
  58. font-size: 14px; /* Set font-size for standard elements to 14px */
  59. }
  60. select {
  61. max-width: 100%; /* prevent long names within select menues from breaking content */
  62. }
  63. #wrapper {
  64. position: relative;
  65. overflow-x: hidden; /* hide horizontal overflow */
  66. max-width: 100%;
  67. }
  68. #wrapper,
  69. #wrapper2 {
  70. margin: 0;
  71. }
  72. /*----------------------------------------*\
  73. B) HEADER & TOP MENUS
  74. \*----------------------------------------*/
  75. #header {
  76. width: 100%;
  77. height: 64px; /* the height of our header on mobile */
  78. min-height: 0;
  79. margin: 0;
  80. padding: 0;
  81. border: none;
  82. background-color: #628db6;
  83. position: fixed;
  84. z-index: 9999;
  85. }
  86. /* Hide project name on mobile (project name is still visible in select menu) */
  87. #header h1 {
  88. display: none !important;
  89. }
  90. /* reset #header a color for mobile toggle button */
  91. #header a.mobile-toggle-button {
  92. color: #f8f8f8;
  93. }
  94. /* Hide top-menu and main-menu on mobile, because it's placed in our flyout menu */
  95. #top-menu,
  96. #header #main-menu {
  97. display: none;
  98. }
  99. /* the quick search within header holding search form and #project_quick_jump_box box*/
  100. #header #quick-search {
  101. float: none;
  102. clear: none; /* there are themes which set clear property, this resets it */
  103. max-width: 100%; /* reset max-width */
  104. margin: 0;
  105. background: inherit;
  106. }
  107. /* styles for combobox within quick-search (#project_quick_jump_box) */
  108. #project-jump.drdn {
  109. position: absolute;
  110. top: 0px;
  111. left: 0;
  112. width: 100%;
  113. max-width: 100%;
  114. height: 2em;
  115. height: 64px;
  116. padding: 5px;
  117. padding-right: 72px;
  118. padding-left: 20px;
  119. }
  120. #project-jump .drdn-trigger {
  121. font-size:1.5em;
  122. font-weight:bold;
  123. display:block;
  124. width:100%;
  125. color:#fff;
  126. padding-left:24px;
  127. background:transparent;
  128. height:50px;
  129. line-height:40px;
  130. border:0;
  131. }
  132. #project-jump .drdn-trigger:before {
  133. /* set a font-size in order to achive same result in different themes */
  134. font-family: Verdana, sans-serif;
  135. font-size: 1.5em;
  136. position: absolute;
  137. left: 0;
  138. padding: 0 8px;
  139. /* achieve dropdwon arrow by scaling a caret character */
  140. content: '^';
  141. -webkit-transform: scale(1,-.8);
  142. -ms-transform: scale(1,-.8);
  143. transform: scale(1,-.8);
  144. text-align: right;
  145. pointer-events: none;
  146. opacity: .6;
  147. }
  148. #project-jump.expanded .drdn-trigger:before {
  149. -webkit-transform: scale(1,.8);
  150. -ms-transform: scale(1,.8);
  151. transform: scale(1,.8);
  152. padding-top:8px;
  153. }
  154. #project-jump .drdn-content {
  155. position:absolute;
  156. left:0px;
  157. top:64px;
  158. width:100%;
  159. font-size:15px;
  160. font-weight:normal;
  161. }
  162. #project-jump .drdn-content .autocomplete {
  163. height:40px;
  164. font-size:20px;
  165. }
  166. #project-jump .drdn-content a {
  167. padding:8px;
  168. }
  169. #header #quick-search form {
  170. display: none;
  171. }
  172. /*----------------------------------------*\
  173. C) MAIN CONTENT & SIDEBAR
  174. \*----------------------------------------*/
  175. #main {
  176. padding: 64px 0 0; /* padding-top equals header height */
  177. }
  178. #main.nosidebar #content,
  179. div#content {
  180. width: 100%;
  181. min-height: 0; /* reset min-height of #content */
  182. margin: 0;
  183. }
  184. /* hide sidebar and sidebar switch panel, since it's placed in mobile flyout menu */
  185. #sidebar,
  186. #sidebar-switch-panel {
  187. display: none;
  188. }
  189. .splitcontentleft, .splitcontentright, .splitcontenttop {
  190. width: 100%;
  191. flex: auto;
  192. margin-right: 0;
  193. margin-left: 0;
  194. }
  195. /*----------------------------------------*\
  196. D) TOGGLE BUTTON & FLYOUT MENU
  197. \*----------------------------------------*/
  198. .mobile-toggle-button {
  199. font-size: 42px;
  200. line-height: 64px;
  201. position: relative;
  202. z-index: 10;
  203. display: block; /* remove display: none; of non-mobile version */
  204. float: right;
  205. width: 60px;
  206. height: 64px;
  207. margin-top: 0;
  208. text-align: center;
  209. border-left: 1px solid #ddd;
  210. }
  211. .mobile-toggle-button:hover,
  212. .mobile-toggle-button:active {
  213. text-decoration: none;
  214. }
  215. .mobile-toggle-button:after {
  216. font-family: Verdana, sans-serif;
  217. display: block;
  218. margin-top: -3px;
  219. content: '\2261';
  220. }
  221. /* search magnifier icon */
  222. .search-magnifier {
  223. font-family: Verdana, sans-serif;
  224. color: #bbb;
  225. cursor: pointer;
  226. -webkit-transform: rotate(-45deg);
  227. -moz-transform: rotate(45deg);
  228. -o-transform: rotate(45deg);
  229. }
  230. .search-magnifier--flyout {
  231. font-size: 25px;
  232. line-height: 54px;
  233. position: absolute;
  234. z-index: 1;
  235. left: 12px;
  236. }
  237. /* Flyout Menu */
  238. .flyout-menu {
  239. position: absolute;
  240. right: -250px;
  241. display: block; /* remove display: none; of non-mobile version */
  242. overflow-x: hidden;
  243. width: 250px;
  244. height: 100%;
  245. margin: 0; /* reset margin for themes that define it */
  246. padding: 0; /* reset padding for themes that define it */
  247. color: white;
  248. background-color: #3e5b76;
  249. }
  250. /* avoid zoom on search input focus for ios devices */
  251. .flyout-menu input[type='text'] {
  252. font-size: 16px;
  253. }
  254. .flyout-menu h3 {
  255. font-size: 11px;
  256. line-height: 19px;
  257. height: 20px;
  258. margin: 0;
  259. padding: 0;
  260. letter-spacing: .1em;
  261. text-transform: uppercase;
  262. color: white;
  263. border-top: 1px solid #506a83;
  264. border-bottom: 1px solid #506a83;
  265. background-color: #628db6;
  266. }
  267. .flyout-menu h4 {
  268. color: white;
  269. }
  270. .flyout-menu h3,
  271. .flyout-menu h4,
  272. .flyout-menu > p,
  273. .flyout-menu > a,
  274. .flyout-menu ul li a,
  275. .flyout-menu__search,
  276. .flyout-menu__sidebar > div,
  277. .flyout-menu__sidebar > p,
  278. .flyout-menu__sidebar > a,
  279. .flyout-menu__sidebar > form,
  280. .flyout-menu > div,
  281. .flyout-menu > form {
  282. padding-left: 8px;
  283. }
  284. .flyout-menu .flyout-menu__avatar {
  285. margin-top: -1px; /* move avatar up 1px */
  286. padding-left: 0;
  287. }
  288. .flyout-menu__sidebar > form {
  289. display: block;
  290. }
  291. .flyout-menu__sidebar > form h3 {
  292. margin-left: -8px;
  293. }
  294. .flyout-menu__sidebar > form label {
  295. display: inline-block;
  296. margin: 8px 0;
  297. }
  298. .flyout-menu__sidebar > form br br {
  299. display: none;
  300. }
  301. /* Targets list containing checkboxes (e.g. activities sidebar) in flyout menu */
  302. .flyout-menu__sidebar form > ul {
  303. margin-left: -8px;
  304. padding-left: 0;
  305. }
  306. .flyout-menu__sidebar form > ul li {
  307. line-height: 39px;
  308. display: block;
  309. padding-left: 8px;
  310. border-top: 1px solid rgba(255,255,255,.1);
  311. }
  312. .flyout-menu__sidebar form > ul li:first-child {
  313. border-top: none;
  314. }
  315. .flyout-menu__sidebar form > ul li label {
  316. margin: 0;
  317. }
  318. .flyout-menu__sidebar form > ul li label a {
  319. line-height: 1;
  320. display: inline;
  321. padding-left: 0;
  322. border: none;
  323. }
  324. .flyout-menu ul {
  325. margin: 0;
  326. padding: 0;
  327. list-style: none;
  328. }
  329. .flyout-menu #watchers {
  330. display: -webkit-flex;
  331. display: -ms-flexbox;
  332. display: -webkit-box;
  333. display: flex;
  334. flex-direction: column;
  335. -webkit-flex-direction: column;
  336. -ms-flex-direction: column;
  337. -webkit-box-orient: vertical;
  338. -webkit-box-direction: normal;
  339. }
  340. .flyout-menu #watchers .contextual {
  341. -webkit-box-ordinal-group: 4;
  342. -webkit-order: 3;
  343. -ms-flex-order: 3;
  344. order: 3;
  345. }
  346. .flyout-menu #watchers h3 {
  347. margin-left: -8px;
  348. }
  349. .flyout-menu #watchers ul li {
  350. display: -webkit-flex;
  351. display: -ms-flexbox;
  352. display: -webkit-box;
  353. display: flex;
  354. flex-direction: row;
  355. -webkit-flex-direction: row;
  356. -ms-flex-direction: row;
  357. -webkit-box-orient: horizontal;
  358. -webkit-box-direction: normal;
  359. -webkit-align-items: center;
  360. -ms-flex-align: center;
  361. -webkit-box-align: center;
  362. align-items: center;
  363. }
  364. .flyout-menu ul li a {
  365. line-height: 40px;
  366. display: block;
  367. overflow: hidden;
  368. height: 40px;
  369. white-space: nowrap;
  370. text-overflow: ellipsis;
  371. border-top: 1px solid rgba(255,255,255,.1);
  372. }
  373. .flyout-menu ul li:first-child a {
  374. line-height: 39px;
  375. height: 39px;
  376. border-top: none;
  377. }
  378. .flyout-menu a {
  379. color: white;
  380. }
  381. .flyout-menu ul li a:hover {
  382. text-decoration: none;
  383. }
  384. .flyout-menu ul li a.new-object,
  385. .new-object ~ .menu-children {
  386. display: none;
  387. }
  388. /* Left flyout search container */
  389. .flyout-menu__search {
  390. line-height: 54px;
  391. height: 64px;
  392. padding-top: 3px;
  393. padding-right: 8px;
  394. }
  395. .flyout-menu__search input[type='text'] {
  396. line-height: 2;
  397. width: 100%;
  398. height: 38px;
  399. padding-left: 27px;
  400. vertical-align: middle;
  401. border: none;
  402. -webkit-border-radius: 3px;
  403. border-radius: 3px;
  404. background-color: #fff;
  405. }
  406. .flyout-menu__avatar {
  407. display: -webkit-box;
  408. display: -webkit-flex;
  409. display: -ms-flexbox;
  410. display: flex;
  411. width: 100%;
  412. border-top: 1px solid rgba(255,255,255,.1);
  413. }
  414. .flyout-menu__avatar img.gravatar {
  415. width: 40px;
  416. height: 40px;
  417. padding: 0;
  418. vertical-align: top;
  419. border-width: 0;
  420. }
  421. .flyout-menu__avatar a {
  422. line-height: 40px;
  423. height: auto;
  424. height: 40px;
  425. text-decoration: none;
  426. color: white;
  427. }
  428. /* avatar */
  429. .flyout-menu__avatar a:first-child {
  430. line-height: 0;
  431. width: 40px;
  432. padding: 0;
  433. }
  434. .flyout-menu__avatar .user {
  435. padding-left: 15px;
  436. padding-right: 15px;
  437. text-overflow: ellipsis;
  438. overflow: hidden;
  439. white-space: nowrap;
  440. -webkit-flex-grow: 1;
  441. -ms-flex-grow: 1;
  442. flex-grow: 1;
  443. }
  444. /* user link when no avatar is present */
  445. .flyout-menu__avatar--no-avatar a.user {
  446. line-height: 40px;
  447. padding-left: 8px;
  448. }
  449. .flyout-is-active body {
  450. overflow: hidden; /* for body not to have scrollbars when left flyout menu is active */
  451. }
  452. html.flyout-is-active {
  453. overflow: hidden;
  454. }
  455. .flyout-is-active #wrapper, .flyout-is-active #header {
  456. right: 250px; /* when left flyout is active, move body and header to the right (same amount like flyout-menu's width) */
  457. }
  458. .flyout-is-active #wrapper {
  459. overflow: visible;
  460. height: 100%;
  461. }
  462. .flyout-is-active .mobile-toggle-button:after {
  463. content: '\00D7'; /* close glyph */
  464. }
  465. .flyout-is-active #wrapper2 {
  466. /*
  467. * only relevant for devices with cursor when flyout it active, in order to show,
  468. * that whole wrapper content is clickable and closes flyout menu
  469. */
  470. cursor: pointer;
  471. }
  472. #admin-menu {
  473. padding-left: 0;
  474. }
  475. #admin-menu li {
  476. padding-bottom: 0;
  477. }
  478. #admin-menu a,
  479. #admin-menu a.selected {
  480. line-height: 40px;
  481. padding: 0;
  482. padding-left: 32px !important;
  483. background-position: 8px 50%;
  484. }
  485. /*----------------------------------------*\
  486. E) UX ELEMENTS
  487. \*----------------------------------------*/
  488. .mobile-hide {display:none;}
  489. .mobile-show {display:initial;}
  490. /* Contextual Buttons */
  491. #content>.contextual {
  492. width: 100%;
  493. margin-bottom: .5em;
  494. padding-left: 0; /* reset left padding in order to use whole space */
  495. white-space: normal;
  496. }
  497. #content>.contextual>a,
  498. #content>.contextual .drdn,
  499. p.buttons a {
  500. font-weight: bold;
  501. display: inline-block;
  502. margin: 5px 0;
  503. margin-right: 2px;
  504. padding: 9px 9px 9px 9px;
  505. border: 1px solid #ddd;
  506. -webkit-border-radius: 3px;
  507. border-radius: 3px;
  508. }
  509. #content>.contextual .drdn-content {
  510. right:initial;
  511. left:0px;
  512. top:40px;
  513. }
  514. #content>.contextual .drdn .drdn-content a {
  515. padding-top: 9px;
  516. padding-bottom: 9px;
  517. }
  518. #content>.contextual a.icon,
  519. p.buttons a.icon {
  520. background-position-x: 4px;
  521. padding-left: 25px;
  522. }
  523. .flyout-menu .contextual {
  524. float: none;
  525. }
  526. /* loading indicator */
  527. #ajax-indicator {
  528. width: 60%;
  529. left: 20%;
  530. }
  531. /* jquery ui dialogs */
  532. .ui-dialog {
  533. max-width: 98%;
  534. margin: 1%;
  535. }
  536. .ui-dialog .ui-dialog-content {
  537. padding-left: 0;
  538. padding-right: 0;
  539. }
  540. #filters-table {width:100%; float:none;}
  541. .add-filter {width:100%; float:none; text-align: left; margin-top: 8px;}
  542. /*----------------------------------------*\
  543. F) PAGE SPECIFIC STYLES
  544. \*----------------------------------------*/
  545. /* page /login */
  546. #login-form table {
  547. width: 100%;
  548. }
  549. #login-form input#username,
  550. #login-form input#password,
  551. #login-form input#openid_url {
  552. width: 100%;
  553. height: auto;
  554. }
  555. /* some themes add a margin to login page, remove it on mobile */
  556. .action-login #main {
  557. margin: 0;
  558. }
  559. div#activity dl, #search-results {margin-left: 0;}
  560. .version-overview table.progress {width:75%;}
  561. div#version-summary {float:none; width:100%; margin-left:0;}
  562. body.controller-versions.action-show div#roadmap .related-issues {width:100%;}
  563. /* History and Changeset */
  564. div#issue-changesets {
  565. float: none;
  566. width: auto;
  567. margin-left: 0;
  568. padding-left: 0;
  569. margin-bottom: 2em;
  570. }
  571. div#issue-changesets div.changeset {
  572. padding-top: 1em;
  573. }
  574. /* Gantt charts */
  575. /*
  576. * [1] override inline styles with important
  577. * [2] keep border between subjects and gantt area
  578. * [3] remove whitespace between subjects and gantt area
  579. * [4] maintain width due to [3]
  580. */
  581. .gantt_subjects_column {
  582. width: 60% !important; /* [1] */
  583. }
  584. .gantt_subjects_container {
  585. width: 100% !important;
  586. overflow: hidden;
  587. }
  588. .gantt_subjects_column .gantt_hdr {
  589. width: 100% !important;
  590. right: 0 !important; /* [2] */
  591. border-right: solid 1px #c0c0c0;
  592. }
  593. #gantt_area {
  594. left: -2px; /* [3] */
  595. margin-right: -2px; /* [4] */
  596. }
  597. /*----------------------------------------*\
  598. G) FORMS
  599. \*----------------------------------------*/
  600. input, select, textarea {
  601. max-width: 100%;
  602. }
  603. /* tabular forms resets for mobile */
  604. .tabular p, .tabular.settings p {
  605. padding-left: 0;
  606. }
  607. .tabular label, .tabular.settings label {
  608. display: block;
  609. width: 100%;
  610. margin-left: 0;
  611. text-align: left;
  612. }
  613. .tabular input, .tabular select, .tabular textarea {
  614. width: 100%;
  615. max-width: 100%;
  616. }
  617. .tabular input[type="checkbox"], .tabular input.date {
  618. width: auto;
  619. max-width: 95%;
  620. }
  621. /* new issue form */
  622. #all_attributes p:first-child {
  623. float: none !important;
  624. }
  625. #all_attributes #issue_tracker_id {
  626. width: 90%;
  627. }
  628. #issue_is_private_label {
  629. display: inline;
  630. }
  631. span#watchers_inputs {
  632. width: 100%;
  633. }
  634. /* issue edit form */
  635. label[for='issue_description'] ~ a .icon-edit {
  636. word-wrap: normal;
  637. }
  638. /* issues page */
  639. body.controller-issues p.query-totals {
  640. margin-top: 0px;
  641. text-align: left;
  642. }
  643. /* subtasks and related issues list on issue show */
  644. #issue_tree .issues, #relations .issues {
  645. border-collapse: separate;
  646. border-spacing: 0 1em; /* vertical space between tasks */
  647. }
  648. #issue_tree .issue > td:not(.checkbox), #relations .issue > td:not(.checkbox) {
  649. display: block;
  650. float: left;
  651. text-align: left;
  652. padding-right: 5px;
  653. }
  654. #issue_tree .issue > td, #relations .issue > td, #issue_tree .issue .user {
  655. text-overflow: ellipsis; /* if text exceeds its space, add ... */
  656. overflow: hidden;
  657. }
  658. #issue_tree .issue > td.subject, #relations .issue > td.subject {
  659. width: 100%; /* let subject have one full width column */
  660. word-break: break-word; /* break word if subject is too long */
  661. padding-right: 25px; /* this is the spaces that .buttons uses next to subject */
  662. }
  663. #issue_tree .issue > td:not(.subject), #relations .issue > td:not(.subject) {
  664. width: 20%; /* three columns for all cells that are not subject */
  665. }
  666. #issue_tree .issues, #issue_tree .issue,
  667. #relations .issues, #relations .issue {
  668. position: relative; /* needed for .buttons positioning */
  669. }
  670. /* positioniong of unline button */
  671. #issue_tree .issue > td.buttons,
  672. #relations .issue > td.buttons {
  673. text-align: right;
  674. position: absolute;
  675. right: 0;
  676. margin: 0;
  677. padding-right: 0;
  678. }
  679. #issue_tree .issue .buttons a,
  680. #relations .issue .buttons a {
  681. vertical-align: middle;
  682. }
  683. /* attachment upload form */
  684. .attachments_fields span {
  685. position: relative;
  686. clear: both;
  687. margin-bottom: 1em;
  688. white-space: normal;
  689. }
  690. .attachments_fields span a.remove-upload {
  691. position: absolute;
  692. top: 0;
  693. right: 0;
  694. }
  695. .attachments_fields input.description {
  696. margin-left: 0;
  697. width: 100%;
  698. }
  699. }
  700. @media all and (max-width: 599px) {
  701. span.pagination {text-align:center;}
  702. .pagination ul.pages li {display:none;}
  703. .pagination ul.pages li.current,
  704. .pagination ul.pages li.previous,
  705. .pagination ul.pages li.next {display:inline-block; width:32%; overflow:hidden;}
  706. #login-form {width:100%; margin-top:2em;}
  707. }