Kaynağa Gözat

fix(widget): Portfolio .project.card width (#1985)

Fixes 2 and 3 column responsive card layouts leaving extra space at far right side.

Fixes #1981
rodrigoalcarazdelaosa 4 yıl önce
ebeveyn
işleme
d5663b2abb
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      wowchemy/assets/scss/wowchemy/_widgets.scss

+ 2 - 2
wowchemy/assets/scss/wowchemy/_widgets.scss

@@ -460,11 +460,11 @@ ul.ul-edu li .description p.institution {
 
 .project-card {
   position: relative;
-  width: calc(33.3% - 2*20px); /* Fluid 3 columns (inc. 20px gutter) */
+  width: calc(33.3% - 13.3px); /* Fluid 3 columns ($gutter * ($number_of_cols - 1) / $number_of_cols; following https://stackoverflow.com/a/51290967) */
 }
 @media screen and (max-width: 1199px) {
   .project-card {
-    width: calc(50% - 20px); /* Fluid 2 columns (inc. 20px gutter) */
+    width: calc(50% - 10px); /* Fluid 2 columns ($gutter * ($number_of_cols - 1) / $number_of_cols; following https://stackoverflow.com/a/51290967) */
   }
 }
 @media screen and (max-width: 768px) {