Skip to content

[EuiTheme context] Add a token for euiFormMaxWidth #8217

@tsullivan

Description

@tsullivan

Background:
The euiThemeVars module from the @kbn/ui-theme package in Kibana needs to no longer be referenced in code as it is not suitable for proper EUI theming. The vars that we use in Kibana should be taken from EUI context.

Is your feature request related to a problem? Please describe.
Problem: The euiFormMaxWidth var from euiThemeVars is not available in EUI context.

Describe the solution you'd like
Add an additional token for euiFormMaxWidth on euiTheme.components.

Describe alternatives you've considered

  • It is possible to import euiFormMaxWidth from @elastic/eui/lib/components/form/form.styles, however that greatly increases the built bundle size wherever that gets included in a bundle.
  • Duplicate the euiFormMaxWidth function in Kibana.

Desired timeline
Early 2025

Additional context
A Kibana PR duplicated the euiFormMaxWidth function in code and added a FIXME that references this issue: elastic/kibana#202780

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions