_docs.scss 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. .docs {
  2. $toc-width: 320px;
  3. display: flex;
  4. justify-content: center;
  5. width: 100%;
  6. height: 100%;
  7. margin: 0;
  8. padding: 0;
  9. font-family: "Raleway", Helvetica, Arial, sans-serif;
  10. font-size: 18px;
  11. line-height: 1.6;
  12. @media (max-width: 991px) {
  13. font-size: 16px;
  14. }
  15. p {
  16. margin-bottom: .8em;
  17. img {
  18. max-width: 100%;
  19. }
  20. }
  21. pre {
  22. margin: 15px 0;
  23. word-wrap: normal;
  24. code {
  25. overflow: auto;
  26. white-space: pre;
  27. }
  28. }
  29. .row {
  30. margin: 0px;
  31. }
  32. /*
  33. * Used to style the platform logos in xml references. Uses the mark element
  34. * because we hijack the markdown highlight syntax using js (e.g. ==android==).
  35. * See www/static/js/docs.js
  36. */
  37. mark {
  38. display: inline-block;
  39. height:30px;
  40. background-color: #ffffff;
  41. }
  42. mark.logo {
  43. background-image:url('{{ site.baseurl }}/static/img/platform-logos-all-sprite.svg');
  44. width:35px;
  45. background-size: 385px 35px;
  46. }
  47. mark.android { background-position: 0 }
  48. mark.ios { background-position: 10%; }
  49. mark.windows { background-position: 20%; }
  50. mark.blackberry { background-position: 30%; }
  51. mark.ubuntu { background-position: 40%; }
  52. mark.firefox { background-position: 50%; }
  53. mark.webos { background-position: 60%; }
  54. mark.fireos { background-position: 70%; }
  55. mark.osx { background-position: 80.8%; }
  56. mark.browser { background-position: 92.2%; }
  57. .sub-header {
  58. color: #6d6d6d;
  59. font-size: 9pt;
  60. display: block;
  61. min-width: 120px;
  62. font-weight: 300;
  63. }
  64. .site-toc-title {
  65. font-weight: 300;
  66. font-size: 22px;
  67. text-transform: uppercase;
  68. }
  69. /* outer ToC for the site */
  70. .site-toc-container {
  71. position: fixed;
  72. top: 50px;
  73. left: 0;
  74. height: calc(100% - 50px);
  75. width: $toc-width;
  76. overflow-y: scroll;
  77. overflow-x: hidden;
  78. background: $gray-85;
  79. .site-toc {
  80. padding: 10px 15px;
  81. li {
  82. list-style: none;
  83. }
  84. > li {
  85. font-size: 16px;
  86. padding-top: 0.05em;
  87. line-height: 30px;
  88. a {
  89. color: white;
  90. display: block;
  91. padding: 0 50%;
  92. margin: 0 -50%;
  93. &.this-page {
  94. font-weight: bold;
  95. background-color: $brand-primary-darker;
  96. }
  97. }
  98. }
  99. .toc-section-heading {
  100. font-size: 18px;
  101. font-weight: 600;
  102. text-transform: uppercase;
  103. margin: 0.3em 0em 0.3em 0em;
  104. display: block;
  105. color: $brand-primary;
  106. }
  107. /* NOTE: this is not a mistake; .site-toc gets nested inside itself */
  108. .site-toc {
  109. padding: 0 0 0 10px;
  110. .toc-section-heading {
  111. font-size: 16px;
  112. font-weight: 600;
  113. text-transform: none;
  114. }
  115. }
  116. }
  117. // Only the top level table of contents
  118. > .site-toc {
  119. > li {
  120. margin-bottom: 1rem;
  121. }
  122. }
  123. }
  124. .page-content-container {
  125. margin-left: $toc-width;
  126. width: calc(100% - #{$toc-width});
  127. @media (max-width: 991px) {
  128. margin-left: 0;
  129. width: 100%;
  130. }
  131. .page-content {
  132. width: 960px;
  133. max-width: 100%;
  134. margin: 0 auto 50px;
  135. padding: 0 50px;
  136. @media (max-width: 991px) {
  137. padding: 0 15px;
  138. }
  139. .header-link {
  140. position: relative;
  141. left: 0.5em;
  142. opacity: 0;
  143. font-size: 0.7em;
  144. transition: opacity 0.2s ease-in-out 0.1s;
  145. }
  146. h1:hover .header-link,
  147. h2:hover .header-link,
  148. h3:hover .header-link,
  149. h4:hover .header-link,
  150. h5:hover .header-link,
  151. h6:hover .header-link {
  152. opacity: 1;
  153. }
  154. h1, h2, h3, h4, h5, h6 {
  155. color: #2C7185;
  156. }
  157. h1 {
  158. font-size: 42px;
  159. font-weight: 300;
  160. }
  161. h2 {
  162. color: #D60C3F;
  163. font-size: 30px;
  164. font-weight: 300;
  165. }
  166. h3 {
  167. font-size: 22px;
  168. }
  169. h3, h4, h5, h6 {
  170. font-weight: 600;
  171. }
  172. h4 {
  173. margin-top: 20px;
  174. }
  175. h5 {
  176. margin-top: 16px;
  177. }
  178. }
  179. }
  180. /* inner ToC for the page */
  181. .page-toc ul {
  182. padding: 0px;
  183. }
  184. .page-toc ul > li {
  185. padding: 0.05em 0em 0.05em 1em;
  186. font-size: 14px;
  187. font-weight: 300;
  188. }
  189. .page-toc ul > li.toc-active {
  190. font-weight: bold;
  191. }
  192. /* Quick fix to remove redundant TOC entries */
  193. .page-toc li:first-of-type {
  194. display: none;
  195. }
  196. /* header above page content */
  197. .content-header {
  198. text-align: right;
  199. margin-top: 22px;
  200. /* this trick sets spacing _between_ items in .content-header, but _not inside_ them */
  201. word-spacing: 0.3em;
  202. * {
  203. word-spacing: 0em;
  204. }
  205. .alert {
  206. text-align: left;
  207. }
  208. .dropdown, .edit {
  209. margin-top: 0.3em;
  210. margin-bottom: 0.3em;
  211. display: inline-block;
  212. }
  213. .edit {
  214. line-height: 32px;
  215. }
  216. .dropdown.toc-dropdown {
  217. text-align: center;
  218. width: 100%;
  219. button {
  220. width: 100%;
  221. }
  222. }
  223. .dropdown {
  224. .dropdown-menu {
  225. left: inherit;
  226. right: 0;
  227. }
  228. .selected {
  229. font-weight: bold;
  230. font-style: italic;
  231. }
  232. button.dropdown-toggle {
  233. border-radius: 4px;
  234. background-color: rgb(214, 214, 214);
  235. &:hover {
  236. background-color: rgb(191, 191, 191);
  237. }
  238. }
  239. }
  240. }
  241. .alert.alert-warning.alert-dismissible {
  242. margin-top: 15px;
  243. }
  244. /* missing page highlight */
  245. .missing-page {
  246. color: gray !important;
  247. }
  248. table {
  249. @extend .table;
  250. @extend .table-bordered;
  251. margin: 20px 0;
  252. }
  253. .docs-alert {
  254. margin-top: 22px;
  255. }
  256. /* Formatting for compatibility table on plugin docs page */
  257. .compat {
  258. td {
  259. text-align: center;
  260. border-width: 2px;
  261. border-style: solid;
  262. border-color: white;
  263. padding:2px;
  264. }
  265. th {
  266. text-align: center;
  267. }
  268. /* Not compataible (pink with X) */
  269. .n::before {
  270. margin-right: 5px;
  271. content: "\2718";
  272. }
  273. .n {
  274. background-color: pink;
  275. margin-right: 5px;
  276. }
  277. /* Is compataible (green with check) */
  278. .y::before {
  279. margin-right: 5px;
  280. content: "\2714";
  281. }
  282. .y {
  283. background-color: lightgreen;
  284. }
  285. /* Partially compataible */
  286. .p {
  287. background-color: khaki;
  288. }
  289. }
  290. .hooks {
  291. td[data-col="description"] {
  292. text-align: left;
  293. vertical-align: middle;
  294. }
  295. td[rowspan="2"], th[colspan="3"], td[data-col="code"] {
  296. text-align: center;
  297. vertical-align: middle;
  298. }
  299. td[data-col="description"] {
  300. text-align: left;
  301. vertical-align: middle;
  302. }
  303. }
  304. /* Styling for the /docs/language/version/index.html pages */
  305. .home {
  306. h1 {
  307. border-bottom: 1px solid #919395;
  308. font-size: 37px !important;
  309. }
  310. h2 {
  311. padding: 0px;
  312. display: block;
  313. font-size: 27px !important;
  314. }
  315. .summary {
  316. font-size: 14px;
  317. height: 60px;
  318. display: inline-block;
  319. }
  320. ul {
  321. margin: 0px;
  322. padding: 0px;
  323. }
  324. ul li {
  325. display: inline-block;
  326. vertical-align: top;
  327. list-style: none;
  328. margin: 0px 15px;
  329. width: 250px;
  330. }
  331. }
  332. /* Styling for old /docs/language/version/index.html pages */
  333. #old-home {
  334. h1 {
  335. border-bottom: 1px solid #919395;
  336. padding-bottom: 20px;
  337. margin: 30px 0px;
  338. }
  339. h2 {
  340. font-weight: normal;
  341. margin: 0px 0px 10px 0px;
  342. padding: 0px;
  343. display: block;
  344. font-size: 18px;
  345. color: #266172;
  346. }
  347. h2:after {
  348. content: '';
  349. }
  350. span {
  351. font-size: 14px;
  352. }
  353. ul {
  354. float: left;
  355. margin: 0px;
  356. padding: 0px;
  357. }
  358. ul li {
  359. float: left;
  360. list-style: none;
  361. margin-bottom: 20px;
  362. padding: 0px 20px;
  363. width: 240px;
  364. height: 120px;
  365. }
  366. }
  367. footer {
  368. font-size: 14px;
  369. }
  370. }
  371. @media (max-width: $screen-sm-max) {
  372. .header-link {
  373. opacity: 1 !important;
  374. }
  375. }
  376. /* Workaround for the spacing on the Russian /docs/ru/version/index.html pages */
  377. html[lang="ru"] .docs .home .summary {
  378. height: 100px;
  379. }
  380. html[lang="ru"] .docs #old-home ul li {
  381. height: 160px;
  382. }