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
@@ -2,8 +2,10 @@
|
|
2
2
|
<div class="search" data-module="search">
|
3
3
|
<form action="https://www.google.co.uk/search" method="get" role="search">
|
4
4
|
<input type="hidden" name="as_sitesearch" value="<%= config[:tech_docs][:host] %>"/>
|
5
|
-
<label
|
6
|
-
|
5
|
+
<label class="govuk-label search__label" for="search">
|
6
|
+
Search (via Google)
|
7
|
+
</label>
|
8
|
+
<input class="govuk-input govuk-!-margin-bottom-4" id="search" name="q" type="text" aria-controls="search-results" placeholder="Search">
|
7
9
|
</form>
|
8
10
|
<div id="search-results" class="search-results" aria-hidden="true" role="dialog" aria-labelledby="search-results-title">
|
9
11
|
<div class="search-results__inner">
|
data/lib/source/layouts/core.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
<html lang="en" class="no-js">
|
2
|
+
<html lang="en" class="govuk-template no-js">
|
3
3
|
<head>
|
4
4
|
<meta content="IE=edge" http-equiv="X-UA-Compatible">
|
5
5
|
<meta charset="utf-8">
|
@@ -10,8 +10,7 @@
|
|
10
10
|
|
11
11
|
<title><%= meta_tags.browser_title %></title>
|
12
12
|
|
13
|
-
|
14
|
-
<!--[if lte IE 8]><%= stylesheet_link_tag 'screen-old-ie', media: 'screen' %><![endif]-->
|
13
|
+
<%= stylesheet_link_tag :manifest %>
|
15
14
|
|
16
15
|
<link rel="canonical" href="<%= meta_tags.canonical_url %>">
|
17
16
|
|
@@ -19,9 +18,6 @@
|
|
19
18
|
<meta name="google-site-verification" content="<%= config[:tech_docs][:google_site_verification] %>" />
|
20
19
|
<% end %>
|
21
20
|
|
22
|
-
<%= stylesheet_link_tag :print, media: 'print' %>
|
23
|
-
<%= javascript_include_tag :application %>
|
24
|
-
|
25
21
|
<% meta_tags.tags.each do |property, content| %>
|
26
22
|
<%= tag :meta, property: property, content: content %>
|
27
23
|
<% end %>
|
@@ -29,10 +25,12 @@
|
|
29
25
|
<%= yield_content :head %>
|
30
26
|
</head>
|
31
27
|
|
32
|
-
<body>
|
28
|
+
<body class="govuk-template__body">
|
29
|
+
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
30
|
+
|
33
31
|
<div class="app-pane">
|
34
32
|
<div class="app-pane__header toc-open-disabled">
|
35
|
-
<a href="#content" class="skip-link">Skip to main content</a>
|
33
|
+
<a href="#content" class="govuk-skip-link">Skip to main content</a>
|
36
34
|
|
37
35
|
<%= partial 'layouts/header' %>
|
38
36
|
</div>
|
@@ -78,5 +76,6 @@
|
|
78
76
|
</div>
|
79
77
|
|
80
78
|
<%= partial 'layouts/analytics' %>
|
79
|
+
<%= javascript_include_tag :application %>
|
81
80
|
</body>
|
82
81
|
</html>
|
data/package-lock.json
CHANGED
@@ -745,9 +745,9 @@
|
|
745
745
|
"dev": true
|
746
746
|
},
|
747
747
|
"govuk-frontend": {
|
748
|
-
"version": "3.
|
749
|
-
"resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.
|
750
|
-
"integrity": "sha512-
|
748
|
+
"version": "3.1.0",
|
749
|
+
"resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.1.0.tgz",
|
750
|
+
"integrity": "sha512-ozyG6ulmawzg3rsf9Efxcgj81mk4yzea3tfl0hgmXWILGC0/uEGj6A+g9pJ2ETgk78rgNlRLXDv0WvlaHd/LnA=="
|
751
751
|
},
|
752
752
|
"graceful-fs": {
|
753
753
|
"version": "4.2.0",
|
data/package.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
"lint": "standard"
|
7
7
|
},
|
8
8
|
"dependencies": {
|
9
|
-
"govuk-frontend": "3.
|
9
|
+
"govuk-frontend": "^3.1.0"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
12
|
"standard": "^13.0.2"
|
@@ -28,7 +28,8 @@
|
|
28
28
|
"_",
|
29
29
|
"Modernizr",
|
30
30
|
"history",
|
31
|
-
"ga"
|
31
|
+
"ga",
|
32
|
+
"GOVUKFrontend"
|
32
33
|
],
|
33
34
|
"ignore": [
|
34
35
|
"lib/assets/javascripts/_vendor/**"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_tech_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.pre.test.pre.release.pre.524
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Government Digital Service
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,34 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 4.0.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sprockets
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.0.0.beta10
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.0.0.beta10
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sass
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: middleman-syntax
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,14 +268,14 @@ dependencies:
|
|
240
268
|
requirements:
|
241
269
|
- - "~>"
|
242
270
|
- !ruby/object:Gem::Version
|
243
|
-
version: 3.
|
271
|
+
version: 3.11.5
|
244
272
|
type: :development
|
245
273
|
prerelease: false
|
246
274
|
version_requirements: !ruby/object:Gem::Requirement
|
247
275
|
requirements:
|
248
276
|
- - "~>"
|
249
277
|
- !ruby/object:Gem::Version
|
250
|
-
version: 3.
|
278
|
+
version: 3.11.5
|
251
279
|
- !ruby/object:Gem::Dependency
|
252
280
|
name: jasmine
|
253
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -359,38 +387,17 @@ files:
|
|
359
387
|
- lib/assets/javascripts/_vendor/lodash.js
|
360
388
|
- lib/assets/javascripts/_vendor/modernizr.js
|
361
389
|
- lib/assets/javascripts/govuk_tech_docs.js
|
362
|
-
- lib/assets/stylesheets/_accessibility.scss
|
363
390
|
- lib/assets/stylesheets/_core.scss
|
364
391
|
- lib/assets/stylesheets/_fonts.scss
|
365
392
|
- lib/assets/stylesheets/_govuk_tech_docs.scss
|
366
393
|
- lib/assets/stylesheets/_syntax-highlighting.scss
|
367
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_colours.scss
|
368
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_conditionals.scss
|
369
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_css3.scss
|
370
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_device-pixels.scss
|
371
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_font_stack.scss
|
372
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_grid_layout.scss
|
373
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_helpers.scss
|
374
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_measurements.scss
|
375
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_shims.scss
|
376
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_typography.scss
|
377
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/_url-helpers.scss
|
378
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/colours/_organisation.scss
|
379
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/colours/_palette.scss
|
380
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_alpha-beta.scss
|
381
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_breadcrumbs.scss
|
382
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_buttons.scss
|
383
|
-
- lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_media-player.scss
|
384
394
|
- lib/assets/stylesheets/modules/_anchored-heading.scss
|
385
395
|
- lib/assets/stylesheets/modules/_app-pane.scss
|
386
396
|
- lib/assets/stylesheets/modules/_collapsible.scss
|
387
397
|
- lib/assets/stylesheets/modules/_contribution-banner.scss
|
388
398
|
- lib/assets/stylesheets/modules/_footer.scss
|
389
|
-
- lib/assets/stylesheets/modules/_govuk-logo.scss
|
390
|
-
- lib/assets/stylesheets/modules/_header.scss
|
391
399
|
- lib/assets/stylesheets/modules/_page-review.scss
|
392
400
|
- lib/assets/stylesheets/modules/_search.scss
|
393
|
-
- lib/assets/stylesheets/modules/_skip-link.scss
|
394
401
|
- lib/assets/stylesheets/modules/_technical-documentation.scss
|
395
402
|
- lib/assets/stylesheets/modules/_toc.scss
|
396
403
|
- lib/assets/stylesheets/palette/_syntax-highlighting.scss
|
@@ -426,17 +433,10 @@ files:
|
|
426
433
|
- lib/source/favicon.ico
|
427
434
|
- lib/source/images/anchored-heading-icon-2x.png
|
428
435
|
- lib/source/images/anchored-heading-icon.png
|
429
|
-
- lib/source/images/gov.uk_logotype_crown-2x.png
|
430
|
-
- lib/source/images/gov.uk_logotype_crown.png
|
431
|
-
- lib/source/images/gov.uk_logotype_crown_invert_trans.png
|
432
|
-
- lib/source/images/govuk-crest-2x.png
|
433
|
-
- lib/source/images/govuk-crest.png
|
434
436
|
- lib/source/images/govuk-icn-close.png
|
435
437
|
- lib/source/images/govuk-icn-close@2x.png
|
436
438
|
- lib/source/images/govuk-icn-numbered-list.png
|
437
439
|
- lib/source/images/govuk-icn-numbered-list@2x.png
|
438
|
-
- lib/source/images/open-government-licence.png
|
439
|
-
- lib/source/images/open-government-licence_2x.png
|
440
440
|
- lib/source/images/search-result-caret.svg
|
441
441
|
- lib/source/layouts/_analytics.erb
|
442
442
|
- lib/source/layouts/_footer.erb
|
@@ -445,9 +445,14 @@ files:
|
|
445
445
|
- lib/source/layouts/_search.erb
|
446
446
|
- lib/source/layouts/core.erb
|
447
447
|
- lib/source/layouts/layout.erb
|
448
|
+
- lib/source/stylesheets/manifest.css
|
448
449
|
- node_modules/govuk-frontend/govuk/all-ie8.scss
|
449
450
|
- node_modules/govuk-frontend/govuk/all.js
|
450
451
|
- node_modules/govuk-frontend/govuk/all.scss
|
452
|
+
- node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff
|
453
|
+
- node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2
|
454
|
+
- node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2
|
455
|
+
- node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff
|
451
456
|
- node_modules/govuk-frontend/govuk/common.js
|
452
457
|
- node_modules/govuk-frontend/govuk/components/_all.scss
|
453
458
|
- node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss
|
@@ -579,7 +584,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
579
584
|
version: 1.3.1
|
580
585
|
requirements: []
|
581
586
|
rubyforge_project:
|
582
|
-
rubygems_version: 2.
|
587
|
+
rubygems_version: 2.7.7
|
583
588
|
signing_key:
|
584
589
|
specification_version: 4
|
585
590
|
summary: Gem to distribute the GOV.UK Tech Docs Template
|
@@ -1,81 +0,0 @@
|
|
1
|
-
// Media query helpers. These make producing IE layouts
|
2
|
-
// super easy.
|
3
|
-
|
4
|
-
// The base css you write should be for mobile. You can
|
5
|
-
// then add desktop styles on top.
|
6
|
-
//
|
7
|
-
// Usage:
|
8
|
-
//
|
9
|
-
// div.columns {
|
10
|
-
// border: 1px solid;
|
11
|
-
//
|
12
|
-
// @include media(desktop){
|
13
|
-
// width: 30%;
|
14
|
-
// float: left;
|
15
|
-
// }
|
16
|
-
// @include ie-lte(8) {
|
17
|
-
// something to fix visual bugs in old IE
|
18
|
-
// }
|
19
|
-
// @include ie(6) {
|
20
|
-
// padding: 0;
|
21
|
-
// }
|
22
|
-
// }
|
23
|
-
|
24
|
-
|
25
|
-
$is-ie: false !default;
|
26
|
-
$mobile-ie6: true !default;
|
27
|
-
|
28
|
-
$tablet-breakpoint: 641px !default;
|
29
|
-
$desktop-breakpoint: 769px !default;
|
30
|
-
|
31
|
-
@mixin media($size: false, $max-width: false, $min-width: false, $ignore-for-ie: false) {
|
32
|
-
@if $is-ie and ($ignore-for-ie == false) {
|
33
|
-
@if $size != mobile {
|
34
|
-
@if ($ie-version == 6 and $mobile-ie6 == false) or $ie-version > 6 {
|
35
|
-
@content;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
} @else {
|
39
|
-
@if $size == desktop {
|
40
|
-
@media (min-width: $desktop-breakpoint){
|
41
|
-
@content;
|
42
|
-
}
|
43
|
-
} @else if $size == tablet {
|
44
|
-
@media (min-width: $tablet-breakpoint){
|
45
|
-
@content;
|
46
|
-
}
|
47
|
-
} @else if $size == mobile {
|
48
|
-
@media (max-width: $tablet-breakpoint - 1px){
|
49
|
-
@content;
|
50
|
-
}
|
51
|
-
} @else if $max-width != false {
|
52
|
-
@media (max-width: $max-width){
|
53
|
-
@content;
|
54
|
-
}
|
55
|
-
} @else if $min-width != false {
|
56
|
-
@media (min-width: $min-width){
|
57
|
-
@content;
|
58
|
-
}
|
59
|
-
} @else {
|
60
|
-
@media (min-width: $size){
|
61
|
-
@content
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
@mixin ie-lte($version) {
|
68
|
-
@if $is-ie {
|
69
|
-
@if $ie-version <= $version {
|
70
|
-
@content;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
@mixin ie($version) {
|
76
|
-
@if $is-ie {
|
77
|
-
@if $ie-version == $version {
|
78
|
-
@content;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
}
|
@@ -1,90 +0,0 @@
|
|
1
|
-
// CSS 3 mixins
|
2
|
-
|
3
|
-
// This file includes mixins for CSS properties that require vendor prefixes.
|
4
|
-
|
5
|
-
// Please add more mixins here as you need them, rather than adding them to
|
6
|
-
// your application - this lets us manage them in one place.
|
7
|
-
|
8
|
-
// You can use the @warn directive to deprecate a mixin where the property
|
9
|
-
// no longer needs prefixes.
|
10
|
-
|
11
|
-
// This style of indentation is preferred as it is easier to scan
|
12
|
-
// Allow more than two spaces per indentation level and don't require a space after a colon
|
13
|
-
// scss-lint:disable Indentation SpaceAfterPropertyColon
|
14
|
-
|
15
|
-
@mixin border-radius($radius) {
|
16
|
-
-webkit-border-radius: $radius; // Chrome 4.0, Safari 3.1 to 4.0, Mobile Safari 3.2, Android Browser 2.1
|
17
|
-
-moz-border-radius: $radius; // Firefox 2.0 to 3.6
|
18
|
-
border-radius: $radius;
|
19
|
-
}
|
20
|
-
|
21
|
-
@mixin box-shadow($shadow) {
|
22
|
-
-webkit-box-shadow: $shadow; // Chrome 4.0 to 9.0, Safari 3.1 to 5.0, Mobile Safari 3.2 to 4.3, Android Browser 2.1 to 3.0
|
23
|
-
-moz-box-shadow: $shadow; // Firefox 3.5 to 3.6
|
24
|
-
box-shadow: $shadow;
|
25
|
-
}
|
26
|
-
|
27
|
-
@mixin scale($x, $y, $transform-origin: 50% 50% 0) {
|
28
|
-
// $x and $y should be numeric values without units
|
29
|
-
-webkit-transform: scale($x, $y); // Still in use now, started at: Chrome 4.0, Safari 3.1, Mobile Safari 3.2, Android 2.1
|
30
|
-
-moz-transform: scale($x, $y); // Firefox 3.5 to 15.0
|
31
|
-
-ms-transform: scale($x, $y); // IE9 only
|
32
|
-
transform: scale($x, $y);
|
33
|
-
|
34
|
-
-webkit-transform-origin: $transform-origin; // Chrome, Safari 3.1
|
35
|
-
-moz-transform-origin: $transform-origin; // Firefox 10 to 15.0
|
36
|
-
-ms-transform-origin: $transform-origin; // IE9
|
37
|
-
transform-origin: $transform-origin;
|
38
|
-
}
|
39
|
-
|
40
|
-
@mixin translate($x, $y) {
|
41
|
-
-webkit-transform: translate($x, $y); // Still in use now, started at: Chrome 4.0, Safari 3.1, Mobile Safari 3.2, Android 2.1
|
42
|
-
-moz-transform: translate($x, $y); // Firefox 3.5 to 15.0
|
43
|
-
-ms-transform: translate($x, $y); // IE9 only
|
44
|
-
-o-transform: translate($x, $y); // Opera 10.5 to 12.0
|
45
|
-
transform: translate($x, $y);
|
46
|
-
}
|
47
|
-
|
48
|
-
@mixin gradient($from, $to) {
|
49
|
-
// Creates a vertical gradient where $from is the colour at the top of the element
|
50
|
-
// and $to is the colour at the bottom. The top colour is used as a background-color
|
51
|
-
// for browsers that don't support gradients.
|
52
|
-
background-color: $from;
|
53
|
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); // Safari 4.0 to 5.1, Chrome 1.0 to 10.0, old deprecated syntax
|
54
|
-
background-image: -webkit-linear-gradient($from, $to); // Chrome 10.0 to 25.0, Safari 5.1 to 6.0, Mobile Safari 5.0 to 6.1, Android Browser 4.0 to 4.3
|
55
|
-
background-image: -moz-linear-gradient($from, $to); // Firefox 3.6 to 15.0
|
56
|
-
background-image: -o-linear-gradient($from, $to); // Opera 11.1 to 12.0
|
57
|
-
background-image: linear-gradient($from, $to);
|
58
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{$from}', endColorstr='#{$to}',GradientType=0 ); // IE6 to IE9
|
59
|
-
}
|
60
|
-
|
61
|
-
@mixin transition($property, $duration, $function, $delay: 0s) {
|
62
|
-
-webkit-transition: ($property $duration $function $delay); // Chrome 4.0 to 25.0, Safari 3.1 to 6.0, Mobile Safari 3.2 to 6.1, Android Browser 2.1 to 4.3
|
63
|
-
-moz-transition: ($property $duration $function $delay); // Firefox 4.0 to 15.0
|
64
|
-
-o-transition: ($property $duration $function $delay); // Opera 10.5 to 12.0
|
65
|
-
transition: ($property $duration $function $delay);
|
66
|
-
}
|
67
|
-
|
68
|
-
@mixin box-sizing($type) {
|
69
|
-
// http://www.w3.org/TR/css3-ui/#box-sizing
|
70
|
-
// $type can be one of: content-box | padding-box | border-box | inherit
|
71
|
-
-webkit-box-sizing: $type; // Chrome 4.0 to 9.0, Safari 3.1 to 5.0, Mobile Safari 3.2 to 4.3, Android Browser 2.1 to 3.0
|
72
|
-
-moz-box-sizing: $type; // Firefox 2.0 to 28.0, Firefox for Android 26.0 onwards
|
73
|
-
box-sizing: $type;
|
74
|
-
}
|
75
|
-
|
76
|
-
@mixin appearance($appearance) {
|
77
|
-
-webkit-appearance: $appearance;
|
78
|
-
-moz-appearance: $appearance;
|
79
|
-
}
|
80
|
-
|
81
|
-
@mixin calc($property, $calc) {
|
82
|
-
#{$property}: -webkit-calc(#{$calc}); // Chrome 19.0 to 25.0, Safari 6.0, Mobile Safari 6.0 to 6.1
|
83
|
-
#{$property}: calc(#{$calc});
|
84
|
-
}
|
85
|
-
|
86
|
-
@mixin opacity($trans) {
|
87
|
-
zoom: 1;
|
88
|
-
filter: unquote('alpha(opacity=' + ($trans * 100) + ')'); // IE6 to IE8
|
89
|
-
opacity: $trans;
|
90
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
@mixin device-pixel-ratio($ratio: 2) {
|
2
|
-
@media only screen and (-webkit-min-device-pixel-ratio: $ratio),
|
3
|
-
only screen and (min--moz-device-pixel-ratio: $ratio),
|
4
|
-
only screen and ( -o-min-device-pixel-ratio: #{($ratio*10)}/10),
|
5
|
-
only screen and ( min-device-pixel-ratio: $ratio),
|
6
|
-
only screen and ( min-resolution: #{($ratio*96)}dpi),
|
7
|
-
only screen and ( min-resolution: #{$ratio}dppx) {
|
8
|
-
@content;
|
9
|
-
}
|
10
|
-
}
|