modernizr-mixin 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/modernizr-mixin.rb +2 -2
- data/stylesheets/_modernizr.scss +27 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2507428209b3f331a437afa32d6002e3c2e97a3e
|
4
|
+
data.tar.gz: 6b553259349a3bbba48d74b4d835dcec49ae1061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aed4dfff31d3a6daab8dd4cc9bc5194873f79a4be45e76a61df019e1744210b3475e16a94ff30abcc6f9a28b27c10a2ada6fb874b4d8dcead7f56cbe4808855a
|
7
|
+
data.tar.gz: 18f13c57d4ef52937004660d0a2582bbf08ed0d44e7ecc2c8fd0bcc04f1774cf1944168b84bf0ab44eee2e7e6cb006e78fddb6b048489a67c3ae93e406078156
|
data/lib/modernizr-mixin.rb
CHANGED
data/stylesheets/_modernizr.scss
CHANGED
@@ -8,16 +8,17 @@
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Prints classes for supported or unsupported features
|
11
|
-
*
|
11
|
+
*
|
12
12
|
* @access private
|
13
|
-
*
|
13
|
+
*
|
14
14
|
* @param {Bool} $supports - Whether to check for supported features or not
|
15
15
|
* @param {ArgList} $features - List of features
|
16
|
-
*
|
17
|
-
* @throws
|
16
|
+
*
|
17
|
+
* @throws `Modernizr mixin should be called within a selector.`
|
18
|
+
* @throws `$feature` is not a `string` for `modernizr.`
|
18
19
|
*/
|
19
20
|
|
20
|
-
@mixin
|
21
|
+
@mixin _modernizr($supports, $features...) {
|
21
22
|
|
22
23
|
// Use the 'no-' prefix if checking for unsuported features (e.g. `.no-translate3d`)
|
23
24
|
$prefix: if($supports, '', 'no-');
|
@@ -38,7 +39,7 @@
|
|
38
39
|
// Making sure $feature is a string
|
39
40
|
@if type-of($feature) != string {
|
40
41
|
|
41
|
-
@error '`#{$feature} is not a string for `modernizr
|
42
|
+
@error '`#{$feature} is not a string for `modernizr`.';
|
42
43
|
|
43
44
|
} @else {
|
44
45
|
|
@@ -70,19 +71,23 @@
|
|
70
71
|
|
71
72
|
/**
|
72
73
|
* Prints classes for supported features
|
73
|
-
*
|
74
|
+
*
|
74
75
|
* @requires modernizr
|
75
|
-
*
|
76
|
+
*
|
76
77
|
* @access public
|
77
|
-
*
|
78
|
+
*
|
78
79
|
* @param {ArgList} $features - List of features
|
79
|
-
*
|
80
|
+
*
|
80
81
|
* @example scss
|
81
|
-
* .my-selector {
|
82
|
+
* .my-selector {
|
83
|
+
* @include yep(opacity, csstransforms) {
|
84
|
+
* // ...
|
85
|
+
* }
|
86
|
+
* }
|
82
87
|
*/
|
83
88
|
|
84
89
|
@mixin yep($features...) {
|
85
|
-
@include
|
90
|
+
@include _modernizr(true, $features...) {
|
86
91
|
@content;
|
87
92
|
}
|
88
93
|
}
|
@@ -94,19 +99,23 @@
|
|
94
99
|
/**
|
95
100
|
* Nope “alias”
|
96
101
|
* Prints classes for unsupported features and lack of JS
|
97
|
-
*
|
102
|
+
*
|
98
103
|
* @requires modernizr
|
99
|
-
*
|
104
|
+
*
|
100
105
|
* @access public
|
101
|
-
*
|
106
|
+
*
|
102
107
|
* @param {ArgList} $features - List of features
|
103
|
-
*
|
108
|
+
*
|
104
109
|
* @example scss
|
105
|
-
* .my-selector {
|
110
|
+
* .my-selector {
|
111
|
+
* @include nope(opacity, csstransforms) {
|
112
|
+
* // ...
|
113
|
+
* }
|
114
|
+
* }
|
106
115
|
*/
|
107
116
|
|
108
117
|
@mixin nope($features...) {
|
109
|
-
@include
|
118
|
+
@include _modernizr(false, $features...) {
|
110
119
|
@content;
|
111
120
|
}
|
112
121
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modernizr-mixin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Guillan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|