_wiki.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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.1em;
  130. margin: 1px;
  131. border: none;
  132. box-shadow: none;
  133. vertical-align: middle;
  134. display: inline;
  135. }
  136. ul, ol {
  137. padding-left: 30px;
  138. margin: 20px 0;
  139. li {
  140. margin: 5px 0;
  141. line-height: 1.8em;
  142. }
  143. ul, ol {
  144. margin: 0;
  145. }
  146. }
  147. /* ensure to disable in crowi-plus
  148. .wiki-code {
  149. position: relative;
  150. cite {
  151. position: absolute;
  152. top: 0;
  153. right: 0;
  154. padding: 0 4px;
  155. background: #ccc;
  156. color: #333;
  157. font-size: .8em;
  158. }
  159. };
  160. */
  161. p code { // only inline code blocks
  162. font-family: $font-family-monospace-not-strictly;
  163. }
  164. .page-template-builder {
  165. position: relative;
  166. .template-create-button {
  167. position: absolute;
  168. top: 8px;
  169. right: 8px;
  170. }
  171. }
  172. .highlighted {
  173. &em {
  174. padding: 2px;
  175. margin: 0 -2px;
  176. font-weight: bold;
  177. }
  178. font-style: normal;
  179. color: #333;
  180. background-color: rgba(255,255,140,0.5);
  181. border-radius: 3px;
  182. }
  183. // {{{ table (copied from bootstrap .table
  184. table {
  185. width: 100%;
  186. margin-bottom: $line-height-computed;
  187. // Cells
  188. > thead,
  189. > tbody,
  190. > tfoot {
  191. > tr {
  192. > th,
  193. > td {
  194. padding: $table-cell-padding;
  195. line-height: $line-height-base;
  196. vertical-align: top;
  197. border-top: 1px solid $table-border-color;
  198. }
  199. }
  200. }
  201. // Bottom align for column headings
  202. > thead > tr > th {
  203. vertical-align: bottom;
  204. border-bottom: 2px solid $table-border-color;
  205. }
  206. // Remove top border from thead by default
  207. > caption + thead,
  208. > colgroup + thead,
  209. > thead:first-child {
  210. > tr:first-child {
  211. > th,
  212. > td {
  213. border-top: 0;
  214. }
  215. }
  216. }
  217. // Account for multiple tbody instances
  218. > tbody + tbody {
  219. border-top: 2px solid $table-border-color;
  220. }
  221. // Nesting
  222. table {
  223. background-color: $body-bg;
  224. }
  225. // .table-bordered
  226. border: 1px solid $table-border-color;
  227. > thead,
  228. > tbody,
  229. > tfoot {
  230. > tr {
  231. > th,
  232. > td {
  233. border: 1px solid $table-border-color;
  234. }
  235. }
  236. }
  237. > thead > tr {
  238. > th,
  239. > td {
  240. border-bottom-width: 2px;
  241. }
  242. }
  243. }
  244. // }}}
  245. }
  246. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { // {{{ tablet size
  247. .crowi.main-container .main .wiki {
  248. }
  249. } // }}}
  250. @media (max-width: $screen-xs-max) { // {{{ iPhone size
  251. .crowi.main-container .main .wiki {
  252. }
  253. } // }}}
  254. @media (max-width: $screen-sm-max) { // {{{ tablet and iphone size
  255. .crowi.main-container .main .wiki {
  256. img {
  257. max-width: 100%;
  258. }
  259. }
  260. }