Foundation 5 and page printing

后端 未结 4 1753
花落未央
花落未央 2021-02-06 08:25

I\'m using Zurb Foundation. I\'m trying to print a page exactly as it looks in large screen but everything get stacked (and floated wrong).

I succeded in having the grid

4条回答
  •  执笔经年
    2021-02-06 08:37

    These three sass loops have made my life easier when styling pages for print and have worked like a charm.

    The variable $total-columns comes from foundation's core settings.

      @for $i from 1 through $total-columns {
        .large-#{$i} {
          width: 100% * ($i/$total-columns);
        }
      }
    
      @for $i from 1 through $total-columns {
        .medium-#{$i} {
          width: 100% * ($i/$total-columns);
        }
      }
    
      @for $i from 1 through $total-columns {
        .small-#{$i} {
          width: 100% * ($i/$total-columns);
        }
      }

提交回复
热议问题