Skip to content

feat: Make native input accessible via part for CSS #31032

@fudom

Description

@fudom

Prerequisites

Describe the Feature Request

Make native input accessible via part for CSS.

Describe the Use Case

For example, change the font of the input. Make 0 and O distinguishable.

Describe Preferred Solution

Just add part="native" to the input element.

I would do this for the native label too.

Describe Alternatives

Without part select, the font changes would also affect the label, which is undesirable. This is because Ionic changes their inputs with label inside.

Related Code

ion-input.id { &::part(native) { font-family: monospace; font-variant-numeric: slashed-zero; // optional for other fonts } }

Additional Information

Ionic v8, Angular v19, Chrome v146

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions