<commit_before>@import "bootstrap_import";
@import "../bower_components/bootstrap-select/less/bootstrap-select.less";

// Old variables
@alert-danger-bg: grey;
@alert-danger-border: grey;
@alert-danger-text: grey;
@colorless: grey;
@button-color: pink;
@muted-color: purple;

// Theming
@separationColor: #d7e4e9;
@brand-primary: #00304d;
@brand-secondary: #6195a6;
@brand-tertiary: #d61820;
@brand-button-color: #00263e;
@error-color: #bf3737;

// Responsive Setup

@responsive-small-max: 799px;
@responsive-shim-min: 800px;
@responsive-shim-max: 1200px;
@responsive-shim-step-count: 30;
@responsive-shim-step: (@responsive-shim-max - @responsive-shim-min) / @responsive-shim-step-count;
.responsive(@defaults, @small, @full) {
  @defaults();

  @media (max-width: @responsive-small-max) {
    @small();
  }
  @media (min-width: @responsive-shim-min) {
    @full();
  }
}
.responsive(@defaults, @small) {
  .responsive(@defaults, @small, {});
}
.small(@rules) {
  @media (max-width: @responsive-small-max) {
    @rules();
  }
}
.shim(@rules) {
  @media (min-width: @responsive-shim-min) and (max-width: @responsive-shim-max) {
    @rules();
  }
}
.full(@rules) {
  @media (min-width: @responsive-shim-min) {
    @rules();
  }
}
.not-full(@rules) {
  @media (max-width: @responsive-shim-max) {
    @rules();
  }
}

.shim-interpolate-value(@property, @start-value, @end-value) {
  @steps-remaining: (@interpolation-max - @responsive-shim-step-max) / @responsive-shim-step;
  @steps-so-far: (@responsive-shim-step-min - @interpolation-min) / @responsive-shim-step;
  @ratio: @steps-so-far / (@steps-so-far + @steps-remaining);

  @{property}: @start-value + (@end-value - @start-value) * @ratio;
}

.header-shim-step(@responsive-shim-step-min, @responsive-shim-step-max, @property, @start-value, @end-value) when (@responsive-shim-step-min >= @interpolation-min) {
  @media (min-width: @responsive-shim-step-min) and (max-width: @responsive-shim-step-max) {
    .shim-interpolate-value(@property, @start-value, @end-value);
  }
  .header-shim-step((@responsive-shim-step-min - @responsive-shim-step), (@responsive-shim-step-max - @responsive-shim-step), @property, @start-value, @end-value);
}
<commit_msg>[OP-110] Round pixel values down in interpolated values<commit_after>@import "bootstrap_import";
@import "../bower_components/bootstrap-select/less/bootstrap-select.less";

// Old variables
@alert-danger-bg: grey;
@alert-danger-border: grey;
@alert-danger-text: grey;
@colorless: grey;
@button-color: pink;
@muted-color: purple;

// Theming
@separationColor: #d7e4e9;
@brand-primary: #00304d;
@brand-secondary: #6195a6;
@brand-tertiary: #d61820;
@brand-button-color: #00263e;
@error-color: #bf3737;

// Responsive Setup

@responsive-small-max: 799px;
@responsive-shim-min: 800px;
@responsive-shim-max: 1200px;
@responsive-shim-step-count: 30;
@responsive-shim-step: (@responsive-shim-max - @responsive-shim-min) / @responsive-shim-step-count;
.responsive(@defaults, @small, @full) {
  @defaults();

  @media (max-width: @responsive-small-max) {
    @small();
  }
  @media (min-width: @responsive-shim-min) {
    @full();
  }
}
.responsive(@defaults, @small) {
  .responsive(@defaults, @small, {});
}
.small(@rules) {
  @media (max-width: @responsive-small-max) {
    @rules();
  }
}
.shim(@rules) {
  @media (min-width: @responsive-shim-min) and (max-width: @responsive-shim-max) {
    @rules();
  }
}
.full(@rules) {
  @media (min-width: @responsive-shim-min) {
    @rules();
  }
}
.not-full(@rules) {
  @media (max-width: @responsive-shim-max) {
    @rules();
  }
}

.shim-interpolate-value(@property, @start-value, @end-value) {
  @steps-remaining: (@interpolation-max - @responsive-shim-step-max) / @responsive-shim-step;
  @steps-so-far: (@responsive-shim-step-min - @interpolation-min) / @responsive-shim-step;
  @ratio: @steps-so-far / (@steps-so-far + @steps-remaining);

  .round-pixels(@unrounded) {
    @value: @unrounded;
  }
  .round-pixels(@unrounded) when (ispixel(@unrounded)) {
    @value: round(@unrounded);
  }
  .round-pixels(@start-value + (@end-value - @start-value) * @ratio);

  @{property}: @value;
}

.header-shim-step(@responsive-shim-step-min, @responsive-shim-step-max, @property, @start-value, @end-value) when (@responsive-shim-step-min >= @interpolation-min) {
  @media (min-width: @responsive-shim-step-min) and (max-width: @responsive-shim-step-max) {
    .shim-interpolate-value(@property, @start-value, @end-value);
  }
  .header-shim-step((@responsive-shim-step-min - @responsive-shim-step), (@responsive-shim-step-max - @responsive-shim-step), @property, @start-value, @end-value);
}

{'fraction_non_alphanumeric': 0.20363164721141375, 'fraction_numerical': 0.017509727626459144, 'mean_word_length': 4.324510932105869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5543531', 'n_tokens_mistral': 1901, 'n_tokens_neox': 1774, 'n_words': 272}