tailwindcss 4.0.0-alpha.2 → 4.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "4.0.0-alpha.2",
3
+ "version": "4.0.0-alpha.20",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
- "repository": "https://github.com/tailwindlabs/tailwindcss.git",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/tailwindlabs/tailwindcss.git",
9
+ "directory": "packages/tailwindcss"
10
+ },
7
11
  "bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
8
12
  "homepage": "https://tailwindcss.com",
9
13
  "exports": {
@@ -13,11 +17,31 @@
13
17
  "require": "./dist/lib.js",
14
18
  "import": "./dist/lib.mjs"
15
19
  },
20
+ "./plugin": {
21
+ "require": "./dist/plugin.js",
22
+ "import": "./dist/plugin.mjs"
23
+ },
24
+ "./defaultTheme": {
25
+ "require": "./dist/default-theme.js",
26
+ "import": "./dist/default-theme.mjs"
27
+ },
28
+ "./colors": {
29
+ "require": "./dist/colors.js",
30
+ "import": "./dist/colors.mjs"
31
+ },
16
32
  "./package.json": "./package.json",
17
33
  "./index.css": "./index.css",
34
+ "./index": "./index.css",
18
35
  "./preflight.css": "./preflight.css",
36
+ "./preflight": "./preflight.css",
19
37
  "./theme.css": "./theme.css",
20
- "./utilities.css": "./utilities.css"
38
+ "./theme": "./theme.css",
39
+ "./utilities.css": "./utilities.css",
40
+ "./utilities": "./utilities.css"
41
+ },
42
+ "publishConfig": {
43
+ "provenance": true,
44
+ "access": "public"
21
45
  },
22
46
  "style": "index.css",
23
47
  "files": [
@@ -27,12 +51,10 @@
27
51
  "theme.css",
28
52
  "utilities.css"
29
53
  ],
30
- "dependencies": {
31
- "lightningcss": "^1.24.0"
32
- },
33
54
  "devDependencies": {
34
- "@types/node": "^20.10.8",
35
- "@tailwindcss/oxide": "4.0.0-alpha.2"
55
+ "@types/node": "^20.14.8",
56
+ "lightningcss": "^1.26.0",
57
+ "@tailwindcss/oxide": "4.0.0-alpha.20"
36
58
  },
37
59
  "scripts": {
38
60
  "lint": "tsc --noEmit",
package/preflight.css CHANGED
@@ -1,5 +1,7 @@
1
1
  /*
2
- Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2
+ 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
3
+ 2. Remove default margins and padding
4
+ 3. Reset all borders.
3
5
  */
4
6
 
5
7
  *,
@@ -7,15 +9,10 @@
7
9
  ::before,
8
10
  ::backdrop,
9
11
  ::file-selector-button {
10
- box-sizing: border-box;
11
- }
12
-
13
- /*
14
- Remove any default margins.
15
- */
16
-
17
- * {
18
- margin: 0;
12
+ box-sizing: border-box; /* 1 */
13
+ margin: 0; /* 2 */
14
+ padding: 0; /* 2 */
15
+ border: 0 solid; /* 3 */
19
16
  }
20
17
 
21
18
  /*
@@ -65,7 +62,6 @@ body {
65
62
  hr {
66
63
  height: 0; /* 1 */
67
64
  color: inherit; /* 2 */
68
- border: 0 solid; /* 3 */
69
65
  border-top-width: 1px; /* 3 */
70
66
  }
71
67
 
@@ -180,9 +176,7 @@ table {
180
176
 
181
177
  /*
182
178
  1. Inherit the font styles in all browsers.
183
- 2. Reset the default inset border style to solid.
184
- 3. Remove the default background color.
185
- 4. Remove default padding.
179
+ 2. Remove the default background color.
186
180
  */
187
181
 
188
182
  button,
@@ -194,21 +188,28 @@ textarea,
194
188
  font: inherit; /* 1 */
195
189
  font-feature-settings: inherit; /* 1 */
196
190
  font-variation-settings: inherit; /* 1 */
191
+ letter-spacing: inherit; /* 1 */
197
192
  color: inherit; /* 1 */
198
- border: 1px solid; /* 2 */
199
- background: transparent; /* 3 */
200
- padding: 0; /* 4 */
193
+ background: transparent; /* 2 */
194
+ }
195
+
196
+ /*
197
+ Reset the default inset border style for form controls to solid.
198
+ */
199
+
200
+ input:where(:not([type='button'], [type='reset'], [type='submit'])),
201
+ select,
202
+ textarea {
203
+ border: 1px solid;
201
204
  }
202
205
 
203
206
  /*
204
- 1. Correct the inability to style the border radius in iOS Safari.
205
- 2. Make borders opt-in.
207
+ Correct the inability to style the border radius in iOS Safari.
206
208
  */
207
209
  button,
208
210
  input:where([type='button'], [type='reset'], [type='submit']),
209
211
  ::file-selector-button {
210
- appearance: button; /* 1 */
211
- border: 0; /* 2 */
212
+ appearance: button;
212
213
  }
213
214
 
214
215
  /*
@@ -260,19 +261,6 @@ summary {
260
261
  display: list-item;
261
262
  }
262
263
 
263
- /*
264
- Remove the default border and spacing for fieldset and legend elements.
265
- */
266
-
267
- fieldset {
268
- border: 0;
269
- padding: 0;
270
- }
271
-
272
- legend {
273
- padding: 0;
274
- }
275
-
276
264
  /*
277
265
  Make lists unstyled by default.
278
266
  */
@@ -281,15 +269,6 @@ ol,
281
269
  ul,
282
270
  menu {
283
271
  list-style: none;
284
- padding: 0;
285
- }
286
-
287
- /*
288
- Remove the default padding from dialog elements.
289
- */
290
-
291
- dialog {
292
- padding: 0;
293
272
  }
294
273
 
295
274
  /*
@@ -310,14 +289,6 @@ textarea {
310
289
  color: color-mix(in srgb, currentColor 50%, transparent); /* 2 */
311
290
  }
312
291
 
313
- /*
314
- Make sure disabled buttons don't get the pointer cursor.
315
- */
316
-
317
- :disabled {
318
- cursor: default;
319
- }
320
-
321
292
  /*
322
293
  1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
323
294
  2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
package/theme.css CHANGED
@@ -1,7 +1,7 @@
1
1
  @theme {
2
2
  /* Defaults */
3
3
  --default-transition-duration: 150ms;
4
- --default-transition-timing-function: var(--transition-timing-function-in-out);
4
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
5
5
  --default-font-family: var(--font-family-sans);
6
6
  --default-font-feature-settings: var(--font-family-sans--font-feature-settings);
7
7
  --default-font-variation-settings: var(--font-family-sans--font-variation-settings);
@@ -10,11 +10,11 @@
10
10
  --default-mono-font-variation-settings: var(--font-family-mono--font-variation-settings);
11
11
 
12
12
  /* Breakpoints */
13
- --breakpoint-sm: 640px;
14
- --breakpoint-md: 768px;
15
- --breakpoint-lg: 1024px;
16
- --breakpoint-xl: 1280px;
17
- --breakpoint-2xl: 1536px;
13
+ --breakpoint-sm: 40rem;
14
+ --breakpoint-md: 48rem;
15
+ --breakpoint-lg: 64rem;
16
+ --breakpoint-xl: 80rem;
17
+ --breakpoint-2xl: 96rem;
18
18
 
19
19
  /* Colors */
20
20
  --color-black: #000;
@@ -278,15 +278,14 @@
278
278
  --blur-3xl: 64px;
279
279
 
280
280
  /* Radii */
281
- --radius-none: 0px;
282
- --radius-full: 9999px;
283
- --radius-sm: 0.125rem;
284
281
  --radius: 0.25rem;
282
+ --radius-sm: 0.125rem;
285
283
  --radius-md: 0.375rem;
286
284
  --radius-lg: 0.5rem;
287
285
  --radius-xl: 0.75rem;
288
286
  --radius-2xl: 1rem;
289
287
  --radius-3xl: 1.5rem;
288
+ --radius-4xl: 2rem;
290
289
 
291
290
  /* Shadows */
292
291
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
@@ -310,6 +309,7 @@
310
309
  --drop-shadow-lg: 0 10px 8px rgb(0 0 0 / 0.04), 0 4px 3px rgb(0 0 0 / 0.1);
311
310
  --drop-shadow-xl: 0 20px 13px rgb(0 0 0 / 0.03), 0 8px 5px rgb(0 0 0 / 0.08);
312
311
  --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15);
312
+ --drop-shadow-none: 0 0 #0000;
313
313
 
314
314
  /* Spacing */
315
315
  --spacing-px: 1px;
@@ -423,8 +423,14 @@
423
423
  --line-height-9: 2.25rem;
424
424
  --line-height-10: 2.5rem;
425
425
 
426
+ /* 3D perspectives */
427
+ --perspective-dramatic: 100px;
428
+ --perspective-near: 300px;
429
+ --perspective-normal: 500px;
430
+ --perspective-midrange: 800px;
431
+ --perspective-distant: 1200px;
432
+
426
433
  /* Transition timing functions */
427
- --transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
428
434
  --transition-timing-function-linear: linear;
429
435
  --transition-timing-function-in: cubic-bezier(0.4, 0, 1, 1);
430
436
  --transition-timing-function-out: cubic-bezier(0, 0, 0.2, 1);