Skip to content

Inputs invisible by default #354

Closed
Closed
@emil-nasso

Description

@emil-nasso

We started using tailwind in an old app that has a mix of custom styles, unstyled pages and semantic ui. On the pages with unstyled inputs the inputs was missing borders and was basically invisible.

It seems to be caused by this selector removing all borders from all elements, even inputs and buttons. Is that intentional?

https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css#L532

We fixed it by adding some default styling to inputs, textareas and buttons.

input, textarea {
    @apply .border .rounded;
}

button, input[type=button], input[type=submit] {
    @apply .border .p-2 .shadow;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions