base.css 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 {
  42. @apply w-full h-24 p-2 bg-white border border-gray-400 rounded;
  43. }
  44. ol {
  45. @apply list-decimal list-inside;
  46. }
  47. ul {
  48. @apply list-disc list-inside;
  49. }
  50. li > ol,
  51. li > ul {
  52. @apply pl-4;
  53. }
  54. li > ul {
  55. list-style-type: circle;
  56. }
  57. li > ol {
  58. list-style-type: lower-roman;
  59. }
  60. pre {
  61. @apply w-full my-2 p-2 bg-gray-50 rounded;
  62. }
  63. code {
  64. @apply inline-block px-1 bg-gray-50 rounded-sm;
  65. }
  66. hr {
  67. @apply w-full border-gray-700 mt-4 mb-2;
  68. }
  69. .form {
  70. /* filler */
  71. }
  72. .form label {
  73. @apply block text-lg font-semibold;
  74. }
  75. .form label .desc {
  76. @apply text-xs lowercase;
  77. }
  78. .form label .desc::before {
  79. content: "(";
  80. }
  81. .form label .desc::after {
  82. content: ")";
  83. }
  84. .form input,
  85. .form select {
  86. @apply inline-block w-full max-w-screen-lg border border-gray-400 rounded;
  87. }
  88. .form .input-prefix {
  89. @apply flex w-full max-w-screen-lg border border-gray-400 rounded overflow-hidden;
  90. }
  91. .form .input-prefix::before {
  92. @apply bg-gray-200 pl-2 pr-1;
  93. content: attr(data-prefix);
  94. }
  95. .form .input-prefix input {
  96. @apply border-none rounded-none;
  97. }
  98. /* tables */
  99. table {
  100. @apply w-full bg-purple-200 border-2;
  101. }
  102. table a {
  103. @apply text-black;
  104. }
  105. table thead,
  106. table tbody,
  107. table thead tr,
  108. table tbody tr {
  109. @apply flex w-full;
  110. }
  111. table thead {
  112. @apply bg-gray-100 border-b-2 border-black;
  113. }
  114. table thead th {
  115. @apply text-left;
  116. }
  117. table tbody {
  118. @apply flex-col items-center justify-between overflow-y-auto max-h-80;
  119. }
  120. table thead tr *,
  121. table tbody tr * {
  122. @apply flex-1;
  123. }
  124. table tbody tr:nth-child(even){
  125. @apply bg-purple-100;
  126. }
  127. table tbody tr{
  128. @apply hover:bg-white;
  129. }
  130. table thead th:first-child,
  131. table tbody td:first-child {
  132. @apply pl-2;
  133. }
  134. table thead th:last-child,
  135. table tbody td:last-child {
  136. @apply pr-2;
  137. }
  138. }
  139. @layer components {
  140. /* standard classes */
  141. .btn {
  142. @apply inline-block bg-white p-2 border border-black rounded text-black font-normal no-underline;
  143. }
  144. .panel {
  145. @apply w-full my-2 border border-black p-2 rounded bg-gray-200 relative;
  146. }
  147. .fullscreen {
  148. @apply block w-screen h-screen;
  149. }
  150. /* wrap an image such that it is only minimally scaled to fit a desired area. */
  151. /* actual size it left to be applied to the element. */
  152. .image-wrapper {
  153. @apply inline-block items-center justify-items-center overflow-hidden;
  154. }
  155. .image-wrapper img {
  156. @apply w-full h-full object-cover;
  157. }
  158. /* Navbar styles */
  159. #sidebar
  160. {
  161. @apply w-screen xl:w-1/6 lg:max-w-xs bg-pink-500 border-r border-black;
  162. 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");
  163. }
  164. #sidebar h1,
  165. #sidebar div,
  166. #sidebar p {
  167. @apply mx-auto my-4 px-6 py-4 bg-opacity-50 bg-white rounded text-center;
  168. }
  169. #sidebar h1 {
  170. @apply w-max bg-opacity-70;
  171. }
  172. #sidebar p,
  173. #sidebar div {
  174. @apply mx-8;
  175. }
  176. #sidebar #site-title {
  177. @apply text-3xl;
  178. }
  179. #nav {
  180. @apply flex justify-around;
  181. }
  182. #nav a {
  183. @apply text-black;
  184. }
  185. /* Blog */
  186. .blog-post {
  187. @apply w-full md:w-3/4 xl:w-1/2 max-w-3xl mx-auto;
  188. }
  189. .blog-post--body {
  190. @apply px-2;
  191. }
  192. .blog-post--body h2 {
  193. @apply mt-4;
  194. }
  195. .blog-post--body p {
  196. @apply my-2;
  197. }
  198. .blog-post--footer {
  199. @apply mt-8 p-2 font-mono text-sm border-t border-black;
  200. }
  201. /* Console */
  202. .console {
  203. @apply p-2 bg-black font-mono rounded;
  204. color: #00FF00;
  205. }
  206. .console p {
  207. @apply m-0;
  208. }
  209. .console * {
  210. color: inherit;
  211. }
  212. }