Skip to content

Commit fb030ae

Browse files
authored
Merge pull request #197 from shippedcode/assets-support-http-prefix
Assets: Support Github pages / http_prefix
2 parents 6f84654 + 29efd4a commit fb030ae

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/assets/stylesheets/_govuk_tech_docs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$govuk-assets-path: "/assets/govuk/assets/";
1+
$govuk-assets-path: "/assets/govuk/assets/" !default;
22

33
// Include only the bits of GOV.UK Frontend we need
44
$govuk-new-link-styles: true;

lib/assets/stylesheets/modules/_anchored-heading.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
text-decoration: none;
1919
text-indent: -9999em;
2020

21-
background-image: url('/images/anchored-heading-icon.png');
21+
background-image: image-url('/images/anchored-heading-icon.png');
2222
background-repeat: no-repeat;
2323
background-position: center center;
2424

2525
@include govuk-device-pixel-ratio {
26-
background-image: url('/images/anchored-heading-icon-2x.png');
26+
background-image: image-url('/images/anchored-heading-icon-2x.png');
2727
background-size: $icon-width $icon-height;
2828
}
2929

lib/assets/stylesheets/modules/_search.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $input-size: 40px;
3636
padding: 0;
3737
width: $input-size;
3838
height: 100%;
39-
background-image: url('/images/search-button.png');
39+
background-image: image-url('/images/search-button.png');
4040
background-repeat: no-repeat;
4141
background-position: 2px 50%;
4242
text-indent: -5000px;
@@ -104,7 +104,7 @@ $input-size: 40px;
104104
left: -9px;
105105
width: 10px;
106106
height: 20px;
107-
background: no-repeat url('/images/search-result-caret.svg') center right;
107+
background: no-repeat image-url('/images/search-result-caret.svg') center right;
108108
background-size: contain;
109109
}
110110
}

lib/assets/stylesheets/modules/_toc.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@
152152
height: 20px;
153153
float: right;
154154

155-
background-image: url('/images/govuk-icn-numbered-list.png');
155+
background-image: image-url('/images/govuk-icn-numbered-list.png');
156156
background-repeat: no-repeat;
157157
background-position: left center;
158158

159159
@include govuk-device-pixel-ratio {
160-
background-image: url('/images/govuk-icn-numbered-list@2x.png');
160+
background-image: image-url('/images/govuk-icn-numbered-list@2x.png');
161161
background-size: 20px 20px;
162162
}
163163
}
@@ -178,12 +178,12 @@
178178
height: 20px;
179179
cursor: pointer;
180180

181-
background-image: url('/images/govuk-icn-close.png');
181+
background-image: image-url('/images/govuk-icn-close.png');
182182
background-repeat: no-repeat;
183183
background-position: left center;
184184

185185
@include govuk-device-pixel-ratio {
186-
background-image: url('/images/govuk-icn-close@2x.png');
186+
background-image: image-url('/images/govuk-icn-close@2x.png');
187187
background-size: 20px 20px;
188188
}
189189

0 commit comments

Comments
 (0)