bem-constructor 0.4.0 → 0.5.0
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/CHANGELOG.md +17 -0
- data/README.md +3 -3
- data/lib/bem-constructor.rb +1 -1
- data/stylesheets/_error-checks.scss +1 -1
- data/stylesheets/logger/_modifier-logger.scss +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a56921a733d69fc1129bea43b5e8f0a0805ee386
|
4
|
+
data.tar.gz: 2b7e70b6b6a5a674f9ac9e856052217875a4da98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9caeb0c37c37993e495f0431647a72cb97a5b060538daa363412d1569cbf8b95d2a09b1b07abfd2105f7e8c5c33c63227634a7638ba74be06cdb105025418341
|
7
|
+
data.tar.gz: 9d522d5583b98f6d65fc3a1dda02a4c19b6b5c6f116fda813d089da3fae5970fac54d3806005aa122b299bdc249ff1331f7f29694d5a54af1d5be8ae12b4ea4b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
## 0.4
|
2
|
+
|
3
|
+
* Improved modifies-element() output using direct child selector.
|
4
|
+
* Fix bug in scope: it's now impossible to create a scope within a block.
|
5
|
+
* Fix bug in error-checking function.
|
6
|
+
* Added more tests. Cleaned up and improved existing ones.
|
7
|
+
|
8
|
+
## 0.3.2
|
9
|
+
|
10
|
+
* Add tests for constructor errors
|
11
|
+
|
12
|
+
* Fix version in bower.json
|
13
|
+
|
14
|
+
## 0.3.1
|
15
|
+
|
16
|
+
* Fix version in bower.json
|
17
|
+
|
1
18
|
## 0.3
|
2
19
|
|
3
20
|
* Single file dist build
|
data/README.md
CHANGED
@@ -252,13 +252,13 @@ The compiled CSS:
|
|
252
252
|
.o-burger--veggie { texture: smooth; }
|
253
253
|
|
254
254
|
/* Veggie Burger block modifier modifies the Meat element too */
|
255
|
-
.o-burger--veggie .o-burger__meat { type: lentils; }
|
255
|
+
.o-burger--veggie > .o-burger__meat { type: lentils; }
|
256
256
|
|
257
257
|
/* Veggie Burger block modifier modifies the Extra Topping element too */
|
258
|
-
.o-burger--veggie .o-burger__extra-topping { ingredient: avocado; }
|
258
|
+
.o-burger--veggie > .o-burger__extra-topping { ingredient: avocado; }
|
259
259
|
|
260
260
|
/* But as hackers we couldn't resist the urge to add some Bacon back */
|
261
|
-
.
|
261
|
+
.o-burger--veggie > ._o-burger__extra-topping { ingredient: bacon; }
|
262
262
|
|
263
263
|
/* When the party Theme is Mexican, we make everything spicy */
|
264
264
|
.t-mexican .o-burger { spicy: hell-yeah; }
|
data/lib/bem-constructor.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
// 1. Within
|
10
10
|
// -----------------------------------------------------------------------------
|
11
11
|
|
12
|
-
/// Checks that it's being created within
|
12
|
+
/// Checks that it's being created within any of the passed $objs...
|
13
13
|
@function _should-be-called-within($objs...) {
|
14
14
|
|
15
15
|
@each $obj in $objs {
|
@@ -30,13 +30,13 @@
|
|
30
30
|
@function _bem-log-modifier($modifiers...) {
|
31
31
|
|
32
32
|
// Check if the modifier has already been defined for the current block or element
|
33
|
-
@if modifier-exists($modifiers...) {
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
// @if modifier-exists($modifiers...) {
|
34
|
+
// @if $bem-throw-errors {
|
35
|
+
// @error 'One or more elements from `#{inspect($modifiers)}` have already been created';
|
36
|
+
// }
|
37
37
|
|
38
|
-
|
39
|
-
}
|
38
|
+
// @return false;
|
39
|
+
// }
|
40
40
|
|
41
41
|
// Find the current block name
|
42
42
|
$current-block-name: map-get(map-get($_bem-current-context, 'block'), 'name');
|