_layout.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. input::-ms-clear,
  2. input::-ms-reveal {
  3. display: none !important;
  4. }
  5. body {
  6. height: auto;
  7. overflow-x: hidden;
  8. background-color: $body-background-color;
  9. &.nav-open {
  10. overflow: hidden;
  11. nav,
  12. header > form {
  13. display: block;
  14. }
  15. header {
  16. bottom: 0;
  17. }
  18. }
  19. &::before {
  20. content: "";
  21. background-color: $content-background-color;
  22. position: fixed;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. left: 0;
  27. z-index: -1;
  28. }
  29. @media (min-width: $mobile-break) {
  30. padding: 0 0 0 $nav-width;
  31. &.nav-open {
  32. overflow: auto;
  33. }
  34. &::after,
  35. &::before {
  36. content: "";
  37. position: fixed;
  38. top: 0;
  39. bottom: 0;
  40. z-index: -1;
  41. }
  42. &::after {
  43. left: 0;
  44. width: $nav-width;
  45. background-color: $nav-background-color;
  46. }
  47. #search-input,
  48. &::after {
  49. box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
  50. }
  51. &::before {
  52. left: $nav-width;
  53. right: 0;
  54. background-color: $content-background-color;
  55. }
  56. }
  57. }
  58. .main {
  59. margin-top: $space + $nav-header-height;
  60. @media (min-width: $mobile-break) {
  61. margin-top: 0;
  62. }
  63. }
  64. header {
  65. $emblem-size: 35px;
  66. $emblem-vertical-padding: ($nav-header-height - $emblem-size) / 2;
  67. $emblem-horizontal-padding: $space;
  68. position: absolute;
  69. top: 0;
  70. left: 0;
  71. right: 0;
  72. overflow-x: hidden;
  73. z-index: 1;
  74. background-color: $nav-background-color;
  75. ul {
  76. padding: 0;
  77. margin: 0;
  78. }
  79. h1 {
  80. padding: $emblem-vertical-padding $emblem-horizontal-padding;
  81. height: $nav-header-height;
  82. box-sizing: border-box;
  83. background-color: $brand-colour;
  84. color: #fff;
  85. margin: 0;
  86. font-size: 1.7rem;
  87. line-height: 0.8;
  88. letter-spacing: 0;
  89. font-weight: 600;
  90. text-indent: 0;
  91. @include display-flex();
  92. @include flex-direction(row);
  93. @include align-items(center);
  94. border-bottom: 1px solid rgba(0, 0, 0, 0.075);
  95. img {
  96. height: $emblem-size;
  97. width: $emblem-size;
  98. margin-right: $space - 5;
  99. }
  100. }
  101. .open-nav {
  102. background-image: url(/images/menu.svg);
  103. background-color: transparent;
  104. background-repeat: no-repeat;
  105. background-size: 100%;
  106. width: $emblem-size;
  107. height: $emblem-size;
  108. border: 0;
  109. position: absolute;
  110. top: $emblem-vertical-padding;
  111. right: $emblem-horizontal-padding;
  112. border-radius: 2px;
  113. &:focus {
  114. outline: none;
  115. background-color: rgba(0, 0, 0, 0.05);
  116. }
  117. &:hover {
  118. background-color: rgba(0, 0, 0, 0.1);
  119. }
  120. }
  121. @media (min-width: $mobile-break) {
  122. background-color: transparent;
  123. width: $nav-width;
  124. right: auto;
  125. bottom: auto;
  126. .open-nav {
  127. display: none;
  128. }
  129. h1 {
  130. box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
  131. }
  132. }
  133. }
  134. .content {
  135. position: relative;
  136. background-color: $content-background-color;
  137. color: $content-color;
  138. h3::before {
  139. content: "";
  140. @extend hr;
  141. margin: 60px 0;
  142. }
  143. }
  144. .content,
  145. .page-header {
  146. max-width: $content-max-width;
  147. padding: 0 ($space + 5) $space;
  148. margin: $space auto 0 auto;
  149. }
  150. .page-header {
  151. h2,
  152. h3 {
  153. margin: 0;
  154. line-height: 1.2;
  155. letter-spacing: -1px;
  156. }
  157. h2 {
  158. font-size: 2rem;
  159. margin-left: -1px;
  160. color: #888;
  161. letter-spacing: 0;
  162. }
  163. h3 {
  164. font-size: 4rem;
  165. margin-left: -4px;
  166. }
  167. @media (min-width: $mobile-break) {
  168. h2 {
  169. font-size: 2.65rem;
  170. }
  171. h3 {
  172. font-size: 5.4rem;
  173. }
  174. }
  175. @media (min-width: $full-width-break) {
  176. margin-top: 55px;
  177. }
  178. }
  179. nav,
  180. header > form {
  181. display: none;
  182. @media (min-width: $mobile-break) {
  183. display: block;
  184. }
  185. }
  186. nav > ul {
  187. padding: $space / 2 0;
  188. & + ul {
  189. border-top: 1px solid rgba(0, 0, 0, 0.075);
  190. }
  191. }
  192. .nav-item {
  193. display: block;
  194. font-family: "Open Sans", sans-serif;
  195. line-height: 1;
  196. margin: 0;
  197. nav:not(.full-navigation) & > ul {
  198. display: none;
  199. }
  200. nav:not(.full-navigation) &.current > ul {
  201. display: block;
  202. }
  203. > a {
  204. color: #666;
  205. text-decoration: none;
  206. font-size: 1.4rem;
  207. padding: $space / 2 0 $space / 2 $space * 2;
  208. display: block;
  209. }
  210. &.current > a,
  211. > a:active,
  212. > a:hover {
  213. color: #111;
  214. }
  215. &.top-level > a {
  216. line-height: 1.5;
  217. font-weight: 600;
  218. padding-left: $space;
  219. }
  220. }
  221. .settings-panel-example {
  222. @extend p;
  223. @include display-flex();
  224. @include flex-direction(column);
  225. .example {
  226. max-width: 300px;
  227. background-color: #fafafa;
  228. margin: 0;
  229. padding: 0;
  230. font-size: 0;
  231. line-height: 1;
  232. border-radius: 2px;
  233. overflow: hidden;
  234. }
  235. @media (min-width: 960px) {
  236. @include flex-direction(row);
  237. .details {
  238. @include flex(1);
  239. margin-right: 20px;
  240. }
  241. p + .highlight > pre {
  242. margin-bottom: 0;
  243. }
  244. .example {
  245. @include flex(0 0 300px);
  246. max-width: 100%;
  247. }
  248. }
  249. }
  250. .highlight {
  251. margin-left: 0;
  252. margin-right: 0;
  253. }
  254. h3 + .warning {
  255. margin-top: 1.75em;
  256. }
  257. h4 code {
  258. background: $nav-background-color;
  259. color: $content-color;
  260. background-color: transparent;
  261. font-weight: 700;
  262. padding: 0;
  263. font-size: 1.1em;
  264. line-height: 1;
  265. }
  266. h4 svg {
  267. vertical-align: middle;
  268. margin-right: 6px;
  269. position: relative;
  270. top: -2px;
  271. fill: #2E2E2E;
  272. height: 23px;
  273. }
  274. .required {
  275. position: relative;
  276. }
  277. .required::after {
  278. content: "REQUIRED";
  279. font-size: 12px;
  280. position: absolute;
  281. top: 5px;
  282. line-height: 1;
  283. color: $brand-colour;
  284. padding-left: 5px;
  285. }
  286. #search-results {
  287. margin: 0;
  288. padding: 0;
  289. li {
  290. list-style: none;
  291. margin: 0;
  292. padding: 0;
  293. h4 {
  294. font-size: 2rem;
  295. }
  296. p {
  297. line-height: 1.5;
  298. }
  299. }
  300. }
  301. #search-input {
  302. -webkit-appearance: none;
  303. display: block;
  304. margin: 0;
  305. padding: 10px 20px 10px 15px;
  306. width: 100%;
  307. box-sizing: border-box;
  308. border: 0;
  309. border-bottom: 1px solid rgba(0, 0, 0, 0.075);
  310. border-left: 5px solid transparent;
  311. font-size: 1.5rem;
  312. font-weight: 600;
  313. line-height: 1.8;
  314. &:focus {
  315. outline: none;
  316. border-left-color: $brand-colour;
  317. }
  318. }
  319. .changelog {
  320. &,
  321. > div {
  322. margin: 0;
  323. padding: 0;
  324. list-style: none;
  325. }
  326. .date {
  327. color: #888;
  328. font-style: italic;
  329. }
  330. }
  331. .badge {
  332. font-family: "Open Sans", sans-serif;
  333. padding: 2px 5px;
  334. text-transform: uppercase;
  335. font-size: 0.8rem;
  336. border-radius: 2px;
  337. background: #eee;
  338. font-weight: bold;
  339. &.major {
  340. background: $brand-colour;
  341. color: #fff;
  342. }
  343. }
  344. blockquote {
  345. border-left: 5px solid #FD0;
  346. padding: 10px 15px;
  347. margin-left: -15px;
  348. margin-right: -10px;
  349. background-color: $brand-colour-light;
  350. border-color: $brand-colour;
  351. p:last-child {
  352. margin-bottom: 0;
  353. }
  354. @media (max-width: $full-width-break) {
  355. margin-left: 0;
  356. margin-right: 0;
  357. }
  358. }
  359. img {
  360. max-width: 100%;
  361. height: auto;
  362. }
  363. .editor-link {
  364. display: none;
  365. margin-top: 0;
  366. .btn {
  367. border: 0;
  368. border-radius: 2px;
  369. width: 100%;
  370. max-width: 500px;
  371. box-sizing: border-box;
  372. font-size: 2rem;
  373. text-decoration: none;
  374. padding: 10px 15px;
  375. margin: 0;
  376. font-size: 18px;
  377. cursor: pointer;
  378. background-color: #f7e064;
  379. color: #333;
  380. box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.2);
  381. &:hover {
  382. background-color: #f4d525;
  383. color: #333;
  384. }
  385. }
  386. }
  387. .cms-editor-active .editor-link {
  388. display: block;
  389. }