Skip to main content

narrowing_css

Function narrowing_css 

Source
pub fn narrowing_css(
    columns: &[Column<'_>],
    selector: &str,
    sizing: &Sizing<'_>,
    cutoff: Priority,
    opts: &Emit,
) -> String
Expand description

The rules that narrow selector to the columns kept at cutoff.

Both halves together: the shortened track list, and display: none on each dropped column by its own class. Nothing counts positions, so inserting a column changes what is emitted rather than changing which column vanishes.

selector may be a selector list. A descendant is appended to each part rather than to the whole, because appending to the whole changes what the earlier parts match: .head, .row > .col-x reads as “.head, or a .col-x inside .row”, so .head itself would be hidden.