base.css 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /* global base styles */
  2. @layer base {
  3. html,
  4. body{
  5. background-color: #b19fb3;
  6. @apply h-screen
  7. }
  8. a{
  9. @apply text-purple-400 font-semibold underline;
  10. }
  11. a[rel] {
  12. @apply whitespace-nowrap;
  13. }
  14. blockquote {
  15. @apply pl-2 border-l-8 border-gray-600 italic;
  16. }
  17. blockquote cite {
  18. display: block;
  19. }
  20. h1,
  21. h2,
  22. h3,
  23. h4,
  24. h5,
  25. h6,
  26. #site-title {
  27. @apply font-bold font-mono;
  28. }
  29. h1 {
  30. @apply text-3xl;
  31. }
  32. h2 {
  33. @apply text-2xl;
  34. }
  35. h3 {
  36. @apply text-xl;
  37. }
  38. h4 {
  39. @apply text-lg;
  40. }
  41. textarea, input {
  42. @apply w-full p-2 bg-white border border-gray-400 rounded;
  43. }
  44. textarea {
  45. @apply h-24;
  46. }
  47. details > *:not(summary) {
  48. @apply pl-4;
  49. }
  50. ol {
  51. @apply list-decimal list-inside;
  52. }
  53. ul {
  54. @apply list-disc list-inside;
  55. }
  56. li > ol,
  57. li > ul {
  58. @apply pl-4;
  59. }
  60. li > ul {
  61. list-style-type: circle;
  62. }
  63. li > ol {
  64. list-style-type: lower-roman;
  65. }
  66. pre {
  67. @apply w-full my-2 p-2 bg-gray-50 text-black rounded !important;
  68. }
  69. code {
  70. @apply inline-block px-1 bg-gray-50 rounded-sm;
  71. }
  72. .highlight > pre > code {
  73. @apply w-full overflow-auto;
  74. }
  75. hr {
  76. @apply w-full border-gray-700 mt-4 mb-2;
  77. }
  78. .form {
  79. /* filler */
  80. }
  81. .form label {
  82. @apply block text-lg font-semibold;
  83. }
  84. .form label .desc {
  85. @apply text-xs lowercase;
  86. }
  87. .form label .desc::before {
  88. content: "(";
  89. }
  90. .form label .desc::after {
  91. content: ")";
  92. }
  93. .form input,
  94. .form select {
  95. @apply inline-block w-full max-w-screen-lg border border-gray-400 rounded;
  96. }
  97. .form .input-prefix {
  98. @apply flex w-full max-w-screen-lg border border-gray-400 rounded overflow-hidden;
  99. }
  100. .form .input-prefix::before {
  101. @apply bg-gray-200 pl-2 pr-1;
  102. content: attr(data-prefix);
  103. }
  104. .form .input-prefix input {
  105. @apply border-none rounded-none;
  106. }
  107. /* tables */
  108. table {
  109. @apply w-full bg-purple-200 border-2;
  110. }
  111. table a {
  112. @apply text-black;
  113. }
  114. table thead,
  115. table tbody,
  116. table thead tr,
  117. table tbody tr {
  118. @apply flex w-full;
  119. }
  120. table thead {
  121. @apply bg-gray-100 border-b-2 border-black;
  122. }
  123. table thead th {
  124. @apply text-left;
  125. }
  126. table tbody {
  127. @apply flex-col items-center justify-between overflow-y-auto max-h-80;
  128. }
  129. table thead tr *,
  130. table tbody tr * {
  131. @apply flex-1;
  132. }
  133. table tbody tr:nth-child(even){
  134. @apply bg-purple-100;
  135. }
  136. table tbody tr{
  137. @apply hover:bg-white;
  138. }
  139. table thead th:first-child,
  140. table tbody td:first-child {
  141. @apply pl-2;
  142. }
  143. table thead th:last-child,
  144. table tbody td:last-child {
  145. @apply pr-2;
  146. }
  147. article figure {
  148. @apply max-w-lg mx-auto p-2 border border-gray-400 rounded text-center;
  149. }
  150. figure img {
  151. @apply w-full sm:w-3/4 xl:w-5/6 mx-auto;
  152. }
  153. figure figcaption {
  154. @apply w-full sm:w-3/4 xl:w-5/6 mx-auto text-sm italic;
  155. }
  156. nav ul {
  157. @apply list-none space-y-2;
  158. }
  159. nav a {
  160. @apply text-black;
  161. }
  162. }
  163. @layer components {
  164. /* standard classes */
  165. .btn {
  166. @apply inline-block bg-white p-2 border border-black rounded text-black font-normal no-underline;
  167. }
  168. .panel {
  169. @apply w-full my-2 border border-black p-2 rounded bg-gray-200 relative;
  170. }
  171. .fullscreen {
  172. @apply block w-screen h-screen;
  173. }
  174. /* wrap an image such that it is only minimally scaled to fit a desired area. */
  175. /* actual size it left to be applied to the element. */
  176. .image-wrapper {
  177. @apply inline-block items-center justify-items-center overflow-hidden;
  178. }
  179. .image-wrapper img {
  180. @apply w-full h-full object-cover;
  181. }
  182. /* Navbar styles */
  183. #sidebar
  184. {
  185. @apply w-screen xl:w-1/5 lg:max-w-xs bg-pink-500 border-r border-black;
  186. background-image: linear-gradient(to bottom, rgba(123,100,127,0) 0%, rgba(123,100,127,0.25) 5%, rgba(123,100,127,0.75) 25%, rgba(123,100,127,1) 90%), url("/imgs/hex_500_1000_10.png");
  187. }
  188. #sidebar h1,
  189. #sidebar nav,
  190. #sidebar p {
  191. @apply mx-8 my-4 px-6 py-4 bg-opacity-75 bg-gray-200 rounded text-center;
  192. }
  193. #sidebar h1 {
  194. @apply bg-opacity-70;
  195. }
  196. #sidebar nav {
  197. text-align: left;
  198. }
  199. #sidebar #site-title {
  200. @apply text-3xl;
  201. }
  202. /* Blog */
  203. .blog-post {
  204. @apply w-full md:w-3/4 xl:w-1/2 max-w-3xl mx-auto;
  205. }
  206. .blog-post--body {
  207. @apply px-2;
  208. }
  209. .blog-post--body h2 {
  210. @apply mt-4;
  211. }
  212. .blog-post--body p {
  213. @apply my-2;
  214. }
  215. .blog-post--footer {
  216. @apply mt-8 p-2 font-mono text-sm border-t border-black;
  217. }
  218. /* Console */
  219. .console {
  220. @apply p-2 bg-black font-mono rounded;
  221. color: #00FF00;
  222. }
  223. .console p {
  224. @apply m-0;
  225. }
  226. .console * {
  227. color: inherit;
  228. }
  229. /* Footer badges */
  230. .badges * {
  231. @apply inline-block;
  232. }
  233. .badges img {
  234. width: 88px;
  235. }
  236. }