Skip to content
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

Add consistent base styles for buttons and form controls #15036

Merged
merged 10 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
285 changes: 285 additions & 0 deletions integrations/upgrade/index.test.ts

Large diffs are not rendered by default.

256 changes: 256 additions & 0 deletions integrations/upgrade/js-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}

--- src/test.js ---
export default {
Expand Down Expand Up @@ -393,6 +408,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)

Expand Down Expand Up @@ -475,6 +505,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)

Expand Down Expand Up @@ -549,6 +594,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)

Expand Down Expand Up @@ -627,6 +687,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)

Expand Down Expand Up @@ -701,6 +776,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)

Expand Down Expand Up @@ -813,6 +903,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}

--- project-b/src/input.css ---
@import 'tailwindcss';
Expand All @@ -838,6 +943,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -915,6 +1035,21 @@ test(
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -975,6 +1110,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -1037,6 +1187,21 @@ describe('border compatibility', () => {
border-color: oklch(0.623 0.214 259.815);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -1081,6 +1246,22 @@ describe('border compatibility', () => {
"
--- src/input.css ---
@import 'tailwindcss';

/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -1141,6 +1322,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down Expand Up @@ -1210,6 +1406,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}

--- src/input.css ---
@import './base.css';
Expand Down Expand Up @@ -1328,6 +1539,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}

.container {
width: calc(var(--spacing) * 2);
Expand Down Expand Up @@ -1442,6 +1668,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}

.container {
width: var(--spacing-2);
Expand Down Expand Up @@ -1545,6 +1786,21 @@ describe('border compatibility', () => {
border-color: var(--color-gray-200, currentColor);
}
}
/*
In Tailwind CSS v4, basic styles are applied to form elements by default. To
maintain compatibility with v3, the following resets have been added:
*/
@layer base {
input,
textarea,
select,
button {
border: 0px solid;
border-radius: 0;
padding: 0;
background-color: transparent;
}
}
"
`)
},
Expand Down
Loading