mobile.less 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. /**
  2. * This file provides styles for mobile devices
  3. * and smaller screens (up to 480px and 768px width).
  4. *
  5. * @author Anika Henke <anika@selfthinker.org>
  6. */
  7. /* for detecting media queries in JavaScript (see script.js): */
  8. #screen__mode {
  9. position: relative;
  10. z-index: 0;
  11. }
  12. /* for screen widths in the tablet range
  13. ********************************************************************/
  14. @media only screen and (max-width: @ini_tablet_width) {
  15. #screen__mode {
  16. z-index: 1; /* for detecting media queries in JavaScript (see script.js) */
  17. }
  18. /* structure */
  19. #dokuwiki__aside {
  20. width: 100%;
  21. float: none;
  22. margin-bottom: 1.5em;
  23. }
  24. #dokuwiki__aside > .pad,
  25. [dir=rtl] #dokuwiki__aside > .pad {
  26. margin: 0 0 .5em;
  27. /* style like .page */
  28. background: @ini_background;
  29. color: inherit;
  30. border: 1px solid #eee;
  31. box-shadow: 0 0 .5em @ini_text_alt;
  32. border-radius: 2px;
  33. padding: 1em;
  34. margin-bottom: .5em;
  35. }
  36. #dokuwiki__aside h3.toggle {
  37. font-size: 1em;
  38. &.closed {
  39. margin-bottom: 0;
  40. padding-bottom: 0;
  41. }
  42. &.open {
  43. border-bottom: 1px solid @ini_border;
  44. }
  45. }
  46. .showSidebar #dokuwiki__content {
  47. float: none;
  48. margin-left: 0;
  49. width: 100%;
  50. > .pad {
  51. margin-left: 0;
  52. }
  53. }
  54. [dir=rtl] .showSidebar #dokuwiki__content,
  55. [dir=rtl] .showSidebar #dokuwiki__content > .pad {
  56. margin-right: 0;
  57. }
  58. /* preview */
  59. .dokuwiki.hasSidebar div.preview {
  60. border-right: none;
  61. }
  62. [dir=rtl] .dokuwiki.hasSidebar div.preview {
  63. border-left: none;
  64. }
  65. /* toc */
  66. #dw__toc {
  67. float: none;
  68. margin: 0 0 1em 0;
  69. width: auto;
  70. border-left-width: 0;
  71. border-bottom: 1px solid @ini_border;
  72. }
  73. [dir=rtl] #dw__toc {
  74. float: none;
  75. margin: 0 0 1em 0;
  76. border-right-width: 0;
  77. }
  78. .dokuwiki h3.toggle {
  79. padding: 0 .5em .5em 0;
  80. }
  81. #dw__toc > div,
  82. #dokuwiki__aside div.content {
  83. padding: .2em 0 .5em;
  84. }
  85. /* page */
  86. .dokuwiki div.page {
  87. padding: 1em;
  88. }
  89. /* enable horizontal scrolling in media manager */
  90. .mode_media div.page {
  91. overflow: auto;
  92. }
  93. /* push pagetools closer to content */
  94. #dokuwiki__pagetools {
  95. top: 0;
  96. }
  97. .showSidebar #dokuwiki__pagetools {
  98. top: 3.5em;
  99. }
  100. /* _edit */
  101. .dokuwiki div.section_highlight {
  102. margin: 0 -1em;
  103. padding: 0 .5em;
  104. border-width: 0 .5em;
  105. }
  106. .dokuwiki div.preview {
  107. margin: 0 -1em;
  108. padding: 1em;
  109. }
  110. /* _recent */
  111. .dokuwiki form.changes ul {
  112. padding-left: 0;
  113. }
  114. [dir=rtl] .dokuwiki form.changes ul {
  115. padding-right: 0;
  116. }
  117. } /* /@media */
  118. /* for screen widths in the smartphone range
  119. ********************************************************************/
  120. @media only screen and (max-width: @ini_phone_width) {
  121. #screen__mode {
  122. z-index: 2; /* for detecting media queries in JavaScript (see script.js) */
  123. }
  124. body {
  125. font-size: 100%;
  126. }
  127. /*____________ structure ____________*/
  128. #dokuwiki__site {
  129. max-width: 100%;
  130. > .site {
  131. padding: 0 .5em;
  132. }
  133. }
  134. #dokuwiki__aside {
  135. margin-bottom: 0;
  136. }
  137. #dokuwiki__header {
  138. padding: .5em 0;
  139. }
  140. /*____________ header ____________*/
  141. #dokuwiki__header ul.a11y.skip {
  142. position: static !important;
  143. left: 0 !important;
  144. width: auto !important;
  145. height: auto !important;
  146. float: right;
  147. font-size: 0.875em;
  148. list-style: none;
  149. padding-left: 0;
  150. margin: 0;
  151. li {
  152. margin-left: .35em;
  153. display: inline;
  154. }
  155. }
  156. [dir=rtl] #dokuwiki__header ul.a11y.skip {
  157. left: auto !important;
  158. right: 0 !important;
  159. float: left;
  160. padding-right: 0;
  161. li {
  162. margin: 0 .35em 0 0;
  163. }
  164. }
  165. #dokuwiki__header .headings,
  166. #dokuwiki__header .tools {
  167. float: none;
  168. text-align: left;
  169. width: auto;
  170. margin-bottom: .5em;
  171. }
  172. [dir=rtl] #dokuwiki__header .headings,
  173. [dir=rtl] #dokuwiki__header .tools {
  174. float: none;
  175. text-align: right;
  176. width: auto;
  177. }
  178. #dokuwiki__sitetools {
  179. text-align: left;
  180. }
  181. [dir=rtl] #dokuwiki__sitetools {
  182. text-align: right;
  183. }
  184. #dokuwiki__usertools,
  185. #dokuwiki__sitetools ul,
  186. #dokuwiki__sitetools h3,
  187. #dokuwiki__pagetools,
  188. .dokuwiki div.breadcrumbs, /* @todo: maybe move breadcrumbs to the bottom? */
  189. .dokuwiki .pageId {
  190. display: none;
  191. }
  192. /* search form */
  193. #dokuwiki__sitetools form.search {
  194. float: left;
  195. margin: 0 .2em .2em 0;
  196. width: 49%;
  197. }
  198. [dir=rtl] #dokuwiki__sitetools form.search {
  199. float: right;
  200. margin: 0 0 .2em .2em;
  201. }
  202. #dokuwiki__sitetools form.search input {
  203. width: 100% !important;
  204. }
  205. .dokuwiki form.search div.ajax_qsearch {
  206. display: none !important;
  207. }
  208. /* action dropdown is alternative for all hidden tools */
  209. #dokuwiki__header .mobileTools {
  210. display: block;
  211. font-size: 0.875em;
  212. margin: 0 0 .2em 0;
  213. float: right;
  214. width: 49%;
  215. }
  216. [dir=rtl] #dokuwiki__header .mobileTools {
  217. float: left;
  218. }
  219. #dokuwiki__header .mobileTools select {
  220. padding: .3em .1em;
  221. width: 100% !important;
  222. }
  223. /* force same height on search input and tools select */
  224. #dokuwiki__sitetools form.search input,
  225. #dokuwiki__header .mobileTools select {
  226. height: 2.1em;
  227. line-height: 2.1em;
  228. overflow: visible;
  229. }
  230. /*____________ content ____________*/
  231. #dokuwiki__aside > .pad,
  232. .dokuwiki div.page {
  233. padding: .5em;
  234. }
  235. /* form elements */
  236. #config__manager fieldset td.value,
  237. #config__manager td .input,
  238. .dokuwiki fieldset,
  239. .dokuwiki input.edit,
  240. .dokuwiki textarea {
  241. width: auto !important;
  242. max-width: 100% !important;
  243. }
  244. .dokuwiki select {
  245. max-width: 100% !important;
  246. }
  247. #config__manager fieldset {
  248. margin-left: 0;
  249. margin-right: 0;
  250. }
  251. .dokuwiki label.block {
  252. text-align: left;
  253. span {
  254. display: block;
  255. }
  256. }
  257. [dir=rtl] .dokuwiki label.block {
  258. text-align: right;
  259. }
  260. /* _edit */
  261. .dokuwiki div.section_highlight {
  262. margin: 0;
  263. padding: 0;
  264. border-width: 0;
  265. }
  266. .dokuwiki div.preview {
  267. margin: 0 -.5em;
  268. padding: .5em;
  269. }
  270. } /* /@media */
  271. /* for screen heights smaller than the pagetools permit
  272. ********************************************************************/
  273. @media only screen and (max-height: 400px) {
  274. // 400px is only roughly the required value, this may be wrong under non-standard circumstances
  275. #dokuwiki__pagetools div.tools {
  276. position: static;
  277. }
  278. } /* /@media */