_wiki.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. div.body {
  2. padding: 10px;
  3. }
  4. .revision-toc {
  5. float: right;
  6. font-size: .9em;
  7. border: solid 1px #aaa;
  8. border-radius: 5px;
  9. max-width: 250px;
  10. overflow: hidden;
  11. .revision-toc-head {
  12. display: inline-block;
  13. float: right;
  14. border-left: solid 1px #aaa;
  15. border-bottom: solid 1px #aaa;
  16. border-radius: 0 5px;
  17. padding: 3px 11px;
  18. font-weight: bold;
  19. background: #f0f0f0;
  20. margin-left: 5px;
  21. margin-bottom: 5px;
  22. &.collapsed {
  23. border: none;
  24. margin: 0;
  25. }
  26. }
  27. .revision-toc-content {
  28. background: #fcfcfc;
  29. padding: 10px;
  30. > ul {
  31. margin: 4px 4px 4px 15px;
  32. padding: 5px;
  33. }
  34. }
  35. }
  36. .revision-head {
  37. .revision-head-link {
  38. display: none;
  39. font-size: 0.6em;
  40. padding-top: 4px;
  41. padding-left: 10px;
  42. }
  43. &:hover .revision-head-link {
  44. display: inline-block;
  45. }
  46. }
  47. .wiki {
  48. line-height: 1.8em;
  49. font-size: 15px;
  50. h1, h2, h3, h4, h5, h6 {
  51. margin-top: 1.6em;
  52. margin-bottom: .8em;
  53. &:first-child {
  54. margin-top: 0;
  55. }
  56. }
  57. h1 {
  58. margin-top: 2em;
  59. padding-bottom: 0.3em;
  60. font-size: 1.8em;
  61. border-bottom: solid 1px #ccc;
  62. }
  63. h2 {
  64. padding-bottom: 0.5em;
  65. font-size: 1.4em;
  66. line-height: 1.225;
  67. font-weight: bold;
  68. border-bottom: 1px solid #eee;
  69. }
  70. h3 {
  71. font-size: 1.2em;
  72. font-weight: bold;
  73. }
  74. h4 {
  75. font-size: 1.1em;
  76. font-weight: normal;
  77. }
  78. h5 {
  79. font-size: 1.05em;
  80. font-weight: normal;
  81. }
  82. p {
  83. font-weight: normal;
  84. margin: 15px 0;
  85. }
  86. blockquote {
  87. font-size: .9em;
  88. margin: 0 0 30px 0;
  89. padding: 0 20px;
  90. color: darken(gray, 10%);
  91. }
  92. a {
  93. text-decoration: underline;
  94. color: #38ad9e;
  95. &:hover {
  96. text-decoration: none;
  97. color: darken(#38ad9e, 10%);
  98. }
  99. }
  100. /* ensure to disable in crowi-plus
  101. pre {
  102. line-height: 1.4em;
  103. font-size: .9em;
  104. border: none;
  105. background: #444;
  106. color: #f0f0f0;
  107. font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  108. word-wrap: break-word;
  109. }
  110. */
  111. pre {
  112. border: none;
  113. }
  114. img {
  115. margin: 5px 0;
  116. box-shadow: 0 0 5px 0px rgba(0,0,0,.2);
  117. border: solid 1px #ccc;
  118. max-width: 100%;
  119. }
  120. img.emoji {
  121. width: 0.95em;
  122. margin: 1px;
  123. border: none;
  124. box-shadow: none;
  125. vertical-align: middle;
  126. display: inline;
  127. }
  128. ul, ol {
  129. padding-left: 30px;
  130. margin: 20px 0;
  131. li {
  132. margin: 5px 0;
  133. line-height: 1.8em;
  134. }
  135. ul, ol {
  136. margin: 0;
  137. }
  138. }
  139. /* ensure to disable in crowi-plus
  140. .wiki-code {
  141. position: relative;
  142. cite {
  143. position: absolute;
  144. top: 0;
  145. right: 0;
  146. padding: 0 4px;
  147. background: #ccc;
  148. color: #333;
  149. font-size: .8em;
  150. }
  151. };
  152. */
  153. .page-template-builder {
  154. position: relative;
  155. .template-create-button {
  156. position: absolute;
  157. top: 8px;
  158. right: 8px;
  159. }
  160. }
  161. .highlighted {
  162. &em {
  163. padding: 2px;
  164. margin: 0 -2px;
  165. font-weight: bold;
  166. }
  167. font-style: normal;
  168. color: #333;
  169. background-color: rgba(255,255,140,0.5);
  170. border-radius: 3px;
  171. }
  172. // {{{ table (copied from bootstrap .table
  173. table {
  174. width: 100%;
  175. margin-bottom: $line-height-computed;
  176. // Cells
  177. > thead,
  178. > tbody,
  179. > tfoot {
  180. > tr {
  181. > th,
  182. > td {
  183. padding: $table-cell-padding;
  184. line-height: $line-height-base;
  185. vertical-align: top;
  186. border-top: 1px solid $table-border-color;
  187. }
  188. }
  189. }
  190. // Bottom align for column headings
  191. > thead > tr > th {
  192. vertical-align: bottom;
  193. border-bottom: 2px solid $table-border-color;
  194. }
  195. // Remove top border from thead by default
  196. > caption + thead,
  197. > colgroup + thead,
  198. > thead:first-child {
  199. > tr:first-child {
  200. > th,
  201. > td {
  202. border-top: 0;
  203. }
  204. }
  205. }
  206. // Account for multiple tbody instances
  207. > tbody + tbody {
  208. border-top: 2px solid $table-border-color;
  209. }
  210. // Nesting
  211. table {
  212. background-color: $body-bg;
  213. }
  214. // .table-bordered
  215. border: 1px solid $table-border-color;
  216. > thead,
  217. > tbody,
  218. > tfoot {
  219. > tr {
  220. > th,
  221. > td {
  222. border: 1px solid $table-border-color;
  223. }
  224. }
  225. }
  226. > thead > tr {
  227. > th,
  228. > td {
  229. border-bottom-width: 2px;
  230. }
  231. }
  232. }
  233. // }}}
  234. }
  235. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  236. .crowi.main-container .main .wiki {
  237. }
  238. } // }}}
  239. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  240. .crowi.main-container .main .wiki {
  241. }
  242. } // }}}
  243. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  244. .crowi.main-container .main .wiki {
  245. img {
  246. max-width: 100%;
  247. }
  248. }
  249. }