             segment_rect.size = vec2(border.widths.x, corners.bl_inner.y - corners.tl_inner.y);
             vec4 adjusted_widths = get_effective_border_widths(border, int(border.style.x));
             write_edge_distance(segment_rect.p0.x, border.widths.x, adjusted_widths.x, border.style.x, 0.0, 1.0);
-            write_alpha_select(border.style.x);
-            write_color(color, border.style.x, false);
+            style = border.style.x;
+            color_flip = false;
             write_clip_params(border.style.x,
                               border.widths.x,
                               segment_rect.size.y,

    // TODO(gw): Now that all border styles are supported, the switch
    //           statement below can be tidied up quite a bit.

    RectWithSize segment_rect;
    switch (sub_part) {
        case 0: {

            segment_rect.size = vec2(corners.tr_inner.x - corners.tl_inner.x, border.widths.y);
            vec4 adjusted_widths = get_effective_border_widths(border, int(border.style.y));
            write_edge_distance(segment_rect.p0.y, border.widths.y, adjusted_widths.y, border.style.y, 1.0, 1.0);
            style = border.style.y;
            color_flip = false;
            write_clip_params(border.style.y,
                              border.widths.y,
                              segment_rect.size.x,
