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.
 
 
 

108 line
2.2 KiB

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