propublica/column-setter

Feature request: expressions in `colspan()` arguments?

Opened this issue · 0 comments

beep commented

Something that came up when working on the “Get Involved” module: when padding is applied to a container, it adds quite a bit of complexity to inner colspan() calculations. Just e.g.,

.promo-get-involved .brief-thumb {
    float: left;
    width: ( colspan( 1, 4 ) - colspan( p, 4 ) ) + colspan( p, 12 );
    @include breakpoint-range(sm, lg) {
        float: right;
        margin-left: $scale-5;
        width: 25%;
    }
}

One possible solution for this—though probably not the only one!—would be to allow the two colspan() arguments to accept expressions, like so

colspan( 1 - g, 4 - p )

I realize that, uh, would probably get pretty complicated pretty quickly, but thought I’d mention it as a possibility.