bem-constructor 0.5.0 → 0.6.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 +4 -0
- data/README.md +2 -2
- data/lib/bem-constructor.rb +1 -1
- data/stylesheets/_hack.scss +6 -1
- data/stylesheets/_theme.scss +6 -1
- 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: c7179af78fa5e624deeb99f2549f9c8f7e130042
|
4
|
+
data.tar.gz: 9be37fcb72a9444b7cd0fb5fbfe69df90d4fa671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5334040c1ba129b10ca6ca9752195e70447c7326f2d95c383b1f4fe18cc185261a2a933e73776372893706b80c2f7dda713e4b6b532c73b24da2dfc9674bbae9
|
7
|
+
data.tar.gz: dd4fdd4bf105b002e1400a8fd691908a5be211a4a38a27083d975a31457b3128fb0d9c1b9de0d5394254d1adbfc8b7f03a1ee45a1a95f76dd20c91e2ada4768b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# BEM Constructor [](https://travis-ci.org/danielguillan/bem-constructor)
|
1
|
+
# BEM Constructor [](https://travis-ci.org/danielguillan/bem-constructor) [](http://badge.fury.io/bo/bem-constructor) [](http://badge.fury.io/rb/bem-constructor)
|
2
2
|
|
3
3
|
BEM Constructor is a Sass library for building immutable and namespaced BEM-style CSS objects.
|
4
4
|
|
@@ -17,7 +17,7 @@ Some CSS objects in your project shouldn't be able to change (mutate). They have
|
|
17
17
|
|
18
18
|
### 2. Namespacing
|
19
19
|
|
20
|
-
Objects have a clear function. Whether they are components, utilities
|
20
|
+
Objects have a clear function. Whether they are components, utilities, or dirty hacks, we need a consistent way of telling them apart. By namespacing objects, our UI code becomes more transparent and understandable. BEM Constructor supports the following object types:
|
21
21
|
|
22
22
|
- Objects
|
23
23
|
- Components
|
data/lib/bem-constructor.rb
CHANGED
data/stylesheets/_hack.scss
CHANGED
@@ -23,7 +23,12 @@ $hack-namespace: '_' !default;
|
|
23
23
|
@function _hack() {
|
24
24
|
|
25
25
|
// You may not hack a hack
|
26
|
-
$
|
26
|
+
$outside-check: _should-not-be-called-within('hack');
|
27
|
+
|
28
|
+
// Return false in case error throwing is disabled
|
29
|
+
@if $outside-check == false {
|
30
|
+
@return false;
|
31
|
+
}
|
27
32
|
|
28
33
|
$selector: ();
|
29
34
|
$namespace: if($bem-use-namespaces, $hack-namespace, '');
|
data/stylesheets/_theme.scss
CHANGED
@@ -8,7 +8,12 @@ $bem-theme-namespace: 't' !default;
|
|
8
8
|
|
9
9
|
// If you try to hack a hack you can break the internet.
|
10
10
|
// So please, no one try it.
|
11
|
-
$
|
11
|
+
$outside-check: _should-not-be-called-within('theme');
|
12
|
+
|
13
|
+
// Return false in case error throwing is disabled
|
14
|
+
@if $outside-check == false {
|
15
|
+
@return false;
|
16
|
+
}
|
12
17
|
|
13
18
|
$selector: ();
|
14
19
|
$namespace: if($bem-use-namespaces, $bem-theme-namespace + '-', '');
|