solution.css 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .solution-hiding {
  2. pointer-events: none;
  3. }
  4. .solution-hidden {
  5. height: 0;
  6. overflow: hidden;
  7. }
  8. .solution-hidden .solution-main,
  9. .solution-hiding .solution-main {
  10. transform: translateY(-25px) scaleY(0.95);
  11. opacity: 0;
  12. }
  13. .solution-main {
  14. z-index: 1;
  15. @apply text-gray-800;
  16. opacity: 1;
  17. transition: all 0.1s;
  18. }
  19. .solution-toggle {
  20. @apply absolute;
  21. @apply z-10;
  22. top: 0.5rem;
  23. right: 10px;
  24. @apply px-3;
  25. @apply py-1;
  26. @apply text-xs;
  27. @apply leading-none;
  28. @apply cursor-pointer;
  29. }
  30. .solution-toggle-show {
  31. top: 0;
  32. @apply bg-green-300;
  33. @apply shadow-sm;
  34. @apply rounded-b-sm;
  35. @apply z-0;
  36. clip-path: polygon(0 0, 100% 0, 100% 100%, 9px 100%, 0 calc(100% - 5px));
  37. -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 9px 100%, 0 calc(100% - 5px));
  38. }
  39. .solution-toggle-show a {
  40. @apply no-underline;
  41. }
  42. .solution-background {
  43. @apply absolute;
  44. @apply inset-0;
  45. top: -6px;
  46. margin: 0 10px;
  47. @apply bg-green-300;
  48. @apply shadow;
  49. @apply border;
  50. @apply border-tint-300;
  51. @apply overflow-hidden;
  52. @apply rounded-b-sm;
  53. }
  54. .solution-title {
  55. @apply font-semibold;
  56. @apply text-2xl;
  57. @apply leading-tight;
  58. @apply mb-4;
  59. }
  60. .solution-content-wrapper {
  61. @apply p-12;
  62. @apply overflow-x-auto;
  63. @apply grid;
  64. }
  65. .solution-description {
  66. @apply max-w-4xl;
  67. }
  68. @screen md {
  69. .solution-content {
  70. margin-left: 15rem;
  71. }
  72. }
  73. .solution code {
  74. @apply font-mono;
  75. @apply text-gray-700;
  76. @apply inline-block;
  77. @apply -my-1;
  78. @apply px-1;
  79. @apply rounded-sm;
  80. @apply bg-tint-100;
  81. @apply border;
  82. @apply border-tint-100;
  83. @apply font-mono;
  84. @apply text-gray-700;
  85. @apply break-all;
  86. @apply leading-tight;
  87. }