problem when nesting objects

5 views
Skip to first unread message

Dave

unread,
Mar 3, 2010, 4:38:41 PM3/3/10
to xCSS - OO CSS framework
hi,
i'm new to xcss and have some problems in nesting objects.

that i actually want is something like that:

.class1 {
width: 100px;
position: relative;

.sc1 {
position: absolute;
}
.sc2 {
position: absolute;
left: 800px;
div {
margin-bottom: 10px;
}
a {
display: block;
}
}
}

the css-code that i get out is invalid and looks like this:
.class1 .sc2 a {
display: block;
}
.class1 .sc2 position: absolute;
left: 800px;
div {
margin-bottom: 10px;
}
.class1 width: 100px;
position: relative;

.sc1 {
position: absolute;
}


i tried to define the .class1 stuff outside, but then it got ignored.
same with the .sc2 stuff.

is there a good way how i can solve my issue?

thanks and greetings,
dave

Anton Pawlik

unread,
Mar 4, 2010, 3:46:36 AM3/4/10
to xc...@googlegroups.com
you need to use the self { } selector for this. please look into the docs.
Reply all
Reply to author
Forward
0 new messages