Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure sass #4

Merged
merged 1 commit into from
Mar 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions public/sass/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_grid-1-2.scss

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_grid-1-3.scss

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_grid-1-4.scss

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_grid-2-3.scss

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_grid-3-4.scss

This file was deleted.

11 changes: 0 additions & 11 deletions public/sass/base/_grid-unit.scss

This file was deleted.

8 changes: 0 additions & 8 deletions public/sass/base/_grid-wrapper.scss

This file was deleted.

6 changes: 0 additions & 6 deletions public/sass/base/_typography-base.scss

This file was deleted.

13 changes: 0 additions & 13 deletions public/sass/base/_typography-data.scss

This file was deleted.

22 changes: 0 additions & 22 deletions public/sass/base/_typography-general.scss

This file was deleted.

116 changes: 46 additions & 70 deletions public/sass/elements-page.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
// Import GOV.UK frontend toolkit

@import "_colours";
@import "_css3";
@import "_shims";
@import "_typography";
@import "_measurements";

@import "design-patterns/_alpha-beta";
@import "design-patterns/_buttons";

// Helpers
// ==========================================================================

// Variables
// @import "helpers/_variables";
// Variables for colour palette
@import "helpers/_colours";

// Functions
// @import "helpers/_functions";

// Mixins
// @import "helpers/_mixins";

// Helper classes
@import "helpers/_helpers";

@import "main";

// Service Design Manual styles
// ==========================================================================
Expand All @@ -35,48 +8,46 @@
@import "service-design-manual/helpers/breadcrumbs";

// Adjust Service Design header to align with content
#global-breadcrumb,
.page-header {
margin-left: 30px;
margin-right: 30px;
margin-left: $gutter-half;
margin-right: $gutter-half;

@include media(tablet) {
margin-left: $gutter;
margin-right: $gutter;
}
}

// Elements page styles
// ==========================================================================

// These are example styles, used only for the Elements page example boxes
// We're not splitting these styles into smaller files, to avoid confusing these with the base GOV.UK elements styles

// No need to include these styles in your project

// Code styles
code {
@include core-16;
}

// Heading styles
// Headings

.heading-with-border {
border-top: 1px solid $border-colour;
padding-top: ($gutter*1.5);
}

.example .heading-36 {
border-top: none;
padding-top: 0;
// Text

.tight {
margin-bottom: 0;
}

// List styles
// Lists

.list-bullet {
margin-bottom: ($gutter*1.5);
}

// Text styles

.tight {
margin-bottom: 0;
}


// Example box
.example {

Expand Down Expand Up @@ -155,7 +126,7 @@ code {
}


// Colour swatche wrapper
// Colour swatch wrapper
.swatch-wrapper {
@include media(tablet) {
float: left;
Expand All @@ -177,11 +148,9 @@ code {
padding-top: 10px;
}
}

.swatch-wrapper li {
@include core-16;
}

.swatch-wrapper b {
font-weight: bold;
text-transform: uppercase;
Expand All @@ -204,23 +173,36 @@ code {
}

// Generate swatch classes for each colour in palette list
@each $color in $palette {

$color-name: nth($color, 1);
$color-var: nth($color, 2);
$color-var-50: nth($color, 3);
$color-var-25: nth($color, 4);

.swatch-#{$color-name} {
background-color: $color-var;
}
.swatch-#{$color-name}-50 {
background-color: $color-var-50;
}
.swatch-#{$color-name}-25 {
background-color: $color-var-25;
@mixin color-swatches {
@each $color in $palette {
$color-name: nth($color, 1);
$color-var: nth($color, 2);
.swatch-#{$color-name} {
background-color: $color-var;
}
}
}

// Usage:
@include color-swatches;

// Common colours
.swatch-alpha {
background-color: $alpha-colour;
}
.swatch-beta {
background-color: $beta-colour;
}

.swatch-error {
background-color: $error;
}
.swatch-error-background {
background-color: $error-background;
}

.swatch-focus {
background-color: $yellow;
}

// Create swatch classes for other colours in palette
Expand Down Expand Up @@ -274,10 +256,4 @@ code {
}
.swatch-highlight-colour {
background-color: $highlight-colour;
}

// Example pages
.example-back-link {
display: inline-block;
margin: 40px 0;
}
}
Loading