tailwindcss 4.0.0-alpha.9 → 4.0.0-beta.10

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.9",
3
+ "version": "4.0.0-beta.10",
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,6 +17,34 @@
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
+ "./plugin.js": {
25
+ "require": "./dist/plugin.js",
26
+ "import": "./dist/plugin.mjs"
27
+ },
28
+ "./defaultTheme": {
29
+ "require": "./dist/default-theme.js",
30
+ "import": "./dist/default-theme.mjs"
31
+ },
32
+ "./defaultTheme.js": {
33
+ "require": "./dist/default-theme.js",
34
+ "import": "./dist/default-theme.mjs"
35
+ },
36
+ "./colors": {
37
+ "require": "./dist/colors.js",
38
+ "import": "./dist/colors.mjs"
39
+ },
40
+ "./colors.js": {
41
+ "require": "./dist/colors.js",
42
+ "import": "./dist/colors.mjs"
43
+ },
44
+ "./lib/util/flattenColorPalette": {
45
+ "require": "./dist/flatten-color-palette.js",
46
+ "import": "./dist/flatten-color-palette.mjs"
47
+ },
16
48
  "./package.json": "./package.json",
17
49
  "./index.css": "./index.css",
18
50
  "./index": "./index.css",
@@ -36,9 +68,10 @@
36
68
  "utilities.css"
37
69
  ],
38
70
  "devDependencies": {
39
- "@types/node": "^20.10.8",
40
- "lightningcss": "^1.24.0",
41
- "@tailwindcss/oxide": "4.0.0-alpha.9"
71
+ "@types/node": "^20.14.8",
72
+ "lightningcss": "^1.29.1",
73
+ "dedent": "1.5.3",
74
+ "@tailwindcss/oxide": "4.0.0-beta.10"
42
75
  },
43
76
  "scripts": {
44
77
  "lint": "tsc --noEmit",
package/preflight.css CHANGED
@@ -8,7 +8,6 @@
8
8
  ::after,
9
9
  ::before,
10
10
  ::backdrop,
11
- ::first-letter,
12
11
  ::file-selector-button {
13
12
  box-sizing: border-box; /* 1 */
14
13
  margin: 0; /* 2 */
@@ -176,73 +175,130 @@ table {
176
175
  }
177
176
 
178
177
  /*
179
- 1. Inherit the font styles in all browsers.
180
- 2. Remove the default background color.
178
+ Use the modern Firefox focus style for all focusable elements.
179
+ */
180
+
181
+ :-moz-focusring {
182
+ outline: auto;
183
+ }
184
+
185
+ /*
186
+ Add the correct vertical alignment in Chrome and Firefox.
187
+ */
188
+
189
+ progress {
190
+ vertical-align: baseline;
191
+ }
192
+
193
+ /*
194
+ Add the correct display in Chrome and Safari.
195
+ */
196
+
197
+ summary {
198
+ display: list-item;
199
+ }
200
+
201
+ /*
202
+ Make lists unstyled by default.
203
+ */
204
+
205
+ ol,
206
+ ul,
207
+ menu {
208
+ list-style: none;
209
+ }
210
+
211
+ /*
212
+ 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
213
+ 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
214
+ This can trigger a poorly considered lint error in some tools but is included by design.
215
+ */
216
+
217
+ img,
218
+ svg,
219
+ video,
220
+ canvas,
221
+ audio,
222
+ iframe,
223
+ embed,
224
+ object {
225
+ display: block; /* 1 */
226
+ vertical-align: middle; /* 2 */
227
+ }
228
+
229
+ /*
230
+ Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
231
+ */
232
+
233
+ img,
234
+ video {
235
+ max-width: 100%;
236
+ height: auto;
237
+ }
238
+
239
+ /*
240
+ 1. Inherit font styles in all browsers.
241
+ 2. Remove border radius in all browsers.
242
+ 3. Remove background color in all browsers.
243
+ 4. Ensure consistent opacity for disabled states in all browsers.
181
244
  */
182
245
 
183
246
  button,
184
247
  input,
185
- optgroup,
186
248
  select,
249
+ optgroup,
187
250
  textarea,
188
251
  ::file-selector-button {
189
252
  font: inherit; /* 1 */
190
253
  font-feature-settings: inherit; /* 1 */
191
254
  font-variation-settings: inherit; /* 1 */
255
+ letter-spacing: inherit; /* 1 */
192
256
  color: inherit; /* 1 */
193
- background: transparent; /* 2 */
257
+ border-radius: 0; /* 2 */
258
+ background-color: transparent; /* 3 */
259
+ opacity: 1; /* 4 */
194
260
  }
195
261
 
196
262
  /*
197
- Reset the default inset border style for form controls to solid.
263
+ Restore default font weight.
198
264
  */
199
265
 
200
- input:where(:not([type='button'], [type='reset'], [type='submit'])),
201
- select,
202
- textarea {
203
- border: 1px solid;
204
- }
205
-
206
- /*
207
- Correct the inability to style the border radius in iOS Safari.
208
- */
209
- button,
210
- input:where([type='button'], [type='reset'], [type='submit']),
211
- ::file-selector-button {
212
- appearance: button;
266
+ :where(select:is([multiple], [size])) optgroup {
267
+ font-weight: bolder;
213
268
  }
214
269
 
215
270
  /*
216
- Use the modern Firefox focus style for all focusable elements.
271
+ Restore indentation.
217
272
  */
218
273
 
219
- :-moz-focusring {
220
- outline: auto;
274
+ :where(select:is([multiple], [size])) optgroup option {
275
+ padding-inline-start: 20px;
221
276
  }
222
277
 
223
278
  /*
224
- Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
279
+ Restore space after button.
225
280
  */
226
281
 
227
- :-moz-ui-invalid {
228
- box-shadow: none;
282
+ ::file-selector-button {
283
+ margin-inline-end: 4px;
229
284
  }
230
285
 
231
286
  /*
232
- Add the correct vertical alignment in Chrome and Firefox.
287
+ 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
288
+ 2. Set the default placeholder color to a semi-transparent version of the current text color.
233
289
  */
234
290
 
235
- progress {
236
- vertical-align: baseline;
291
+ ::placeholder {
292
+ opacity: 1; /* 1 */
293
+ color: color-mix(in oklab, currentColor 50%, transparent); /* 2 */
237
294
  }
238
295
 
239
296
  /*
240
- Correct the cursor style of increment and decrement buttons in Safari.
297
+ Prevent resizing textareas horizontally by default.
241
298
  */
242
299
 
243
- ::-webkit-inner-spin-button,
244
- ::-webkit-outer-spin-button {
245
- height: auto;
300
+ textarea {
301
+ resize: vertical;
246
302
  }
247
303
 
248
304
  /*
@@ -254,74 +310,67 @@ progress {
254
310
  }
255
311
 
256
312
  /*
257
- Add the correct display in Chrome and Safari.
313
+ 1. Ensure date/time inputs have the same height when empty in iOS Safari.
314
+ 2. Ensure text alignment can be changed on date/time inputs in iOS Safari.
258
315
  */
259
316
 
260
- summary {
261
- display: list-item;
317
+ ::-webkit-date-and-time-value {
318
+ min-height: 1lh; /* 1 */
319
+ text-align: inherit; /* 2 */
262
320
  }
263
321
 
264
322
  /*
265
- Make lists unstyled by default.
323
+ Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`.
266
324
  */
267
325
 
268
- ol,
269
- ul,
270
- menu {
271
- list-style: none;
326
+ ::-webkit-datetime-edit {
327
+ display: inline-flex;
272
328
  }
273
329
 
274
330
  /*
275
- Prevent resizing textareas horizontally by default.
331
+ Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers.
276
332
  */
277
333
 
278
- textarea {
279
- resize: vertical;
334
+ ::-webkit-datetime-edit-fields-wrapper {
335
+ padding: 0;
280
336
  }
281
337
 
282
- /*
283
- 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
284
- 2. Set the default placeholder color to a semi-transparent version of the current text color.
285
- */
286
-
287
- ::placeholder {
288
- opacity: 1; /* 1 */
289
- color: color-mix(in srgb, currentColor 50%, transparent); /* 2 */
338
+ ::-webkit-datetime-edit,
339
+ ::-webkit-datetime-edit-year-field,
340
+ ::-webkit-datetime-edit-month-field,
341
+ ::-webkit-datetime-edit-day-field,
342
+ ::-webkit-datetime-edit-hour-field,
343
+ ::-webkit-datetime-edit-minute-field,
344
+ ::-webkit-datetime-edit-second-field,
345
+ ::-webkit-datetime-edit-millisecond-field,
346
+ ::-webkit-datetime-edit-meridiem-field {
347
+ padding-block: 0;
290
348
  }
291
349
 
292
350
  /*
293
- Make sure disabled buttons don't get the pointer cursor.
351
+ Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
294
352
  */
295
353
 
296
- :disabled {
297
- cursor: default;
354
+ :-moz-ui-invalid {
355
+ box-shadow: none;
298
356
  }
299
357
 
300
358
  /*
301
- 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
302
- 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
303
- This can trigger a poorly considered lint error in some tools but is included by design.
359
+ Correct the inability to style the border radius in iOS Safari.
304
360
  */
305
361
 
306
- img,
307
- svg,
308
- video,
309
- canvas,
310
- audio,
311
- iframe,
312
- embed,
313
- object {
314
- display: block; /* 1 */
315
- vertical-align: middle; /* 2 */
362
+ button,
363
+ input:where([type='button'], [type='reset'], [type='submit']),
364
+ ::file-selector-button {
365
+ appearance: button;
316
366
  }
317
367
 
318
368
  /*
319
- Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
369
+ Correct the cursor style of increment and decrement buttons in Safari.
320
370
  */
321
371
 
322
- img,
323
- video {
324
- max-width: 100%;
372
+ ::-webkit-inner-spin-button,
373
+ ::-webkit-outer-spin-button {
325
374
  height: auto;
326
375
  }
327
376
 
@@ -329,6 +378,6 @@ video {
329
378
  Make elements with the HTML hidden attribute stay hidden by default.
330
379
  */
331
380
 
332
- [hidden] {
381
+ [hidden]:where(:not([hidden='until-found'])) {
333
382
  display: none !important;
334
383
  }