govuk_tech_docs 1.9.0.pre.rc2 → 2.0.0.pre.test.pre.release.pre.524
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +4 -1
- data/CHANGELOG.md +7 -2
- data/example/.ruby-version +1 -1
- data/govuk_tech_docs.gemspec +23 -4
- data/lib/assets/javascripts/govuk_tech_docs.js +2 -0
- data/lib/assets/stylesheets/_core.scss +0 -48
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +4 -8
- data/lib/assets/stylesheets/modules/_anchored-heading.scss +6 -6
- data/lib/assets/stylesheets/modules/_app-pane.scss +46 -47
- data/lib/assets/stylesheets/modules/_collapsible.scss +7 -3
- data/lib/assets/stylesheets/modules/_contribution-banner.scss +9 -7
- data/lib/assets/stylesheets/modules/_footer.scss +6 -127
- data/lib/assets/stylesheets/modules/_page-review.scss +15 -14
- data/lib/assets/stylesheets/modules/_search.scss +53 -42
- data/lib/assets/stylesheets/modules/_technical-documentation.scss +65 -95
- data/lib/assets/stylesheets/modules/_toc.scss +76 -47
- data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +5 -5
- data/lib/govuk_tech_docs.rb +13 -11
- data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +1 -1
- data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +1 -0
- data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +1 -1
- data/lib/govuk_tech_docs/page_review.rb +1 -0
- data/lib/govuk_tech_docs/pages.rb +1 -1
- data/lib/govuk_tech_docs/redirects.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/headings_builder.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +1 -0
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_footer.erb +32 -7
- data/lib/source/layouts/_header.erb +41 -27
- data/lib/source/layouts/_search.erb +4 -2
- data/lib/source/layouts/core.erb +7 -8
- data/lib/source/stylesheets/manifest.css +3 -0
- data/package-lock.json +3 -3
- data/package.json +3 -2
- metadata +38 -33
- data/lib/assets/stylesheets/_accessibility.scss +0 -9
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_colours.scss +0 -2
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_conditionals.scss +0 -81
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_css3.scss +0 -90
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_device-pixels.scss +0 -10
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_font_stack.scss +0 -19
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_grid_layout.scss +0 -136
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_helpers.scss +0 -16
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_measurements.scss +0 -14
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_shims.scss +0 -55
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_typography.scss +0 -249
- data/lib/assets/stylesheets/govuk_frontend_toolkit/_url-helpers.scss +0 -16
- data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_organisation.scss +0 -103
- data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_palette.scss +0 -77
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_alpha-beta.scss +0 -66
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_breadcrumbs.scss +0 -53
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_buttons.scss +0 -141
- data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_media-player.scss +0 -242
- data/lib/assets/stylesheets/modules/_govuk-logo.scss +0 -47
- data/lib/assets/stylesheets/modules/_header.scss +0 -289
- data/lib/assets/stylesheets/modules/_skip-link.scss +0 -31
- data/lib/source/images/gov.uk_logotype_crown-2x.png +0 -0
- data/lib/source/images/gov.uk_logotype_crown.png +0 -0
- data/lib/source/images/gov.uk_logotype_crown_invert_trans.png +0 -0
- data/lib/source/images/govuk-crest-2x.png +0 -0
- data/lib/source/images/govuk-crest.png +0 -0
- data/lib/source/images/open-government-licence.png +0 -0
- data/lib/source/images/open-government-licence_2x.png +0 -0
@@ -1,16 +0,0 @@
|
|
1
|
-
// URL Helpers
|
2
|
-
|
3
|
-
$path: false !default;
|
4
|
-
|
5
|
-
// A function which can either output a image-url to be used with the Rails
|
6
|
-
// Asset Pipeline or Compass or a plain url which is prefixed with a defined
|
7
|
-
// path variable.
|
8
|
-
@function file-url($file) {
|
9
|
-
$url: '';
|
10
|
-
@if $path {
|
11
|
-
$url: url($path + $file);
|
12
|
-
} @else {
|
13
|
-
$url: image-url($file);
|
14
|
-
}
|
15
|
-
@return $url;
|
16
|
-
}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
// We use `websafe` to mean strong enough contrast against white to
|
2
|
-
// be used for copy and meet the AAA (large text) and AA (smaller
|
3
|
-
// copy) WCAG guidelines.
|
4
|
-
|
5
|
-
$attorney-generals-office: #9f1888;
|
6
|
-
$attorney-generals-office-websafe: #a03a88;
|
7
|
-
$cabinet-office: #005abb;
|
8
|
-
$cabinet-office-websafe: #347da4;
|
9
|
-
$civil-service: #af292e;
|
10
|
-
$department-for-business-innovation-skills: #003479;
|
11
|
-
$department-for-business-innovation-skills-websafe: #347da4;
|
12
|
-
$department-for-communities-and-local-government: #009999;
|
13
|
-
$department-for-communities-and-local-government-websafe: #37836e;
|
14
|
-
$department-for-culture-media-sport: #d40072;
|
15
|
-
$department-for-culture-media-sport-websafe: #a03155;
|
16
|
-
$department-for-education: #003a69;
|
17
|
-
$department-for-education-websafe: #347ca9;
|
18
|
-
$department-for-environment-food-rural-affairs: #00a33b;
|
19
|
-
$department-for-international-development: #002878;
|
20
|
-
$department-for-international-development-websafe: #405e9a;
|
21
|
-
$department-for-international-trade: #CF102D;
|
22
|
-
$department-for-international-trade-websafe: $link-colour;
|
23
|
-
$department-for-transport: #006c56;
|
24
|
-
$department-for-transport-websafe: #398373;
|
25
|
-
$department-for-work-pensions: #00beb7;
|
26
|
-
$department-for-work-pensions-websafe: #37807b;
|
27
|
-
$department-of-energy-climate-change: #009ddb;
|
28
|
-
$department-of-energy-climate-change-websafe: #2b7cac;
|
29
|
-
$department-of-health: #00ad93;
|
30
|
-
$department-of-health-websafe: #39836e;
|
31
|
-
$foreign-commonwealth-office: #003e74;
|
32
|
-
$foreign-commonwealth-office-websafe: #406e97;
|
33
|
-
$government-equalities-office: #9325b2;
|
34
|
-
$hm-government: #0076c0;
|
35
|
-
$hm-government-websafe: #347da4;
|
36
|
-
$hm-revenue-customs: #009390;
|
37
|
-
$hm-revenue-customs-websafe: #008770;
|
38
|
-
$hm-treasury: #af292e;
|
39
|
-
$hm-treasury-websafe: #832322;
|
40
|
-
$home-office: #9325b2;
|
41
|
-
$home-office-websafe: #9440b2;
|
42
|
-
$ministry-of-defence: #4d2942;
|
43
|
-
$ministry-of-defence-websafe: #5a5c92;
|
44
|
-
$ministry-of-justice: #231f20;
|
45
|
-
$ministry-of-justice-websafe: #5a5c92;
|
46
|
-
$northern-ireland-office: #002663;
|
47
|
-
$northern-ireland-office-websafe: #3e598c;
|
48
|
-
$office-of-the-advocate-general-for-scotland: #002663;
|
49
|
-
$office-of-the-advocate-general-for-scotland-websafe: $link-colour;
|
50
|
-
$office-of-the-leader-of-the-house-of-lords: #9c132e;
|
51
|
-
$office-of-the-leader-of-the-house-of-lords-websafe: #c2395d;
|
52
|
-
$scotland-office: #002663;
|
53
|
-
$scotland-office-websafe: #405c8a;
|
54
|
-
// Note: the 'the' part here will get dropped
|
55
|
-
$the-office-of-the-leader-of-the-house-of-commons: #317023;
|
56
|
-
$the-office-of-the-leader-of-the-house-of-commons-websafe: #005f8f;
|
57
|
-
$uk-export-finance: #005747;
|
58
|
-
$uk-export-finance-websafe: $link-colour;
|
59
|
-
$uk-trade-investment: #C80651;
|
60
|
-
$uk-trade-investment-websafe: $link-colour;
|
61
|
-
$wales-office: #a33038;
|
62
|
-
$wales-office-websafe: #7a242a;
|
63
|
-
|
64
|
-
// All organisation colours in a list
|
65
|
-
// (class_name, brand colour, WCAG acceptible text colour)
|
66
|
-
//
|
67
|
-
// example usage:
|
68
|
-
// @each $organisation in $all-organisation-brand-colours {
|
69
|
-
// .#{nth($organisation, 1)} {
|
70
|
-
// border-color: nth($organisation, 2);
|
71
|
-
// }
|
72
|
-
// }
|
73
|
-
|
74
|
-
$all-organisation-brand-colours:
|
75
|
-
'attorney-generals-office' $attorney-generals-office $attorney-generals-office-websafe,
|
76
|
-
'cabinet-office' $cabinet-office $cabinet-office-websafe,
|
77
|
-
'civil-service' $civil-service $civil-service,
|
78
|
-
'department-for-business-innovation-skills' $department-for-business-innovation-skills $department-for-business-innovation-skills-websafe,
|
79
|
-
'department-for-communities-and-local-government' $department-for-communities-and-local-government $department-for-communities-and-local-government-websafe,
|
80
|
-
'department-for-culture-media-sport' $department-for-culture-media-sport $department-for-culture-media-sport-websafe,
|
81
|
-
'department-for-education' $department-for-education $department-for-education-websafe,
|
82
|
-
'department-for-environment-food-rural-affairs' $department-for-environment-food-rural-affairs $department-for-environment-food-rural-affairs,
|
83
|
-
'department-for-international-development' $department-for-international-development $department-for-international-development-websafe,
|
84
|
-
'department-for-international-trade' $department-for-international-trade $department-for-international-trade-websafe,
|
85
|
-
'department-for-transport' $department-for-transport $department-for-transport-websafe,
|
86
|
-
'department-for-work-pensions' $department-for-work-pensions $department-for-work-pensions-websafe,
|
87
|
-
'department-of-energy-climate-change' $department-of-energy-climate-change $department-of-energy-climate-change-websafe,
|
88
|
-
'department-of-health' $department-of-health $department-of-health-websafe,
|
89
|
-
'foreign-commonwealth-office' $foreign-commonwealth-office $foreign-commonwealth-office-websafe,
|
90
|
-
'hm-government' $hm-government $hm-government-websafe,
|
91
|
-
'hm-revenue-customs' $hm-revenue-customs $hm-revenue-customs-websafe,
|
92
|
-
'hm-treasury' $hm-treasury $hm-treasury-websafe,
|
93
|
-
'home-office' $home-office $home-office-websafe,
|
94
|
-
'ministry-of-defence' $ministry-of-defence $ministry-of-defence-websafe,
|
95
|
-
'ministry-of-justice' $ministry-of-justice $ministry-of-justice-websafe,
|
96
|
-
'northern-ireland-office' $northern-ireland-office $northern-ireland-office-websafe,
|
97
|
-
'office-of-the-advocate-general-for-scotland' $office-of-the-advocate-general-for-scotland $office-of-the-advocate-general-for-scotland-websafe,
|
98
|
-
'office-of-the-leader-of-the-house-of-lords' $office-of-the-leader-of-the-house-of-lords $office-of-the-leader-of-the-house-of-lords-websafe,
|
99
|
-
'scotland-office' $scotland-office $scotland-office-websafe,
|
100
|
-
'the-office-of-the-leader-of-the-house-of-commons' $the-office-of-the-leader-of-the-house-of-commons $the-office-of-the-leader-of-the-house-of-commons-websafe,
|
101
|
-
'uk-export-finance' $uk-export-finance $uk-export-finance-websafe,
|
102
|
-
'uk-trade-investment' $uk-trade-investment $uk-trade-investment-websafe,
|
103
|
-
'wales-office' $wales-office $wales-office-websafe;
|
@@ -1,77 +0,0 @@
|
|
1
|
-
// Brand colours
|
2
|
-
$govuk-blue: #005ea5;
|
3
|
-
$mainstream-brand: $govuk-blue;
|
4
|
-
|
5
|
-
// Standard palette, colours
|
6
|
-
$purple: #2e358b;
|
7
|
-
$purple-50: #9799c4;
|
8
|
-
$purple-25: #d5d6e7;
|
9
|
-
$mauve: #6f72af;
|
10
|
-
$mauve-50: #b7b9d7;
|
11
|
-
$mauve-25: #e2e2ef;
|
12
|
-
$fuschia: #912b88;
|
13
|
-
$fuschia-50: #c994c3;
|
14
|
-
$fuschia-25: #e9d4e6;
|
15
|
-
$pink: #d53880;
|
16
|
-
$pink-50: #eb9bbe;
|
17
|
-
$pink-25: #f6d7e5;
|
18
|
-
$baby-pink: #f499be;
|
19
|
-
$baby-pink-50: #faccdf;
|
20
|
-
$baby-pink-25: #fdebf2;
|
21
|
-
$red: #b10e1e;
|
22
|
-
$red-50: #d9888c;
|
23
|
-
$red-25: #efcfd1;
|
24
|
-
$mellow-red: #df3034;
|
25
|
-
$mellow-red-50: #ef9998;
|
26
|
-
$mellow-red-25: #f9d6d6;
|
27
|
-
$orange: #f47738;
|
28
|
-
$orange-50: #fabb96;
|
29
|
-
$orange-25: #fde4d4;
|
30
|
-
$brown: #b58840;
|
31
|
-
$brown-50: #dac39c;
|
32
|
-
$brown-25: #f0e7d7;
|
33
|
-
$yellow: #ffbf47;
|
34
|
-
$yellow-50: #ffdf94;
|
35
|
-
$yellow-25: #fff2d3;
|
36
|
-
$grass-green: #85994b;
|
37
|
-
$grass-green-50: #c2cca3;
|
38
|
-
$grass-green-25: #e7ebda;
|
39
|
-
$green: #006435;
|
40
|
-
$green-50: #7fb299;
|
41
|
-
$green-25: #cce0d6;
|
42
|
-
$turquoise: #28a197;
|
43
|
-
$turquoise-50: #95d0cb;
|
44
|
-
$turquoise-25: #d5ecea;
|
45
|
-
$light-blue: #2b8cc4;
|
46
|
-
$light-blue-50: #96c6e2;
|
47
|
-
$light-blue-25: #d5e8f3;
|
48
|
-
|
49
|
-
// Standard palette, greys
|
50
|
-
$black: #0b0c0c;
|
51
|
-
$grey-1: #6f777b;
|
52
|
-
$grey-2: #bfc1c3;
|
53
|
-
$grey-3: #dee0e2;
|
54
|
-
$grey-4: #f8f8f8;
|
55
|
-
$white: #fff;
|
56
|
-
|
57
|
-
// Semantic colour names
|
58
|
-
$link-colour: $govuk-blue;
|
59
|
-
$link-active-colour: $light-blue;
|
60
|
-
$link-hover-colour: $light-blue;
|
61
|
-
$link-visited-colour: #4c2c92;
|
62
|
-
$button-colour: #00823b;
|
63
|
-
$focus-colour: $yellow;
|
64
|
-
$text-colour: $black; // Standard text colour
|
65
|
-
$secondary-text-colour: $grey-1; // Section headers, help text etc.
|
66
|
-
$border-colour: $grey-2; // Borders, seperators, rules, keylines etc.
|
67
|
-
$panel-colour: $grey-3; // Related links panel, page footer etc.
|
68
|
-
$canvas-colour: $grey-4; // Page background
|
69
|
-
$highlight-colour: $grey-4; // Table stripes etc.
|
70
|
-
$page-colour: $white; // The page
|
71
|
-
$discovery-colour: $fuschia; // Discovery badges and banners
|
72
|
-
$alpha-colour: $pink; // Alpha badges and banners
|
73
|
-
$beta-colour: $orange; // Beta badges and banners
|
74
|
-
$live-colour: $grass-green; // Live badges and banners
|
75
|
-
$banner-text-colour: #000; // Text colour for Alpha & Beta banners
|
76
|
-
$error-colour: $red; // Error text and border colour
|
77
|
-
$error-background: #fef7f7; // Error background colour
|
@@ -1,66 +0,0 @@
|
|
1
|
-
@import "../colours";
|
2
|
-
@import "../typography";
|
3
|
-
@import "../shims";
|
4
|
-
@import "../grid_layout";
|
5
|
-
|
6
|
-
// Phase banner usage:
|
7
|
-
//
|
8
|
-
// .phase-banner {
|
9
|
-
// @include phase-banner($state: beta);
|
10
|
-
// }
|
11
|
-
|
12
|
-
@mixin phase-banner($state: alpha) {
|
13
|
-
padding: 10px 0 8px;
|
14
|
-
|
15
|
-
@include media(tablet) {
|
16
|
-
padding-bottom: 10px;
|
17
|
-
}
|
18
|
-
|
19
|
-
border-bottom: 1px solid $border-colour;
|
20
|
-
|
21
|
-
p {
|
22
|
-
display: table;
|
23
|
-
margin: 0;
|
24
|
-
color: $banner-text-colour;
|
25
|
-
@include core-16;
|
26
|
-
}
|
27
|
-
|
28
|
-
.phase-tag {
|
29
|
-
@include phase-tag($state);
|
30
|
-
}
|
31
|
-
|
32
|
-
span {
|
33
|
-
display: table-cell;
|
34
|
-
vertical-align: baseline;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
// Phase tag usage:
|
39
|
-
//
|
40
|
-
// Alpha
|
41
|
-
// .phase-tag {
|
42
|
-
// @include phase-tag;
|
43
|
-
// }
|
44
|
-
//
|
45
|
-
// Beta
|
46
|
-
// .phase-tag {
|
47
|
-
// @include phase-tag(beta);
|
48
|
-
// }
|
49
|
-
|
50
|
-
@mixin phase-tag($state: alpha) {
|
51
|
-
@include inline-block;
|
52
|
-
margin: 0 8px 0 0;
|
53
|
-
padding: 2px 5px 0;
|
54
|
-
|
55
|
-
@include bold-16($line-height: 20 / 16);
|
56
|
-
text-transform: uppercase;
|
57
|
-
letter-spacing: 1px;
|
58
|
-
text-decoration: none;
|
59
|
-
|
60
|
-
color: $white;
|
61
|
-
@if $state == alpha {
|
62
|
-
background-color: $alpha-colour;
|
63
|
-
} @else if $state == beta {
|
64
|
-
background-color: $beta-colour;
|
65
|
-
}
|
66
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
@import "../colours";
|
2
|
-
@import "../typography";
|
3
|
-
@import "../shims";
|
4
|
-
@import "../url-helpers";
|
5
|
-
|
6
|
-
// Breadcrumbs usage:
|
7
|
-
//
|
8
|
-
// .breadcrumbs {
|
9
|
-
// @include breadcrumbs;
|
10
|
-
// }
|
11
|
-
|
12
|
-
@mixin breadcrumbs {
|
13
|
-
|
14
|
-
padding-top: 0.75em;
|
15
|
-
padding-bottom: 0.75em;
|
16
|
-
|
17
|
-
ol {
|
18
|
-
@extend %contain-floats;
|
19
|
-
}
|
20
|
-
|
21
|
-
li {
|
22
|
-
@include core-16;
|
23
|
-
float: left;
|
24
|
-
|
25
|
-
background-image: file-url("separator.png");
|
26
|
-
|
27
|
-
@include device-pixel-ratio() {
|
28
|
-
background-image: file-url("separator-2x.png");
|
29
|
-
background-size: 6px 11px;
|
30
|
-
}
|
31
|
-
|
32
|
-
background-position: 0% 50%;
|
33
|
-
background-repeat: no-repeat;
|
34
|
-
|
35
|
-
list-style: none;
|
36
|
-
|
37
|
-
margin-left: 0.6em;
|
38
|
-
margin-bottom: 0.4em;
|
39
|
-
padding-left: 0.9em;
|
40
|
-
|
41
|
-
&:first-child {
|
42
|
-
background-image: none;
|
43
|
-
margin-left: 0;
|
44
|
-
padding-left: 0;
|
45
|
-
}
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
a {
|
50
|
-
color: $text-colour;
|
51
|
-
}
|
52
|
-
|
53
|
-
}
|
@@ -1,141 +0,0 @@
|
|
1
|
-
@import '../shims';
|
2
|
-
@import '../css3';
|
3
|
-
@import '../conditionals';
|
4
|
-
@import '../colours';
|
5
|
-
|
6
|
-
// Mixin and defaults for making buttons on GOV.UK services.
|
7
|
-
|
8
|
-
// For guidance, see: https://www.gov.uk/service-manual/design-and-content/resources/buttons.html
|
9
|
-
|
10
|
-
// Example usage:
|
11
|
-
|
12
|
-
// .button{
|
13
|
-
// @include button;
|
14
|
-
// }
|
15
|
-
// .button-secondary{
|
16
|
-
// @include button($grey-3);
|
17
|
-
// }
|
18
|
-
// .button-warning{
|
19
|
-
// @include button($red);
|
20
|
-
// }
|
21
|
-
|
22
|
-
|
23
|
-
@mixin button($colour: $button-colour) {
|
24
|
-
// Colour
|
25
|
-
background-color: $colour;
|
26
|
-
|
27
|
-
// Size and shape
|
28
|
-
position: relative;
|
29
|
-
@include inline-block;
|
30
|
-
padding: .526315em .789473em .263157em; // 10px 15px 5px
|
31
|
-
border: none;
|
32
|
-
@include border-radius(0);
|
33
|
-
-webkit-appearance: none;
|
34
|
-
|
35
|
-
// Bottom edge effect
|
36
|
-
@include box-shadow(0 2px 0 darken($colour, 15%));
|
37
|
-
@include ie-lte(8) {
|
38
|
-
border-bottom: 2px solid darken($colour, 15%);
|
39
|
-
}
|
40
|
-
|
41
|
-
// Text
|
42
|
-
font-size: 1em; // inherit from parent
|
43
|
-
line-height: 1.25;
|
44
|
-
text-decoration: none;
|
45
|
-
-webkit-font-smoothing: antialiased;
|
46
|
-
|
47
|
-
// Interaction
|
48
|
-
cursor: pointer;
|
49
|
-
|
50
|
-
&:visited {
|
51
|
-
background-color: $colour;
|
52
|
-
}
|
53
|
-
|
54
|
-
&:hover,
|
55
|
-
&:focus {
|
56
|
-
background-color: darken($colour, 5%);
|
57
|
-
}
|
58
|
-
|
59
|
-
&:active {
|
60
|
-
top: 2px;
|
61
|
-
@include box-shadow(0 0 0 $colour);
|
62
|
-
}
|
63
|
-
|
64
|
-
// Disabled button styles
|
65
|
-
&.disabled,
|
66
|
-
&[disabled="disabled"],
|
67
|
-
&[disabled] {
|
68
|
-
@include opacity(0.5);
|
69
|
-
&:hover {
|
70
|
-
cursor: default;
|
71
|
-
background-color: $colour;
|
72
|
-
}
|
73
|
-
|
74
|
-
&:active {
|
75
|
-
top: 0;
|
76
|
-
@include box-shadow(0 2px 0 darken($colour, 15%));
|
77
|
-
@include ie-lte(8) {
|
78
|
-
border-bottom: 2px solid darken($colour, 15%);
|
79
|
-
}
|
80
|
-
}
|
81
|
-
}
|
82
|
-
|
83
|
-
// Set text colour depending on background colour
|
84
|
-
@if lightness($colour) < 50% {
|
85
|
-
color: $white;
|
86
|
-
|
87
|
-
&:link,
|
88
|
-
&:hover,
|
89
|
-
&:focus,
|
90
|
-
&:visited {
|
91
|
-
color: $white;
|
92
|
-
}
|
93
|
-
} @else {
|
94
|
-
color: $text-colour;
|
95
|
-
|
96
|
-
&:link,
|
97
|
-
&:hover,
|
98
|
-
&:focus,
|
99
|
-
&:visited {
|
100
|
-
color: $text-colour;
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
|
-
// making the click target bigger than the button
|
105
|
-
// (and fill the space made when the button moves)
|
106
|
-
&:before {
|
107
|
-
content: "";
|
108
|
-
height: 110%;
|
109
|
-
width: 100%;
|
110
|
-
display: block;
|
111
|
-
background: transparent;
|
112
|
-
position: absolute;
|
113
|
-
top: 0;
|
114
|
-
left: 0;
|
115
|
-
}
|
116
|
-
|
117
|
-
&:active:before {
|
118
|
-
top: -10%;
|
119
|
-
height: 120%;
|
120
|
-
|
121
|
-
// IE6 ignores the :before psuedo-class but applies the block to :active
|
122
|
-
// It therefore needs to be reset
|
123
|
-
@include ie(6) {
|
124
|
-
top: auto;
|
125
|
-
height: 100%;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
// Fixes a bug where IE puts a black border around certain elements
|
130
|
-
@include ie-lte(8) {
|
131
|
-
&[type="submit"],
|
132
|
-
&[type="reset"],
|
133
|
-
&[type="button"] {
|
134
|
-
filter: chroma(color = $black);
|
135
|
-
}
|
136
|
-
|
137
|
-
&[type=submit].button {
|
138
|
-
filter: none;
|
139
|
-
}
|
140
|
-
}
|
141
|
-
}
|