No results

    Search failed

    npm GitHub

    Position

    Position

    Prefix: position. Property: position.

    Class CSS
    .position-static position: static
    .position-relative position: relative
    .position-absolute position: absolute
    .position-fixed position: fixed
    .position-sticky position: sticky

    Offset (px)

    Each side has its own single-letter prefix. Px-named values, emitted in rem โ€” see $rem-units.

    Prefix Property
    t top
    r right
    b bottom
    l left

    Positive scale โ€” $sizes: 0, 1, 2, 3, 4, 6, 8, 12, 14, 16, 24, 32, 40, 48, 56, 64, 80, 96, 128, 256

    .t-0               โ†’ top: 0
    .t-16              โ†’ top: 1rem
    .r-32              โ†’ right: 2rem
    .b-8               โ†’ bottom: 0.5rem
    .l-24              โ†’ left: 1.5rem

    Negative scale โ€” $negative-sizes: -1, -2, -3, -4, -8, -12, -14, -16, -24, -32, -40, -48, -56, -64

    The key includes the minus sign, producing a double-dash in the class name.

    .t--16             โ†’ top: -1rem
    .r--8              โ†’ right: -0.5rem
    .b--32             โ†’ bottom: -2rem
    .l--4              โ†’ left: -0.25rem

    Offset (%)

    Same four prefixes. Unit: %. A p suffix marks percentage classes.

    Positive % โ€” $percent-sizes: 5, 10, 15, 20, 25, 50, 75, 100

    .t-50p             โ†’ top: 50%
    .l-100p            โ†’ left: 100%
    .r-25p             โ†’ right: 25%

    Negative % โ€” $negative-percent-sizes: -25, -50, -75, -100

    Coarser than the positive list on purpose: negative percentage offsets are a centering trick (-50) and a full-bleed pull (-100), not a scale. Add the finer steps back in the config if a layout needs them.

    .t--50p            โ†’ top: -50%
    .l--100p           โ†’ left: -100%

    Inset

    Prefix: inset. Property: inset. Sets all four offsets at once โ€” a shorthand that complements the single-side t/r/b/l utilities.

    Uses the standard $sizes scale, plus $negative-sizes, positive percentages from $percent-sizes (p suffix), and auto. Responsive variants exist. Unlike the single-side t/r/b/l utilities, inset is not fed $negative-percent-sizes โ€” there is no .inset--50p.

    .inset-16          โ†’ inset: 1rem
    .inset--16         โ†’ inset: -1rem
    .inset-50p         โ†’ inset: 50%
    .inset-auto        โ†’ inset: auto
    .inset-md-16       โ†’ inset: 1rem  (min-width: 48rem)

    Logical inset (RTL-aware) โ€” opt-in

    Prefixes: inset-inline, inset-block. The physical inset above sets all four sides; these two set a writing-direction-aware pair, so they flip automatically under RTL โ€” the positioning counterpart to the logical .m-inline-* / .p-block-* spacing utilities.

    Off by default. They cost ~700 rules for a need most LTR projects never have, so they ship behind $logical-properties:

    @forward 'sulphuris/core/config' with ($logical-properties: true);
    Class pattern CSS property
    .inset-inline-{size} inset-inline (left + right in LTR)
    .inset-block-{size} inset-block (top + bottom)

    Same scales as inset: $sizes, $negative-sizes, $percent-sizes (p suffix), and auto. Responsive.

    .inset-inline-0    โ†’ inset-inline: 0
    .inset-block-16    โ†’ inset-block: 1rem
    .inset-inline--8   โ†’ inset-inline: -0.5rem
    .inset-block-50p   โ†’ inset-block: 50%
    .inset-inline-auto โ†’ inset-inline: auto
    .inset-block-md-16 โ†’ inset-block: 1rem  (min-width: 48rem)

    Z-index

    Prefix: z. Property: z-index.

    Scale: -1, 0, 1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 100

    .z-0               โ†’ z-index: 0
    .z-1               โ†’ z-index: 1
    .z-10              โ†’ z-index: 10
    .z--1              โ†’ z-index: -1
    .z-100             โ†’ z-index: 100

    Helpers (_misc.scss)

    Static single-purpose classes, no responsive variants.

    Absolute cover

    .absolute-cover    โ†’ position: absolute; top: 0; left: 0; width: 100%; height: 100%

    Absolute centering

    .absolute-center   โ†’ position: absolute; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0)
    .absolute-center-vertical   โ†’ position: absolute; top: 50%; transform: translateY(-50%)
    .absolute-center-horizontal โ†’ position: absolute; left: 50%; transform: translateX(-50%)

    Background sizing

    .bg-cover          โ†’ background-size: cover; background-position: center; background-repeat: no-repeat
    .bg-contain        โ†’ background-size: contain; background-position: center; background-repeat: no-repeat

    Object fit

    .object-fill       โ†’ object-fit: fill
    .object-contain    โ†’ object-fit: contain
    .object-cover      โ†’ object-fit: cover

    Pointer events

    .events-none       โ†’ pointer-events: none
    .events-all        โ†’ pointer-events: all
    .events-auto       โ†’ pointer-events: auto

    Scrollbar

    .hide-native-scrollbar   โ†’ hides scrollbar (scrollbar-width: none + ::-webkit-scrollbar)

    Misc

    .appearance-none   โ†’ -webkit-appearance: none; appearance: none
    .no-select         โ†’ user-select: none (plus -webkit- for older Safari)
    .sr-only           โ†’ screen-reader-only accessible hide (clip + clip-path + 1px)
    .content-box       โ†’ box-sizing: content-box  (overrides global border-box reset)

    Note

    [hidden] receives display: none !important and * { box-sizing: border-box } is set globally via the misc reset โ€” these are not utility classes.

    Responsive

    All offset, position and z-index classes generate responsive variants. Insert a breakpoint name between the prefix and the size key.

    Pattern: .{prefix}-{bp}-{key}

    .position-md-absolute  โ†’ position: absolute   (min-width: 48rem)
    .t-lg-32               โ†’ top: 2rem            (min-width: 64rem)
    .t-md--16              โ†’ top: -1rem           (min-width: 48rem)
    .l-xl-50p              โ†’ left: 50%            (min-width: 85.375rem)
    .z-md-10               โ†’ z-index: 10          (min-width: 48rem)

    Breakpoints (all min-width):

    Name Min-width
    sm 26.25rem (420px)
    md 48rem (768px)
    lg 64rem (1024px)
    xl 85.375rem (1366px)
    xxl 105rem (1680px)

    Note

    Classes without a breakpoint segment apply at all viewport widths. Responsive variants layer on top via min-width media queries, so the base class is the mobile-first default.