_wiki.scss 5.0 KB

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