]> git.ardis.lu - ardislu.dev/commitdiff
Fix regression on grid-template-columns
authorArdis Lu <ardisglu@gmail.com>
Tue, 23 Nov 2021 07:14:30 +0000 (23:14 -0800)
committerArdis Lu <ardisglu@gmail.com>
Tue, 23 Nov 2021 07:14:30 +0000 (23:14 -0800)
The "simplification" causes overflow when the screen width is smaller than card-container.  Putting the inner min() inside minmax() ensures that card-container will never be larger than the screen width.

style.css

index ba9e8ce7b357be3b0349a9e0bd4e3e287ba91c68..6ebc8e44d28c9694ea641e2870b0f1644cfcceca 100644 (file)
--- a/style.css
+++ b/style.css
@@ -39,7 +39,7 @@ kbd {
 
 .card-container {
   display: grid;
-  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
+  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
   grid-gap: 1rem;
   margin-inline: auto;
   margin-block-end: 1rem;
This page took 0.037115 seconds and 4 git commands to generate.