_documentation.scss 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. $added-color: #5ecb0e;
  2. $deprecated-color: #ff9a4d;
  3. $sidebar-width: 22%;
  4. $beer-height: 70px;
  5. .documentation-body {
  6. background: $grey;
  7. display: flex;
  8. .main {
  9. padding: 0 60px;
  10. height: 100vh;
  11. width: 100% - $sidebar-width;
  12. overflow: auto;
  13. }
  14. .main-demos {
  15. padding: 0;
  16. overflow: hidden;
  17. iframe {
  18. width: 100%;
  19. height: 100vh;
  20. background: $grey;
  21. }
  22. }
  23. .main-demo-inner {
  24. width: 100%;
  25. }
  26. .section-title {
  27. padding: 50px 0 0;
  28. }
  29. h3 {
  30. display: inline-block;
  31. font-weight: bold;
  32. font-size: 26px;
  33. }
  34. h4 {
  35. padding: 20px 0 0;
  36. }
  37. p,
  38. dd {
  39. code {
  40. color: #616870;
  41. background: #dfe5eb;
  42. padding: 0 5px;
  43. border: 1px solid #d0d9e1;
  44. border-radius: 2px;
  45. }
  46. }
  47. code.type {
  48. padding: 0 3px;
  49. color: $primary-color-dark;
  50. &::before {
  51. content: "<";
  52. }
  53. &::after {
  54. content: ">";
  55. }
  56. }
  57. .button.button-demo {
  58. border-color: rgba($secondary-color, 0.6);
  59. color: $secondary-color;
  60. width: auto;
  61. padding: 10px 30px;
  62. &:hover,
  63. &:focus {
  64. text-decoration: none;
  65. border-color: $secondary-color;
  66. background: $secondary-color;
  67. color: $white;
  68. }
  69. }
  70. ::-webkit-scrollbar {
  71. width: 17px;
  72. }
  73. ::-webkit-scrollbar-track {
  74. background: $grey;
  75. }
  76. ::-webkit-scrollbar-thumb {
  77. background: #cfd7de;
  78. border: 2px solid $grey;
  79. &:hover {
  80. background: #616870;
  81. }
  82. }
  83. }
  84. .header-documentation {
  85. margin-top: 50px;
  86. .documentation-logo-link {
  87. display: block;
  88. margin: 0 auto;
  89. width: 80%;
  90. max-width: 350px;
  91. .documentation-logo {
  92. width: 100%;
  93. }
  94. }
  95. .documentation-title {
  96. text-align: center;
  97. font-family: $panton;
  98. font-weight: 100;
  99. line-height: 1;
  100. @media (max-width: 1290px) {
  101. font-size: 2.5vw;
  102. }
  103. }
  104. .documentation-menu {
  105. text-align: center;
  106. margin-top: 40px;
  107. background: $secondary-color;
  108. a {
  109. display: inline-block;
  110. padding: 20px 5px;
  111. &:hover,
  112. &:focus {
  113. text-decoration: underline;
  114. }
  115. }
  116. }
  117. }
  118. .sidebar {
  119. position: relative;
  120. top: 0;
  121. left: 0;
  122. height: 100vh;
  123. color: $white;
  124. background: $primary-color linear-gradient(to bottom left, $primary-color, $primary-color-light);
  125. width: $sidebar-width;
  126. ::-webkit-scrollbar-track {
  127. background: transparent;
  128. }
  129. ::-webkit-scrollbar-thumb {
  130. background: $primary-color-light;
  131. border: 1px solid $primary-color-light;
  132. border-right: none;
  133. &:hover {
  134. background: $white;
  135. }
  136. }
  137. &::after {
  138. content: "";
  139. display: block;
  140. position: absolute;
  141. left: 0;
  142. bottom: $beer-height;
  143. width: calc(100% - 17px);
  144. height: 100px;
  145. background: linear-gradient(to bottom, transparent, $primary-color-light);
  146. pointer-events: none;
  147. }
  148. .sidebar-inner {
  149. overflow: auto;
  150. overflow-y: scroll;
  151. overflow-x: hidden;
  152. height: calc(100vh - #{$beer-height});
  153. padding-bottom: 100px;
  154. }
  155. ul,
  156. li {
  157. padding: 0;
  158. margin: 0;
  159. list-style: none;
  160. }
  161. a {
  162. text-decoration: none;
  163. color: $white;
  164. transition: color $transition-duration, text-indent $transition-duration;
  165. }
  166. .documentation-summary {
  167. position: relative;
  168. font-size: 18px;
  169. > ul {
  170. max-width: 266px;
  171. margin: 0 auto;
  172. padding: 0 15px;
  173. a,
  174. .documentation-summary-title {
  175. display: block;
  176. height: 30px;
  177. line-height: 30px;
  178. text-overflow: ellipsis;
  179. width: 100%;
  180. white-space: nowrap;
  181. overflow: hidden;
  182. }
  183. > li {
  184. margin-top: 30px;
  185. &:first-child {
  186. margin-top: 50px;
  187. }
  188. > a,
  189. .documentation-summary-title {
  190. font-weight: 600;
  191. text-transform: uppercase;
  192. margin-bottom: 5px;
  193. }
  194. > a {
  195. &:hover,
  196. &:focus {
  197. color: $primary-color-dark;
  198. }
  199. }
  200. ul li a {
  201. &:hover,
  202. &:focus {
  203. color: $primary-color-dark;
  204. text-indent: 10px;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. .documentation-sidebar-beer {
  211. position: fixed;
  212. width: $sidebar-width;
  213. bottom: 0;
  214. left: 0;
  215. background: $white;
  216. height: $beer-height;
  217. a {
  218. position: relative;
  219. display: block;
  220. height: $beer-height;
  221. width: 100%;
  222. text-align: left;
  223. padding: 10px 17px 0 0;
  224. background: none;
  225. border: none;
  226. border-top: 1px solid #e9eef3;
  227. color: #9ca4ac;
  228. &:focus {
  229. outline: none;
  230. }
  231. .beer-icon {
  232. display: none;
  233. }
  234. @media (min-width: 1700px) {
  235. .beer-icon {
  236. position: absolute;
  237. display: block;
  238. width: calc((100% - 236px) / 2);
  239. height: 50px;
  240. margin: 0 auto;
  241. }
  242. }
  243. .beer-label {
  244. position: relative;
  245. display: block;
  246. max-width: 236px;
  247. margin: 0 auto;
  248. }
  249. @media (max-width: 1290px) {
  250. .beer-label {
  251. font-size: 14px;
  252. margin: 0;
  253. padding: 7px 0 0 15px;
  254. width: 200px;
  255. }
  256. }
  257. }
  258. }
  259. }
  260. .added-feature,
  261. .deprecated-feature {
  262. display: inline-block;
  263. padding: 3px 13px;
  264. margin: 0;
  265. color: $white;
  266. font-size: 14px;
  267. border-radius: 50px;
  268. transform: translateX(10px) translateY(-4px);
  269. }
  270. .added-feature {
  271. background: $added-color;
  272. }
  273. .deprecated-feature {
  274. background: $deprecated-color;
  275. }
  276. .deprecated-info {
  277. padding: 7px 15px;
  278. border-radius: 2px;
  279. background: #f2dfc1;
  280. border: 1px solid $deprecated-color;
  281. a {
  282. color: $deprecated-color;
  283. }
  284. }
  285. .version-tag {
  286. display: inline-block;
  287. padding: 2px 6px;
  288. background: $added-color;
  289. color: #FFF;
  290. font-size: 12px;
  291. font-style: normal;
  292. border-radius: 20px;
  293. }
  294. .note .version-tag {
  295. transform: translateY(-1px);
  296. }
  297. .feature {
  298. position: relative;
  299. padding-bottom: 60px;
  300. &::after {
  301. content: " ";
  302. display: block;
  303. position: absolute;
  304. bottom: 0;
  305. left: 50%;
  306. width: 40%;
  307. height: 0;
  308. border-bottom: 1px solid $primary-color-light;
  309. transform: translateX(-50%);
  310. }
  311. h3 {
  312. position: relative;
  313. padding-top: 50px;
  314. margin-left: -15px;
  315. padding-left: 15px;
  316. }
  317. h4 {
  318. position: relative;
  319. font-size: 20px;
  320. font-weight: bold;
  321. }
  322. .title-link {
  323. display: block;
  324. position: absolute;
  325. top: 53px;
  326. left: -45px;
  327. height: 30px;
  328. width: 30px;
  329. opacity: 0;
  330. text-align: center;
  331. text-decoration: none;
  332. background: $primary-color;
  333. border-radius: 50%;
  334. transition: opacity $transition-duration, background $transition-duration, color $transition-duration;
  335. &:hover,
  336. &:focus {
  337. background: $white;
  338. text-decoration: none;
  339. svg {
  340. fill: $primary-color;
  341. }
  342. }
  343. svg {
  344. fill: $white;
  345. width: 70%;
  346. height: 100%;
  347. }
  348. }
  349. &:hover {
  350. .title-link {
  351. opacity: 1;
  352. }
  353. }
  354. }
  355. dl {
  356. dt {
  357. display: inline-block;
  358. color: #616870;
  359. background: #dfe5eb;
  360. padding: 0 5px;
  361. border: 1px solid #d0d9e1;
  362. border-radius: 2px;
  363. }
  364. dd {
  365. padding: 5px 0 15px;
  366. margin-left: 15px;
  367. }
  368. }