Removin old Code
This commit is contained in:
parent
39d72a111f
commit
bbe4f65eae
@ -164,10 +164,10 @@ RV-Block(name=null)
|
||||
return '.'+name
|
||||
}, name)
|
||||
{block}
|
||||
|
||||
_bem_context._alias_map = {}
|
||||
_bem_context._alias_stacks = {}
|
||||
_bem_context.known_names = {}
|
||||
if not is_nested('RV-Block')
|
||||
_bem_context._alias_map = {}
|
||||
_bem_context._alias_stacks = {}
|
||||
_bem_context.known_names = {}
|
||||
|
||||
|
||||
RV-Block--shorthand(name)
|
||||
@ -184,7 +184,7 @@ RV-Element(name=null)
|
||||
RV-Element--modifier(name=null)
|
||||
+RV-Level('--', @(name){
|
||||
return '&--'+name
|
||||
}, name, ('RV-Block--modifier'))
|
||||
}, name)
|
||||
{block}
|
||||
|
||||
RV-Block--modifier(name=null)
|
||||
@ -192,65 +192,3 @@ RV-Block--modifier(name=null)
|
||||
return '&--'+name
|
||||
}, name)
|
||||
{block}
|
||||
|
||||
RV-Squash()
|
||||
{block}
|
||||
|
||||
|
||||
|
||||
_level_types = {
|
||||
'': {
|
||||
name: 'block',
|
||||
selector: @(mixin_name, level_name){return '.'+level_name}
|
||||
},
|
||||
'__': {
|
||||
name: 'element',
|
||||
selector: @(mixin_name, level_name){return '&__'+level_name}
|
||||
},
|
||||
'--': {
|
||||
name: 'modifier',
|
||||
selector: @(mixin_name, level_name){return '&--'+level_name}
|
||||
},
|
||||
}
|
||||
|
||||
get_first_level_name(mixin_name)
|
||||
shortest_split = null
|
||||
for delimiter, level_type in _level_types
|
||||
if length(delimiter) > 0
|
||||
current_split = split(delimiter, mixin_name)[0]
|
||||
if shortest_split == null || length(current_split) <= length(shortest_split)
|
||||
shortest_split = current_split
|
||||
|
||||
return shortest_split
|
||||
|
||||
generate_selector(mixin_name)
|
||||
candidate = null
|
||||
candidate_level = null
|
||||
|
||||
// This is why humanity is doomed
|
||||
mixin_name = split('äöü', mixin_name)[0]
|
||||
for delimiter, level in _level_types
|
||||
if length(delimiter) <= 0
|
||||
splited_level = mixin_name
|
||||
else
|
||||
splited_level = split(delimiter, mixin_name)[-1]
|
||||
if candidate == null || length(candidate) > length(splited_level)
|
||||
candidate = splited_level
|
||||
candidate_level = level
|
||||
|
||||
fn = candidate_level.selector
|
||||
return fn(mixin_name, candidate)
|
||||
|
||||
//generate_selector(mixin_name)
|
||||
// block_name = get_first_level_name(mixin_name)
|
||||
// level_info = determine_level_type(mixin_name)
|
||||
// return '&%s%s' % (level_info[2] level_info[0])
|
||||
|
||||
|
||||
RV-BEM()
|
||||
call_stack = split(' ', ''+called-from)
|
||||
if is_contigious(call_stack)
|
||||
{generate_selector(call_stack[0])}
|
||||
{block}
|
||||
else
|
||||
{block}
|
Loading…
Reference in New Issue
Block a user