typescriptcssv0.1
Docs
Documentation

Write styles as TypeScript, ship them as CSS.

typescriptcss lets you author Tailwind-like utilities as inline style chains. There is no CSS file to maintain and no class names to invent — the build step collects every chain, removes duplicates, and emits the stylesheet for you.

Getting Started

Core Concepts

Layout

aspect-ratioUtilities for controlling the aspect ratio of an element.columnsUtilities for controlling the number of columns within an element.break-afterUtilities for controlling how a column or page should break after an element.break-beforeUtilities for controlling how a column or page should break before an element.break-insideUtilities for controlling how a column or page should break within an element.box-decoration-breakUtilities for controlling how element fragments should be rendered across multiple lines, columns, or pages.box-sizingUtilities for controlling how the browser should calculate an element's total size.displayUtilities for controlling the display box type of an element.floatUtilities for controlling the wrapping of content around an element.clearUtilities for controlling the wrapping of content around an element.isolationUtilities for controlling whether an element should explicitly create a new stacking context.object-fitUtilities for controlling how a replaced element's content should be resized.object-positionUtilities for controlling how a replaced element's content should be positioned within its container.overflowUtilities for controlling how an element handles content that is too large for the container.overscroll-behaviorUtilities for controlling how the browser behaves when reaching the boundary of a scrolling area.positionUtilities for controlling how an element is positioned in the document.top / right / bottom / leftUtilities for controlling the placement of positioned elements.visibilityUtilities for controlling the visibility of an element.z-indexUtilities for controlling the stack order of an element.

Flexbox & Grid

flex-basisUtilities for controlling the initial size of flex items.flex-directionUtilities for controlling the direction of flex items.flex-wrapUtilities for controlling how flex items wrap.flexUtilities for controlling how flex items both grow and shrink.flex-growUtilities for controlling how flex items grow.flex-shrinkUtilities for controlling how flex items shrink.orderUtilities for controlling the order of flex and grid items.grid-template-columnsUtilities for specifying the columns in a grid layout.grid-columnUtilities for controlling how elements are sized and placed across grid columns.grid-template-rowsUtilities for specifying the rows in a grid layout.grid-rowUtilities for controlling how elements are sized and placed across grid rows.grid-auto-flowUtilities for controlling how elements in a grid are auto-placed.grid-auto-columnsUtilities for controlling the size of implicitly-created grid columns.grid-auto-rowsUtilities for controlling the size of implicitly-created grid rows.gapUtilities for controlling gutters between grid and flexbox items.justify-contentUtilities for controlling how flex and grid items are positioned along a container's main axis.justify-itemsUtilities for controlling how grid items are aligned along their inline axis.justify-selfUtilities for controlling how an individual grid item is aligned along its inline axis.align-contentUtilities for controlling how rows are positioned in multi-row flex and grid containers.align-itemsUtilities for controlling how flex and grid items are positioned along a container's cross axis.align-selfUtilities for controlling how an individual flex or grid item is positioned along its container's cross axis.place-contentUtilities for controlling how content is justified and aligned at the same time.place-itemsUtilities for controlling how items are justified and aligned at the same time.place-selfUtilities for controlling how an individual item is justified and aligned at the same time.

Spacing

Sizing

Typography

font-familyUtilities for controlling the font family of an element.font-sizeUtilities for controlling the font size of an element.font-smoothingUtilities for controlling the font smoothing of an element.font-styleUtilities for controlling the style of text.font-weightUtilities for controlling the font weight of an element.font-stretchUtilities for selecting the width of a font face.font-variant-numericUtilities for controlling the variant of numbers.font-feature-settingsUtilities for controlling advanced typographic features.letter-spacingUtilities for controlling the tracking, or letter spacing, of an element.line-clampUtilities for clamping text to a specific number of lines.line-heightUtilities for controlling the leading, or line height, of an element.list-style-imageUtilities for controlling the marker images for list items.list-style-positionUtilities for controlling the position of bullets and numbers in lists.list-style-typeUtilities for controlling the marker style of a list.text-alignUtilities for controlling the alignment of text.colorUtilities for controlling the text color of an element.text-decoration-lineUtilities for controlling the decoration of text.text-decoration-colorUtilities for controlling the color of text decorations.text-decoration-styleUtilities for controlling the style of text decorations.text-decoration-thicknessUtilities for controlling the thickness of text decorations.text-underline-offsetUtilities for controlling the offset of a text underline.text-transformUtilities for controlling the capitalization of text.text-overflowUtilities for controlling how the text of an element overflows.text-wrapUtilities for controlling how text wraps within an element.text-indentUtilities for controlling the amount of empty space shown before text in a block.tab-sizeUtilities for controlling the size of tab characters.vertical-alignUtilities for controlling the vertical alignment of an inline or table-cell box.white-spaceUtilities for controlling an element's white-space property.word-breakUtilities for controlling word breaks in an element.overflow-wrapUtilities for controlling line breaks within words in an overflowing element.hyphensUtilities for controlling how words should be hyphenated.contentUtilities for controlling the content of the before and after pseudo-elements.

Backgrounds

Borders

Effects

Filters

Backdrop Filters

Tables

Transitions & Animation

Transforms

Interactivity

accent-colorUtilities for controlling the accented color of a form control.appearanceUtilities for suppressing native form control styling.caret-colorUtilities for controlling the color of the text input cursor.color-schemeUtilities for controlling the color scheme of an element.cursorUtilities for controlling the cursor style when hovering over an element.field-sizingUtilities for controlling the sizing of form controls.pointer-eventsUtilities for controlling whether an element responds to pointer events.resizeUtilities for controlling how an element can be resized.scroll-behaviorUtilities for controlling the scroll behavior of an element.scrollbar-colorUtilities for controlling the color of an element's scrollbar.scrollbar-widthUtilities for controlling the width of an element's scrollbar.scrollbar-gutterUtilities for controlling the gutter space reserved for an element's scrollbar.scroll-marginUtilities for controlling the scroll offset around items in a snap container.scroll-paddingUtilities for controlling an element's scroll offset within a snap container.scroll-snap-alignUtilities for controlling the scroll snap alignment of an element.scroll-snap-stopUtilities for controlling whether you can skip past possible snap positions.scroll-snap-typeUtilities for controlling how strictly snap points are enforced in a snap container.touch-actionUtilities for controlling how an element can be scrolled and zoomed on touchscreens.user-selectUtilities for controlling whether the user can select text in an element.will-changeUtilities for optimizing upcoming animations of elements that are expected to change.

SVG

Accessibility