<commit_before>@mixin add_styles_for_org($org_class, $colour, $logo_image_url) {
  &.#{$org_class} {
    .page_header {
      h1.name {
        @if $colour {
          border-color: $colour;
        }
        @if $logo_image_url { 
          background: url($logo_image_url) no-repeat 8px -1px;
          line-height: 48px;
          padding-left: 78px;
        }
      }
    }
    
    section h1 a {
      @if $colour {
        color: $colour;
      }      
    } 
  }
}

@mixin branded_page_headers {  
  .organisation {
    .page_header {
      h1.name {
        border-left: 4px solid #000;
        padding-left: 4%;
      }
    }
    
    // define styles for different organisation types
    @include add_styles_for_org('ministerial-department', false, "/government/assets/coa-default-48.gif");
    
    // define styles for individual organisations
    @include add_styles_for_org('department-for-business-innovation-and-skills', #006517, false);
  }
}<commit_msg>Add colours for all organisations, in a way they can be applied to many different css styles<commit_after>// A list of organisation brand info, to be iterated over when declaring styles
// The format is (slug, color)

$organisation_brands:
  ('treasury', rgb(191, 49, 26))
  ('cabinet-office', rgb(0, 118, 192))
  ('department-for-education', rgb(245, 132, 38))
  ('department-of-transport', rgb(0, 113, 97))
  ('department-of-health', rgb(0, 174, 158))
  ('home-office', rgb(127, 63, 152))
  ('ministry-of-justice', rgb(35, 31, 32))
  ('ministry-of-defence', rgb(92, 41, 70))
  ('foreign-and-commonwealth-office', rgb(0, 84, 164))
  ('department-for-communities-and-local-government', rgb(73, 47, 146))
  ('department-for-energy-and-climate-change', rgb(122, 193, 67))
  ('department-for-culture-media-and-sport', rgb(236, 9, 141))
  ('department-for-environment-food-and-rural-affairs', rgb(138, 141, 9))
  ('department-for-work-and-pensions', rgb(34, 188, 185))
  ('department-for-business-innovation-and-skills', rgb(59, 110, 143))
  ('department-for-international-development', rgb(115, 157, 210));

@mixin add_styles_for_org($org_class, $colour, $logo_image_url) {
  &.#{$org_class} {
    .page_header {
      h1.name {
        @if $colour {
          border-color: $colour;
        }
        @if $logo_image_url {
          background: url($logo_image_url) no-repeat 8px -1px;
          line-height: 48px;
          padding-left: 78px;
        }
      }
    }

    section h1 a {
      @if $colour {
        color: $colour;
      }
    }
  }
}

@mixin branded_page_headers {
  .organisation {
    .page_header {
      h1.name {
        border-left: 4px solid #000;
        padding-left: 4%;
      }
    }

    // define styles for different organisation types
    @include add_styles_for_org('ministerial-department', false, "/government/assets/coa-default-48.gif");

    // define styles for individual organisations

    @each $brand in $organisation_brands {
      $name: nth($brand, 1);
      $color: nth($brand, 2);

      @include add_styles_for_org($name, $color, false);
    }
  }
}
{'fraction_non_alphanumeric': 0.14630172694688823, 'fraction_numerical': 0.050505050505050504, 'mean_word_length': 2.6766467065868262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6076603', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1049, 'n_words': 228}