Skip to content

Instantly share code, notes, and snippets.

@mucsher
Last active December 10, 2015 18:28

Revisions

  1. mucsher renamed this gist Jan 7, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Less Convert Image Size → convert-image-size.less
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    // Convert Image Size
    #imgSize
    {
    .s3x4(@width) {
  2. mucsher renamed this gist Jan 7, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Convert Size Image → Less Convert Image Size
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    #imgSize
    {
    .s3x4(@width) {
    width: @width;
    .s3x4(@width) {
    width: @width;
    height: round((@width / 3) * 4);
    }
    .s4x3(@width) {
    .s4x3(@width) {
    width: @width;
    height: round((@width / 4) * 3);
    }
    .s4x4(@width) {
    .s4x4(@width) {
    width: @width;
    height: @width;
    }
  3. mucsher created this gist Jan 7, 2013.
    23 changes: 23 additions & 0 deletions Convert Size Image
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #imgSize
    {
    .s3x4(@width) {
    width: @width;
    height: round((@width / 3) * 4);
    }
    .s4x3(@width) {
    width: @width;
    height: round((@width / 4) * 3);
    }
    .s4x4(@width) {
    width: @width;
    height: @width;
    }
    .s4x6(@width) {
    width: @width;
    height: round((@width / 4) * 6);
    }
    .s6x4(@width) {
    width: @width;
    height: round((@width / 6) * 4);
    }
    }