base.css 4.6 KB

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