Skip to content

New doc: compact attribute/property #40071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions files/en-us/web/api/htmldlistelement/compact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "HTMLDListElement: compact property"
short-title: compact
slug: Web/API/HTMLDListElement/compact
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLDListElement.compact
---

{{ApiRef("HTML DOM")}}{{Deprecated_Header}}

The **`compact`** property of the {{domxref("HTMLDListElement")}} interface indicates that spacing between list items should be reduced. The exact handling of the `compact` attribute is browser-specific. Instead of using this property, consider using CSS {{cssxref("line-height")}} instead.

It reflects the [`compact`](/en-US/docs/Web/HTML/Reference/Elements/dl#compact) attribute of the {{HTMLElement("dl")}} element.

## Value

A boolean.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
27 changes: 27 additions & 0 deletions files/en-us/web/api/htmlmenuelement/compact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "HTMLMenuElement: compact property"
short-title: compact
slug: Web/API/HTMLMenuElement/compact
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLMenuElement.compact
---

{{ApiRef("HTML DOM")}}{{Deprecated_Header}}

The **`compact`** property of the {{domxref("HTMLMenuElement")}} interface indicates that spacing between list items should be reduced. The exact handling of the `compact` attribute is browser-specific. Instead of using this property, consider using CSS {{cssxref("line-height")}} instead.

It reflects the [`compact`](/en-US/docs/Web/HTML/Reference/Elements/menu#compact) attribute of the {{HTMLElement("menu")}} element.

## Value

A boolean.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
27 changes: 27 additions & 0 deletions files/en-us/web/api/htmlolistelement/compact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "HTMLOListElement: compact property"
short-title: compact
slug: Web/API/HTMLOListElement/compact
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLOListElement.compact
---

{{ApiRef("HTML DOM")}}{{Deprecated_Header}}

The **`compact`** property of the {{domxref("HTMLOListElement")}} interface indicates that spacing between list items should be reduced. The exact handling of the `compact` attribute is browser-specific. Instead of using this property, consider using CSS {{cssxref("line-height")}} instead.

It reflects the [`compact`](/en-US/docs/Web/HTML/Reference/Elements/ol#compact) attribute of the {{HTMLElement("ol")}} element.

## Value

A boolean.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
27 changes: 27 additions & 0 deletions files/en-us/web/api/htmlulistelement/compact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "HTMLUListElement: compact property"
short-title: compact
slug: Web/API/HTMLUListElement/compact
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLUListElement.compact
---

{{ApiRef("HTML DOM")}}{{Deprecated_Header}}

The **`compact`** property of the {{domxref("HTMLUListElement")}} interface indicates that spacing between list items should be reduced. The exact handling of the `compact` attribute is browser-specific. Instead of using this property, consider using CSS {{cssxref("line-height")}} instead.

It reflects the [`compact`](/en-US/docs/Web/HTML/Reference/Elements/ul#compact) attribute of the {{HTMLElement("ul")}} element.

## Value

A boolean.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
5 changes: 4 additions & 1 deletion files/en-us/web/html/reference/elements/dl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ dd {

## Attributes

This element only includes the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).
This element also accepts the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).

- `compact` {{Deprecated_inline}}
- : This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute is browser-specific. Use [CSS](/en-US/docs/Web/CSS) instead: to give a similar effect as the `compact` attribute, the CSS property {{cssxref("line-height")}} can be used with a value of `80%`.

## Accessibility

Expand Down
5 changes: 4 additions & 1 deletion files/en-us/web/html/reference/elements/menu/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ menu {

## Attributes

This element only includes the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).
This element also accepts the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).

- `compact` {{Deprecated_inline}}
- : This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute is browser-specific. Use [CSS](/en-US/docs/Web/CSS) instead: to give a similar effect as the `compact` attribute, the CSS property {{cssxref("line-height")}} can be used with a value of `80%`.

## Usage notes

Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/html/reference/elements/ol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ li {

This element also accepts the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).

- `compact` {{Deprecated_inline}}
- : This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute is browser-specific. Use [CSS](/en-US/docs/Web/CSS) instead: to give a similar effect as the `compact` attribute, the CSS property {{cssxref("line-height")}} can be used with a value of `80%`.
- `reversed`
- : This Boolean attribute specifies that the list's items are in reverse order. Items will be numbered from high to low.
- `start`
Expand Down
6 changes: 1 addition & 5 deletions files/en-us/web/html/reference/elements/ul/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ li li {
This element includes the [global attributes](/en-US/docs/Web/HTML/Reference/Global_attributes).

- `compact` {{Deprecated_inline}}
- : This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the {{glossary("user agent")}}, and it doesn't work in all browsers.

> [!WARNING]
> Do not use this attribute, as it has been deprecated: use [CSS](/en-US/docs/Web/CSS) instead. To give a similar effect as the `compact` attribute, the CSS property {{cssxref("line-height")}} can be used with a value of `80%`.

- : This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute is browser-specific. Use [CSS](/en-US/docs/Web/CSS) instead: to give a similar effect as the `compact` attribute, the CSS property {{cssxref("line-height")}} can be used with a value of `80%`.
- `type` {{Deprecated_inline}}
- : This attribute sets the bullet style for the list. The values defined under HTML3.2 and the transitional version of HTML 4.0/4.01 are:
- `circle`
Expand Down