Dash selector issue

9 views
Skip to first unread message

Z

unread,
Jan 12, 2010, 5:35:52 PM1/12/10
to xCSS - OO CSS framework
.some-selector { some:prop; }
.some-selector-more { some:proop; }

.parent {
self extends .some-selector {
height:auto
}

.children {
self extends .some-selector-more {
height:auto
}
}
}

Compiled to this:

.parent .children,
.parent-more,
.some-selector-more {
some: proop;
}
.parent,
.some-selector {
some: prop;
}
...

Where the hell that .parent-more selector comes from?

Compiled with the online-compiler.

Z

unread,
Jan 12, 2010, 5:40:10 PM1/12/10
to xCSS - OO CSS framework
I'm sorry it is not with the dash caracter.
.some_selector_more => .parent_more
.someselectormore => .parentmore

Anton Pawlik

unread,
Jan 13, 2010, 3:32:39 AM1/13/10
to xc...@googlegroups.com
Hey, its because the names .some-selector .some-selector-more are to similar. try to give the different names and it will work as you expect.

Z

unread,
Jan 13, 2010, 6:04:47 PM1/13/10
to xCSS - OO CSS framework
Jeah I figured it, but you say this is how it supposed to work?
It's a it confusing, but I know now I'll be carefull.

Thans.

Anton Pawlik

unread,
Jan 14, 2010, 4:11:41 AM1/14/10
to xCSS - OO CSS framework
to fix the similar name issue i would need to parse the extends with a
regular expression which will make things slow. I'm not even sure if i
could
write one that does this job right. its also don't have an impact on
your
outcome css, sure the compiled css looks wired but it will still
behave in
the right way. the unnecessary added classes doesn't do any harm to
your
layout because you dont use them.
Reply all
Reply to author
Forward
0 new messages