> Markdown version of [Size and Space](https://vaadin.com/docs/v14/ds/foundation/size-space). Section index: [llms.txt](https://vaadin.com/docs/v14/ds/llms.txt)

# Size and Space

Use these CSS Custom Properties to apply consistent sizing and spacing across your application.

> **Note: Only available in Lumo**
>
> This documentation applies only to the Lumo theme.

`lumo-tokens.ts`

```typescript
// Import all Lumo CSS custom properties into the global style scope
// tag::color[]
import '@vaadin/vaadin-lumo-styles/color';
// end::color[]
// tag::typography[]
import '@vaadin/vaadin-lumo-styles/typography';
// end::typography[]
// tag::size[]
import '@vaadin/vaadin-lumo-styles/sizing';
// end::size[]
// tag::space[]
import '@vaadin/vaadin-lumo-styles/spacing';
// end::space[]
// tag::style[]
import '@vaadin/vaadin-lumo-styles/style';
// end::style[]
// prettier-ignore
```

## <a id="size"></a>Size

Use these properties to adjust the sizing of regular elements (buttons, text fields, list items).

Medium is the standard size, and it is primarily used to size buttons, text fields and list items. If you adjust the sizing, make sure to keep it large enough for touch targets.

See [Icons](https://vaadin.com/docs/v14/ds/foundation/icons.md#size) for properties that affect the sizing of icons.

| Description                                                    | CSS Custom Property |
| -------------------------------------------------------------- | ------------------- |
| **Extra Large** Minimum data grid header row height            | --lumo-size-xl      |
| **Large** Large button                                         | --lumo-size-l       |
| **Medium** Button and input field height, data grid row height | --lumo-size-m       |
| **Small** Small button and input field height                  | --lumo-size-s       |
| **Extra Small**                                                | --lumo-size-xs      |

### <a id="compact-sizing"></a>Compact Sizing

Lumo has a compact sizing preset available. It reduces the font size and the sizing and spacing of all components, allowing you to place more components on the screen.

Apply compact sizing by importing the style sheet, which sets new values for the [Typography](https://vaadin.com/docs/v14/ds/foundation/typography.md) and the [Size](#size) and [Space](#space) CSS properties. You can [view the values](https://github.com/vaadin/vaadin-lumo-styles/blob/v1.6.1/presets/compact.html) from the source code.

`Java`

```java
@JsModule("@vaadin/vaadin-lumo-styles/presets/compact.js")
@Theme(Lumo.class)
public class CompactApp extends Div {
}
```

## <a id="space"></a>Space

Use these properties to adjust the inter-component spacings: the space outside a regular component (button, text field) or inside a container component (layouts, grid cells).

| Description     | CSS Custom Property |
| --------------- | ------------------- |
| **Extra Large** | --lumo-space-xl     |
| **Large**       | --lumo-space-l      |
| **Medium**      | --lumo-space-m      |
| **Small**       | --lumo-space-s      |
| **Extra Small** | --lumo-space-xs     |

`B01EF7DD-2C1D-4BBC-BE33-9A8E48EC85B2`
