diff --git a/components/00_Tools/_bemGenerator.styl b/components/00_Tools/_bemGenerator.styl index 48ff5a4..a22a9ab 100644 --- a/components/00_Tools/_bemGenerator.styl +++ b/components/00_Tools/_bemGenerator.styl @@ -102,11 +102,13 @@ RV-Level(name, name_delimiter, allowed_parent_levels, selector_callback, squash_ if squash_if_parent_nested && is_any_parent_nested() {block} else - {selector_callback(name)} + selector_name = selector_callback(name) + if name == '' + selector_name = split(name_delimiter, selector_name)[0] + {selector_name} {block} - RV-Block(name) .{name} {block} @@ -114,6 +116,10 @@ RV-Block(name) _bem_context._alias_map = {} _bem_context._alias_stacks = {} +RV-Block--shorthand(name) + +RV-Block(name) + {block} + RV-Element(name=null) +RV-Level(name, '__', ('RV-Block' 'RV-Block--modifier'), @(name){ if is_nested_in('RV-Block--modifier') { @@ -131,7 +137,11 @@ RV-Element--modifier(name=null) {block} RV-Block--modifier(name=null) - +RV-Level(name, '--', ('RV-Block'), @(name){return '&--' + name}, true) + +RV-Level(name, '--', ('RV-Block' 'RV-Block--shorthand'), @(name){return '&--' + name}, true) + if is_nested_in('RV-Block--shorthand') && length(called-from) > 0 + mixin_name = split('--', called-from[0])[0] + p(mixin_name) + convert(unquote(mixin_name)+'()') {block} RV-Squash() diff --git a/components/02_ContentShape/alignment/_alignment.styl b/components/02_ContentShape/alignment/_alignment.styl index 2b39d4e..0f4c46c 100644 --- a/components/02_ContentShape/alignment/_alignment.styl +++ b/components/02_ContentShape/alignment/_alignment.styl @@ -30,7 +30,7 @@ RV-Alignment--center() align-items center justify-content center -+RV-Block('RV-Alignment') ++RV-Block--shorthand('RV-Alignment') RV-Alignment() RV-Alignment--top() diff --git a/components/02_ContentShape/alignment/alignment.hbs b/components/02_ContentShape/alignment/alignment.hbs index ecef8b9..72d9b7d 100644 --- a/components/02_ContentShape/alignment/alignment.hbs +++ b/components/02_ContentShape/alignment/alignment.hbs @@ -7,37 +7,37 @@
Aligned Top
Aligned Left
Aligned Bottom
Aligned Right
Aligned v center
Aligned
h
center
diff --git a/components/02_ContentShape/aspectRatio/_aspectRatio.styl b/components/02_ContentShape/aspectRatio/_aspectRatio.styl index 65ceee5..1866367 100644 --- a/components/02_ContentShape/aspectRatio/_aspectRatio.styl +++ b/components/02_ContentShape/aspectRatio/_aspectRatio.styl @@ -51,7 +51,7 @@ RV-AspectRatio() bottom 0 right 0 -+RV-Block('RV-AspectRatio') ++RV-Block--shorthand('RV-AspectRatio') RV-AspectRatio() RV-AspectRatio--1to2() diff --git a/components/02_ContentShape/aspectRatio/aspectRatio.hbs b/components/02_ContentShape/aspectRatio/aspectRatio.hbs index a01d61c..ba4048b 100644 --- a/components/02_ContentShape/aspectRatio/aspectRatio.hbs +++ b/components/02_ContentShape/aspectRatio/aspectRatio.hbs @@ -1,11 +1,11 @@ {{#if modifier}} - + {{else}}You could see there was text coming out of her eyes, text coming out of her wherever. . Does everybody know that pig named Lorem Ipsum? She's a disgusting pig, right? When other websites give you text, they’re not sending the best. They’re not sending you, they’re sending words that have lots of problems and they’re bringing those problems with us. They’re bringing mistakes. They’re bringing misspellings. They’re typists… And some, I assume, are good words. I'm speaking with myself, number one, because I have a very good brain and I've said a lot of things. Podcasting operational change management inside of workflows to establish a framework. Taking seamless key performance indicators offline to maximise the long tail. Keeping your eye on the ball while performing a deep dive on the start-up mentality to derive convergence on cross-platform integration.