neat icon indicating copy to clipboard operation
neat copied to clipboard

omega(3n+1) evaluates to :nth-child(4n) in css

Open ZeroMax-dev opened this issue 11 years ago • 5 comments

I want to take a certain element in my grid out of the layout (e.g. with position:absolute) with the html staying the same. For that I need to add an offset to the omega-mixin so that the following elements are still treated correctly. The omega-mixin however does not regard the offset value correctly.

.option {
    @include omega(3n+1);
}

translates to:

.option:nth-child(4n) {
    margin-right: 0;
}

.option:nth-child(4n+1) {
    clear: left;
}

in css, but should be:

.option:nth-child(3n+1) {
    margin-right: 0;
}

.option:nth-child(3n+2) {
    clear: left;
}

I am using neat 1.7.1

ZeroMax-dev avatar Apr 14 '15 08:04 ZeroMax-dev

Yep that looks bugged. Omega also sets the clear so watch out if you're using it to do some absolute placement. You may want to do that just using your own nth-child.

wardpenney avatar Apr 15 '15 13:04 wardpenney

Could be fixed together with #318

wardpenney avatar Apr 15 '15 17:04 wardpenney

Added a possible fix in #340, if you would like to take a look.

joshuaogle avatar Apr 27 '15 22:04 joshuaogle

+1

jonnykates avatar Sep 23 '15 15:09 jonnykates

Seems like this has been fixed.

closing for now

whmii avatar Jul 05 '16 21:07 whmii