Width
Set the width for an element.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
w-0width: 0;w-1width: .25rem;w-2width: .5rem;w-3width: .75rem;w-4width: 1rem;w-5width: 1.25rem;w-6width: 1.5rem;w-7width: 1.75rem;w-8width: 2rem;w-9width: 2.25rem;w-10width: 2.5rem;w-11width: 2.75rem;w-12width: 3rem;w-13width: 3.25rem;w-14width: 3.5rem;w-15width: 3.75rem;w-16width: 4rem;w-17width: 4.25rem;w-18width: 4.5rem;w-19width: 4.75rem;w-20width: 5rem;w-21width: 5.25rem;w-22width: 5.5rem;w-23width: 5.75rem;w-24width: 6rem;w-25width: 6.25rem;w-26width: 6.5rem;w-27width: 6.75rem;w-28width: 7rem;w-29width: 7.25rem;w-30width: 7.5rem;w-31width: 7.75rem;w-32width: 8rem;w-33width: 8.25rem;w-34width: 8.5rem;w-35width: 8.75rem;w-36width: 9rem;w-37width: 9.25rem;w-38width: 9.5rem;w-39width: 9.75rem;w-40width: 10rem;w-41width: 10.25rem;w-42width: 10.5rem;w-43width: 10.75rem;w-44width: 11rem;w-45width: 11.25rem;w-46width: 11.5rem;w-47width: 11.75rem;w-48width: 12rem;w-49width: 12.25rem;w-50width: 12.5rem;w-51width: 12.75rem;w-52width: 13rem;w-53width: 13.25rem;w-54width: 13.5rem;w-55width: 13.75rem;w-56width: 14rem;w-57width: 14.25rem;w-58width: 14.5rem;w-59width: 14.75rem;w-60width: 15rem;w-61width: 15.25rem;w-62width: 15.5rem;w-63width: 15.75rem;w-64width: 16rem;w-65width: 16.25rem;w-66width: 16.5rem;w-67width: 16.75rem;w-68width: 17rem;w-69width: 17.25rem;w-70width: 17.5rem;w-71width: 17.75rem;w-72width: 18rem;w-73width: 18.25rem;w-74width: 18.5rem;w-75width: 18.75rem;w-76width: 19rem;w-77width: 19.25rem;w-78width: 19.5rem;w-79width: 19.75rem;w-80width: 20rem;w-81width: 20.25rem;w-82width: 20.5rem;w-83width: 20.75rem;w-84width: 21rem;w-85width: 21.25rem;w-86width: 21.5rem;w-87width: 21.75rem;w-88width: 22rem;w-89width: 22.25rem;w-90width: 22.5rem;w-91width: 22.75rem;w-92width: 23rem;w-93width: 23.25rem;w-94width: 23.5rem;w-95width: 23.75rem;w-96width: 24rem;w-97width: 24.25rem;w-98width: 24.5rem;w-99width: 24.75rem;w-100width: 25rem;w-autowidth: auto;w-dvhwidth: 100dvh;w-dvwwidth: 100dvw;w-vhwidth: 100vh;w-vwwidth: 100vw;w-viwidth: 100vi;w-vbwidth: 100vb;w-svhwidth: 100svh;w-svwwidth: 100svw;w-lvhwidth: 100lvh;w-lvwwidth: 100lvw;w-vminwidth: 100vmin;w-vmaxwidth: 100vmax;w-fcwidth: fit-content;w-fullwidth: 100%;w-halfwidth: 50%;w-maxwidth: max-content;w-minwidth: min-content;w-pxwidth: 1px;w-swidth: stretch;w-smwidth: 40rem;w-mdwidth: 48rem;w-lgwidth: 64rem;w-xlwidth: 80rem;w-xxlwidth: 96rem;Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:w-*Small≥640px
md:w-*Medium≥768px
lg:w-*Large≥1024px
xxl:w-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:w-*Negative Values
Use negative variants to apply negative width values.
Use the -- syntax to apply negative numeric values.
Syntax:
w--*