You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

109 lines
2.2 KiB

  1. .main-grid-container{
  2. height: 100%;
  3. display: flex;
  4. flex-flow: row nowrap;
  5. justify-content: center;
  6. align-items: center;
  7. }
  8. .grid-container{
  9. display: inline-block;
  10. }
  11. .grid{
  12. display: flex;
  13. flex-flow: column nowrap;
  14. justify-content: center;
  15. align-items: center;
  16. background: #1e1f29;
  17. border: 2px solid var(--closed-path);
  18. overflow: hidden;
  19. }
  20. .row{
  21. display: flex;
  22. flex-flow: row nowrap;
  23. height: 31px;
  24. }
  25. .row.odd{
  26. margin-left: 37px;
  27. }
  28. .cell{
  29. margin: 0 1px 0 0;
  30. width: 36px;
  31. height: 40px;
  32. overflow: visible;
  33. position: relative;
  34. }
  35. .cell::after{
  36. content: "";
  37. display: block;
  38. position: absolute;
  39. background-color: transparent;
  40. width: 40px;
  41. height: 40px;
  42. transition: background-color 0.15s linear;
  43. clip-path: polygon(20px 0, 38px 10px, 38px 30px, 20px 40px, 2px 30px, 2px 10px);;
  44. top: 0;
  45. left: 0;
  46. }
  47. .cell::before{
  48. content: "";
  49. display: block;
  50. position: absolute;
  51. background-color: rgba(255, 255, 255, 0.03);
  52. width: 40px;
  53. height: 40px;
  54. clip-path: polygon(20px 0, 38px 10px, 38px 30px, 20px 40px, 2px 30px, 2px 10px);;
  55. top: 0px;
  56. left: 0px;
  57. }
  58. /* Cell States */
  59. .cell.start::after{
  60. background-color: var(--start);
  61. }
  62. .cell.end::after{
  63. background-color: var(--end);
  64. }
  65. .cell.null::after{
  66. background-color: transparent;
  67. }
  68. .cell.null::before{
  69. /*transform: scale(1.05);*/
  70. }
  71. .cell.open::after{
  72. background-color: var(--open-path);
  73. }
  74. .cell.closed::after{
  75. background-color: var(--closed-path);
  76. }
  77. .cell.path::after{
  78. background-color: var(--path);
  79. }
  80. .cell.wall::after{
  81. background: linear-gradient(var(--wall) 0px, var(--open-path) 1400px);
  82. background-attachment: fixed;
  83. }
  84. .cell.wall::before{
  85. background: linear-gradient(var(--wall) 0px, var(--open-path) 1400px);
  86. background-attachment: fixed;
  87. }
  88. .cell.animate{
  89. animation-name: cell-anim;
  90. animation-duration: 0.4s;
  91. }
  92. @keyframes cell-anim {
  93. 0%{
  94. transform: scale(1.0);
  95. z-index: 2;
  96. }
  97. 50%{
  98. transform: scale(1.25);
  99. }
  100. 100%{
  101. transform: scale(1.0);
  102. z-index: 1;
  103. }
  104. }