Advertisement
Guest User

Untitled

a guest
Apr 17th, 2025
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.21 KB | None | 0 0
  1. /* -------------------------------------------------------- */
  2. /* VARIABLES */
  3. /* -------------------------------------------------------- */
  4.  
  5. /* Variables are used like this: var(--text-color) */
  6. :root {
  7. /* Background Colors: */
  8. --background-color: #9204ff;
  9. --content-background-color: #000000;
  10. --sidebar-background-color: #000000;
  11.  
  12. /* Text Colors: */
  13. --text-color: #ffffff;
  14. --sidebar-text-color: #ffffff;
  15. --link-color: #9204ff;
  16. --link-color-hover: #dab9ff;
  17.  
  18. /* Text: */
  19. --font: Comic Sans, Comic;
  20. --heading-font: Comic Sans, Comic;
  21. --font-size: 20px;
  22.  
  23. /* Other Settings: */
  24. --margin: 10px;
  25. --padding: 20px;
  26. --border: 2px solid #000000;
  27. --round-borders: 0px;
  28. --sidebar-width: 200px;
  29. }
  30.  
  31. /* -------------------------------------------------------- */
  32. /* BASICS */
  33. /* -------------------------------------------------------- */
  34.  
  35. * {
  36. box-sizing: border-box;
  37. }
  38.  
  39. body {
  40. display: flex;
  41. align-items: center;
  42. justify-content: center;
  43. min-height: 100vh;
  44. font-size: var(--font-size);
  45. margin: 0;
  46. padding: var(--margin);
  47. color: var(--text-color);
  48. font-family: var(--font);
  49. line-height: 1.2;
  50. background: var(--background-color);
  51. background-image: url("https://i.postimg.cc/d0xJX3Qh/495dcba9a75a82e8d4376e4809d07d4e.gif");
  52.  
  53. }
  54.  
  55. ::selection {
  56. /* (Text highlighted by the user) */
  57. background: rgba(0, 0, 0, 0.2);
  58. }
  59.  
  60. mark {
  61. /* Text highlighted by using the <mark> element */
  62. text-shadow: 1px 1px 4px var(--link-color);
  63. background-color: inherit;
  64. color: var(--text-color);
  65. }
  66.  
  67. /* Links: */
  68. a {
  69. text-decoration: underline;
  70. }
  71.  
  72. a,
  73. a:visited {
  74. color: var(--link-color);
  75. }
  76.  
  77. a:hover,
  78. a:focus {
  79. color: var(--link-color-hover);
  80. text-decoration: none;
  81. }
  82.  
  83. /* -------------------------------------------------------- */
  84. /* LAYOUT */
  85. /* -------------------------------------------------------- */
  86.  
  87. .layout {
  88. width: 150%;
  89. display: grid;
  90. grid-gap: var(--margin);
  91. grid-template: "header header header" auto "leftSidebar main rightSidebar" auto "footer footer footer" auto / var(--sidebar-width) auto var(--sidebar-width);
  92. /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
  93. }
  94.  
  95. main {
  96. grid-area: main;
  97. overflow-y: auto;
  98. padding: var(--padding);
  99. background: var(--content-background-color);
  100. border: var(--border);
  101. border-radius: var(--round-borders);
  102. }
  103.  
  104. /* -------------------------------------------------------- */
  105. /* HEADER */
  106. /* -------------------------------------------------------- */
  107.  
  108. header {
  109. grid-area: header;
  110. font-size: 1.2em;
  111. border: var(--border);
  112. border-radius: var(--round-borders);
  113. background: var(--content-background-color);
  114. }
  115.  
  116. .header-content {
  117. padding: var(--padding);
  118. }
  119.  
  120. .header-title {
  121. font-family: var(--heading-font);
  122. font-size: 1.5em;
  123. font-weight: bold;
  124. }
  125.  
  126. .header-image img {
  127. width: 100%;
  128. height: auto;
  129. }
  130.  
  131. /* -------------------------------------------------------- */
  132. /* SIDEBARS */
  133. /* -------------------------------------------------------- */
  134.  
  135. aside {
  136. grid-area: aside;
  137. border: var(--border);
  138. border-radius: var(--round-borders);
  139. overflow: hidden;
  140. background: var(--sidebar-background-color);
  141. padding: var(--padding);
  142. color: var(--sidebar-text-color);
  143. }
  144.  
  145. .left-sidebar {
  146. grid-area: leftSidebar;
  147. }
  148.  
  149. .right-sidebar {
  150. grid-area: rightSidebar;
  151. }
  152.  
  153. .sidebar-title {
  154. font-weight: bold;
  155. font-size: 1.2em;
  156. font-family: var(--heading-font);
  157. }
  158.  
  159. .sidebar-section:not(:last-child) {
  160. margin-bottom: 3em;
  161. }
  162.  
  163. .sidebar-section ul,
  164. .sidebar-section ol {
  165. padding-left: 1.5em;
  166. }
  167.  
  168. .sidebar-section > *:not(p):not(ul):not(ol):not(blockquote) {
  169. margin-top: 10px;
  170. }
  171.  
  172. /* Sidebar Blockquote: */
  173.  
  174. .sidebar-section blockquote {
  175. background: rgba(0, 0, 0, 0.1);
  176. padding: 15px;
  177. margin: 1em 0;
  178. border-radius: 10px;
  179. overflow: hidden;
  180. }
  181.  
  182. .sidebar-section blockquote > *:first-child {
  183. margin-top: 0;
  184. }
  185.  
  186. .sidebar-section blockquote > *:last-child {
  187. margin-bottom: 0;
  188. }
  189.  
  190. /* Site Button: */
  191.  
  192. .site-button {
  193. display: flex;
  194. flex-direction: column;
  195. align-items: center;
  196. }
  197.  
  198. .site-button textarea {
  199. font-family: monospace;
  200. font-size: 0.7em;
  201. }
  202.  
  203. /* -------------------------------------------------------- */
  204. /* FOOTER */
  205. /* -------------------------------------------------------- */
  206.  
  207. footer {
  208. grid-area: footer;
  209. border: var(--border);
  210. border-radius: var(--round-borders);
  211. overflow: hidden;
  212. font-size: 0.75em;
  213. padding: 15px;
  214. background: var(--content-background-color);
  215. display: flex;
  216. justify-content: center;
  217. }
  218.  
  219. footer a,
  220. footer a:visited {
  221. color: var(--link-color);
  222. }
  223.  
  224. footer a:hover,
  225. footer a:focus {
  226. color: var(--link-color-hover);
  227. }
  228.  
  229. /* -------------------------------------------------------- */
  230. /* NAVIGATION */
  231. /* -------------------------------------------------------- */
  232.  
  233. nav {
  234. margin-bottom: 3em;
  235. }
  236.  
  237. nav .sidebar-title {
  238. margin-bottom: 0.5em;
  239. }
  240.  
  241. nav ul {
  242. margin: 0 -5px;
  243. padding: 0;
  244. list-style: none;
  245. user-select: none;
  246. }
  247.  
  248. nav ul li {
  249. margin-bottom: 0;
  250. }
  251.  
  252. nav > ul li > a,
  253. nav > ul li > strong {
  254. display: inline-block;
  255. }
  256.  
  257. nav > ul li > a,
  258. nav > ul li > details summary,
  259. nav > ul li > strong {
  260. padding: 5px 10px;
  261. }
  262.  
  263. nav > ul li > a.active,
  264. nav > ul li > details.active summary {
  265. font-weight: bold;
  266. }
  267.  
  268. nav ul summary {
  269. cursor: pointer;
  270. }
  271.  
  272. nav ul ul li > a {
  273. padding-left: 30px;
  274. }
  275.  
  276. /* NAVIGATION IN HEADER */
  277.  
  278. header nav {
  279. margin-bottom: 0;
  280. }
  281.  
  282. header nav ul {
  283. display: flex;
  284. flex-wrap: wrap;
  285. margin: 0;
  286. }
  287.  
  288. header nav ul li {
  289. position: relative;
  290. }
  291.  
  292. header nav ul li:first-child > a {
  293. padding-left: 0;
  294. }
  295.  
  296. header nav ul li:last-child > a {
  297. padding-right: 0;
  298. }
  299.  
  300. /* Subnavigation (Drop-Down): */
  301.  
  302. header nav ul ul {
  303. background: var(--content-background-color);
  304. display: none;
  305. position: absolute;
  306. top: 100%;
  307. left: 10px;
  308. padding: 0.5em;
  309. z-index: 1;
  310. border: var(--border);
  311. min-width: 100%;
  312. box-shadow: 0px 1px 5px rgba(0,0,0,0.2);
  313. }
  314.  
  315. header nav ul li:hover ul,
  316. header nav ul li:focus-within ul {
  317. display: block;
  318. }
  319.  
  320. header nav ul li strong {
  321. color: var(--link-color);
  322. text-decoration: underline;
  323. font-weight: normal;
  324. }
  325.  
  326. header nav ul ul li a {
  327. display: block;
  328. padding-left: 0;
  329. padding-right: 0;
  330. }
  331.  
  332. /* -------------------------------------------------------- */
  333. /* CONTENT */
  334. /* -------------------------------------------------------- */
  335.  
  336. main {
  337. line-height: 1.5;
  338. }
  339.  
  340. main a,
  341. main a:visited {
  342. color: var(--link-color);
  343. }
  344.  
  345. main a:hover,
  346. main a:focus {
  347. color: var(--link-color-hover);
  348. text-decoration-style: wavy;
  349. }
  350.  
  351. main p,
  352. main .image,
  353. main .full-width-image,
  354. main .two-columns {
  355. margin: 0.75em 0;
  356. }
  357.  
  358. main ol,
  359. main ul {
  360. margin: 0.5em 0;
  361. padding-left: 1.5em;
  362. }
  363.  
  364. main ol li,
  365. main ul li {
  366. margin-bottom: 0.2em;
  367. line-height: 1.3;
  368. }
  369.  
  370. main ol {
  371. padding-left: 2em;
  372. }
  373.  
  374. main blockquote {
  375. background: rgba(0, 0, 0, 0.1);
  376. padding: 15px;
  377. margin: 1em 0;
  378. border-radius: 10px;
  379. }
  380.  
  381. main pre {
  382. margin: 1em 0 1.5em;
  383. }
  384.  
  385. main code {
  386. text-transform: none;
  387. }
  388.  
  389. main center {
  390. margin: 1em 0;
  391. padding: 0 1em;
  392. }
  393.  
  394. main hr {
  395. border: 0;
  396. border-top: var(--border);
  397. margin: 1.5em 0;
  398. }
  399.  
  400. /* HEADINGS: */
  401.  
  402. main h1,
  403. main h2,
  404. main h3,
  405. main h4,
  406. main h5,
  407. main h6 {
  408. font-family: var(--heading-font);
  409. margin-bottom: 0;
  410. line-height: 1.5;
  411. }
  412.  
  413. main h1:first-child,
  414. main h2:first-child,
  415. main h3:first-child,
  416. main h4:first-child,
  417. main h5:first-child,
  418. main h6:first-child {
  419. margin-top: 0;
  420. }
  421.  
  422. main h1 {
  423. font-size: 1.5em;
  424. }
  425.  
  426. main h2 {
  427. font-size: 1.4em;
  428. }
  429.  
  430. main h3 {
  431. font-size: 1.3em;
  432. }
  433.  
  434. main h4 {
  435. font-size: 1.2em;
  436. }
  437.  
  438. main h5 {
  439. font-size: 1.1em;
  440. }
  441.  
  442. main h6 {
  443. font-size: 1em;
  444. }
  445.  
  446. /* COLUMNS: */
  447.  
  448. .two-columns {
  449. display: flex;
  450. }
  451.  
  452. .two-columns > * {
  453. flex: 1 1 0;
  454. margin: 0;
  455. }
  456.  
  457. .two-columns > *:first-child {
  458. padding-right: 0.75em;
  459. }
  460.  
  461. .two-columns > *:last-child {
  462. padding-left: 0.75em;
  463. }
  464.  
  465. /* -------------------------------------------------------- */
  466. /* CONTENT IMAGES */
  467. /* -------------------------------------------------------- */
  468.  
  469. .image {
  470. display: block;
  471. width: auto;
  472. height: auto;
  473. max-width: 100%;
  474. }
  475.  
  476. .full-width-image {
  477. display: block;
  478. width: 100%;
  479. height: auto;
  480. }
  481.  
  482. .images {
  483. display: flex;
  484. width: calc(100% + 5px + 5px);
  485. margin-left: -5px;
  486. margin-right: -5px;
  487. }
  488.  
  489. .images img {
  490. width: 100%;
  491. height: auto;
  492. padding: 5px;
  493. margin: 0;
  494. overflow: hidden;
  495. }
  496.  
  497. /* -------------------------------------------------------- */
  498. /* ACCESSIBILITY */
  499. /* -------------------------------------------------------- */
  500.  
  501. /* please do not remove this. */
  502.  
  503. #skip-to-content-link {
  504. position: fixed;
  505. top: 0;
  506. left: 0;
  507. display: inline-block;
  508. padding: 0.375rem 0.75rem;
  509. line-height: 1;
  510. font-size: 1.25rem;
  511. background-color: var(--content-background-color);
  512. color: var(--text-color);
  513. transform: translateY(-3rem);
  514. transition: transform 0.1s ease-in;
  515. z-index: 99999999999;
  516. }
  517.  
  518. #skip-to-content-link:focus,
  519. #skip-to-content-link:focus-within {
  520. transform: translateY(0);
  521. }
  522.  
  523. /* -------------------------------------------------------- */
  524. /* MOBILE RESPONSIVE */
  525. /* -------------------------------------------------------- */
  526.  
  527. /* CSS Code for devices < 800px */
  528. @media (max-width: 800px) {
  529. body {
  530. font-size: 14px;
  531. }
  532.  
  533. .layout {
  534. width: 100%;
  535. grid-template: "header" auto "leftSidebar" auto "rightSidebar" auto "main" auto "footer" auto / 1fr;
  536. /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
  537. }
  538.  
  539.  
  540.  
  541.  
  542. aside {
  543. border-bottom: 1px solid;
  544. padding: 9px;
  545. font-size: 0.9em;
  546. }
  547.  
  548.  
  549. nav {
  550. padding: 0;
  551. }
  552.  
  553. nav > ul {
  554. padding-top: 0.5em;
  555. }
  556.  
  557. nav > ul li > a,
  558. nav > ul li > details summary,
  559. nav > ul li > strong {
  560. padding: 0.5em;
  561. }
  562.  
  563. main {
  564. max-height: none;
  565. padding: 15px;
  566. }
  567.  
  568. .images {
  569. flex-wrap: wrap;
  570. }
  571.  
  572. .images img {
  573. width: 100%;
  574. }
  575.  
  576. #skip-to-content-link {
  577. font-size: 1rem;
  578. }
  579. }
  580.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement