tailwindcss 4.0.0-beta.1 → 4.0.0-beta.3

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/index.css CHANGED
@@ -299,21 +299,21 @@
299
299
  --container-prose: 65ch;
300
300
 
301
301
  --text-xs: 0.75rem;
302
- --text-xs--line-height: 1rem;
302
+ --text-xs--line-height: calc(1 / 0.75);
303
303
  --text-sm: 0.875rem;
304
- --text-sm--line-height: 1.25rem;
304
+ --text-sm--line-height: calc(1.25 / 0.875);
305
305
  --text-base: 1rem;
306
- --text-base--line-height: 1.5rem;
306
+ --text-base--line-height: calc(1.5 / 1);
307
307
  --text-lg: 1.125rem;
308
- --text-lg--line-height: 1.75rem;
308
+ --text-lg--line-height: calc(1.75 / 1.125);
309
309
  --text-xl: 1.25rem;
310
- --text-xl--line-height: 1.75rem;
310
+ --text-xl--line-height: calc(1.75 / 1.25);
311
311
  --text-2xl: 1.5rem;
312
- --text-2xl--line-height: 2rem;
312
+ --text-2xl--line-height: calc(2 / 1.5);
313
313
  --text-3xl: 1.875rem;
314
- --text-3xl--line-height: 2.25rem;
314
+ --text-3xl--line-height: calc(2.25 / 1.875);
315
315
  --text-4xl: 2.25rem;
316
- --text-4xl--line-height: 2.5rem;
316
+ --text-4xl--line-height: calc(2.5 / 2.25);
317
317
  --text-5xl: 3rem;
318
318
  --text-5xl--line-height: 1;
319
319
  --text-6xl: 3.75rem;
@@ -487,7 +487,6 @@
487
487
  5. Use the user's configured `sans` font-feature-settings by default.
488
488
  6. Use the user's configured `sans` font-variation-settings by default.
489
489
  7. Disable tap highlights on iOS.
490
- 8. Set a default `color-scheme`.
491
490
  */
492
491
 
493
492
  html,
@@ -511,7 +510,6 @@
511
510
  normal
512
511
  ); /* 6 */
513
512
  -webkit-tap-highlight-color: transparent; /* 7 */
514
- color-scheme: light; /* 8 */
515
513
  }
516
514
 
517
515
  /*
@@ -712,7 +710,10 @@
712
710
  }
713
711
 
714
712
  /*
715
- Inherit font styles in all browsers.
713
+ 1. Inherit font styles in all browsers.
714
+ 2. Remove border radius in all browsers.
715
+ 3. Remove background color in all browsers.
716
+ 4. Ensure consistent opacity for disabled states in all browsers.
716
717
  */
717
718
 
718
719
  button,
@@ -721,11 +722,38 @@
721
722
  optgroup,
722
723
  textarea,
723
724
  ::file-selector-button {
724
- font: inherit;
725
- font-feature-settings: inherit;
726
- font-variation-settings: inherit;
727
- letter-spacing: inherit;
728
- color: inherit;
725
+ font: inherit; /* 1 */
726
+ font-feature-settings: inherit; /* 1 */
727
+ font-variation-settings: inherit; /* 1 */
728
+ letter-spacing: inherit; /* 1 */
729
+ color: inherit; /* 1 */
730
+ border-radius: 0; /* 2 */
731
+ background-color: transparent; /* 3 */
732
+ opacity: 1; /* 4 */
733
+ }
734
+
735
+ /*
736
+ Restore default font weight.
737
+ */
738
+
739
+ :where(select:is([multiple], [size])) optgroup {
740
+ font-weight: bolder;
741
+ }
742
+
743
+ /*
744
+ Restore indentation.
745
+ */
746
+
747
+ :where(select:is([multiple], [size])) optgroup option {
748
+ padding-inline-start: 20px;
749
+ }
750
+
751
+ /*
752
+ Restore space after button.
753
+ */
754
+
755
+ ::file-selector-button {
756
+ margin-inline-end: 4px;
729
757
  }
730
758
 
731
759
  /*
@@ -735,7 +763,7 @@
735
763
 
736
764
  ::placeholder {
737
765
  opacity: 1; /* 1 */
738
- color: color-mix(in oklch, currentColor 50%, transparent); /* 2 */
766
+ color: color-mix(in oklab, currentColor 50%, transparent); /* 2 */
739
767
  }
740
768
 
741
769
  /*
@@ -819,115 +847,6 @@
819
847
  height: auto;
820
848
  }
821
849
 
822
- /*
823
- Apply consistent base form control styles across browsers.
824
- */
825
-
826
- select,
827
- textarea,
828
- input:where(
829
- [type="text"],
830
- [type="email"],
831
- [type="password"],
832
- [type="date"],
833
- [type="datetime-local"],
834
- [type="month"],
835
- [type="number"],
836
- [type="search"],
837
- [type="time"],
838
- [type="week"],
839
- [type="tel"],
840
- [type="url"]
841
- ) {
842
- border-radius: 3px;
843
- padding-inline: 4px;
844
- padding-block: 2px;
845
- color: light-dark(black, white);
846
- background-color: light-dark(white, rgb(255 255 255 / 10%));
847
- border: 1px solid light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 25%));
848
- }
849
-
850
- :where(select:not([multiple], [size])) option,
851
- :where(select:not([multiple], [size])) optgroup {
852
- color: FieldText;
853
- background-color: Field;
854
- }
855
-
856
- :where(select:is([multiple], [size])) optgroup {
857
- font-weight: bold;
858
- }
859
-
860
- :where(select:is([multiple], [size])) optgroup option {
861
- padding-inline-start: 20px;
862
- }
863
-
864
- select:where(:disabled),
865
- textarea:where(:disabled),
866
- input:where(
867
- [type="text"],
868
- [type="email"],
869
- [type="password"],
870
- [type="date"],
871
- [type="datetime-local"],
872
- [type="month"],
873
- [type="number"],
874
- [type="search"],
875
- [type="time"],
876
- [type="week"],
877
- [type="tel"],
878
- [type="url"]
879
- ):where(:disabled) {
880
- opacity: 1;
881
- color: light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 50%));
882
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 10%));
883
- border-color: light-dark(rgb(0 0 0 / 20%), rgb(255 255 255 / 15%));
884
- }
885
-
886
- /*
887
- Apply consistent base button styles across browsers.
888
- */
889
-
890
- button,
891
- ::file-selector-button,
892
- input:where([type="button"], [type="reset"], [type="submit"]) {
893
- border-radius: 4px;
894
- padding-inline: 4px;
895
- padding-block: 2px;
896
- color: light-dark(#000, #fff);
897
- background-color: light-dark(rgb(0 0 0 / 5%), rgb(255 255 255 / 40%));
898
- border: 1px solid light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 10%));
899
- }
900
-
901
- button:where(:hover),
902
- ::file-selector-button:where(:hover),
903
- input:where([type="button"], [type="reset"], [type="submit"]):where(:hover) {
904
- background-color: light-dark(rgb(0 0 0 / 10%), rgb(255 255 255 / 45%));
905
- }
906
-
907
- button:where(:active),
908
- ::file-selector-button:where(:active),
909
- input:where([type="button"], [type="reset"], [type="submit"]):where(:active) {
910
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 30%));
911
- }
912
-
913
- button:where(:disabled),
914
- :where(input:disabled)::file-selector-button,
915
- input:where([type="button"], [type="reset"], [type="submit"]):where(
916
- :disabled
917
- ) {
918
- opacity: 1;
919
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 25%));
920
- border-color: light-dark(rgb(0 0 0 / 20%), rgb(255 255 255 / 10%));
921
- }
922
-
923
- input:where([type="file"]:disabled) {
924
- color: light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 50%));
925
- }
926
-
927
- ::file-selector-button {
928
- margin-inline-end: 4px;
929
- }
930
-
931
850
  /*
932
851
  Make elements with the HTML hidden attribute stay hidden by default.
933
852
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "4.0.0-beta.1",
3
+ "version": "4.0.0-beta.3",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -67,7 +67,7 @@
67
67
  "@types/node": "^20.14.8",
68
68
  "lightningcss": "^1.26.0",
69
69
  "dedent": "1.5.3",
70
- "@tailwindcss/oxide": "4.0.0-beta.1"
70
+ "@tailwindcss/oxide": "4.0.0-beta.3"
71
71
  },
72
72
  "scripts": {
73
73
  "lint": "tsc --noEmit",
package/preflight.css CHANGED
@@ -23,7 +23,6 @@
23
23
  5. Use the user's configured `sans` font-feature-settings by default.
24
24
  6. Use the user's configured `sans` font-variation-settings by default.
25
25
  7. Disable tap highlights on iOS.
26
- 8. Set a default `color-scheme`.
27
26
  */
28
27
 
29
28
  html,
@@ -44,7 +43,6 @@ html,
44
43
  font-feature-settings: var(--default-font-feature-settings, normal); /* 5 */
45
44
  font-variation-settings: var(--default-font-variation-settings, normal); /* 6 */
46
45
  -webkit-tap-highlight-color: transparent; /* 7 */
47
- color-scheme: light; /* 8 */
48
46
  }
49
47
 
50
48
  /*
@@ -239,7 +237,10 @@ video {
239
237
  }
240
238
 
241
239
  /*
242
- Inherit font styles in all browsers.
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.
243
244
  */
244
245
 
245
246
  button,
@@ -248,11 +249,38 @@ select,
248
249
  optgroup,
249
250
  textarea,
250
251
  ::file-selector-button {
251
- font: inherit;
252
- font-feature-settings: inherit;
253
- font-variation-settings: inherit;
254
- letter-spacing: inherit;
255
- color: inherit;
252
+ font: inherit; /* 1 */
253
+ font-feature-settings: inherit; /* 1 */
254
+ font-variation-settings: inherit; /* 1 */
255
+ letter-spacing: inherit; /* 1 */
256
+ color: inherit; /* 1 */
257
+ border-radius: 0; /* 2 */
258
+ background-color: transparent; /* 3 */
259
+ opacity: 1; /* 4 */
260
+ }
261
+
262
+ /*
263
+ Restore default font weight.
264
+ */
265
+
266
+ :where(select:is([multiple], [size])) optgroup {
267
+ font-weight: bolder;
268
+ }
269
+
270
+ /*
271
+ Restore indentation.
272
+ */
273
+
274
+ :where(select:is([multiple], [size])) optgroup option {
275
+ padding-inline-start: 20px;
276
+ }
277
+
278
+ /*
279
+ Restore space after button.
280
+ */
281
+
282
+ ::file-selector-button {
283
+ margin-inline-end: 4px;
256
284
  }
257
285
 
258
286
  /*
@@ -262,7 +290,7 @@ textarea,
262
290
 
263
291
  ::placeholder {
264
292
  opacity: 1; /* 1 */
265
- color: color-mix(in oklch, currentColor 50%, transparent); /* 2 */
293
+ color: color-mix(in oklab, currentColor 50%, transparent); /* 2 */
266
294
  }
267
295
 
268
296
  /*
@@ -346,113 +374,6 @@ input:where([type='button'], [type='reset'], [type='submit']),
346
374
  height: auto;
347
375
  }
348
376
 
349
- /*
350
- Apply consistent base form control styles across browsers.
351
- */
352
-
353
- select,
354
- textarea,
355
- input:where(
356
- [type='text'],
357
- [type='email'],
358
- [type='password'],
359
- [type='date'],
360
- [type='datetime-local'],
361
- [type='month'],
362
- [type='number'],
363
- [type='search'],
364
- [type='time'],
365
- [type='week'],
366
- [type='tel'],
367
- [type='url']
368
- ) {
369
- border-radius: 3px;
370
- padding-inline: 4px;
371
- padding-block: 2px;
372
- color: light-dark(black, white);
373
- background-color: light-dark(white, rgb(255 255 255 / 10%));
374
- border: 1px solid light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 25%));
375
- }
376
-
377
- :where(select:not([multiple], [size])) option,
378
- :where(select:not([multiple], [size])) optgroup {
379
- color: FieldText;
380
- background-color: Field;
381
- }
382
-
383
- :where(select:is([multiple], [size])) optgroup {
384
- font-weight: bold;
385
- }
386
-
387
- :where(select:is([multiple], [size])) optgroup option {
388
- padding-inline-start: 20px;
389
- }
390
-
391
- select:where(:disabled),
392
- textarea:where(:disabled),
393
- input:where(
394
- [type='text'],
395
- [type='email'],
396
- [type='password'],
397
- [type='date'],
398
- [type='datetime-local'],
399
- [type='month'],
400
- [type='number'],
401
- [type='search'],
402
- [type='time'],
403
- [type='week'],
404
- [type='tel'],
405
- [type='url']
406
- ):where(:disabled) {
407
- opacity: 1;
408
- color: light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 50%));
409
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 10%));
410
- border-color: light-dark(rgb(0 0 0 / 20%), rgb(255 255 255 / 15%));
411
- }
412
-
413
- /*
414
- Apply consistent base button styles across browsers.
415
- */
416
-
417
- button,
418
- ::file-selector-button,
419
- input:where([type='button'], [type='reset'], [type='submit']) {
420
- border-radius: 4px;
421
- padding-inline: 4px;
422
- padding-block: 2px;
423
- color: light-dark(#000, #fff);
424
- background-color: light-dark(rgb(0 0 0 / 5%), rgb(255 255 255 / 40%));
425
- border: 1px solid light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 10%));
426
- }
427
-
428
- button:where(:hover),
429
- ::file-selector-button:where(:hover),
430
- input:where([type='button'], [type='reset'], [type='submit']):where(:hover) {
431
- background-color: light-dark(rgb(0 0 0 / 10%), rgb(255 255 255 / 45%));
432
- }
433
-
434
- button:where(:active),
435
- ::file-selector-button:where(:active),
436
- input:where([type='button'], [type='reset'], [type='submit']):where(:active) {
437
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 30%));
438
- }
439
-
440
- button:where(:disabled),
441
- :where(input:disabled)::file-selector-button,
442
- input:where([type='button'], [type='reset'], [type='submit']):where(:disabled) {
443
- opacity: 1;
444
- background-color: light-dark(rgb(0 0 0 / 2.5%), rgb(255 255 255 / 25%));
445
- border-color: light-dark(rgb(0 0 0 / 20%), rgb(255 255 255 / 10%));
446
- }
447
-
448
- input:where([type='file']:disabled) {
449
- color: light-dark(rgb(0 0 0 / 50%), rgb(255 255 255 / 50%));
450
- }
451
-
452
- ::file-selector-button {
453
- margin-inline-end: 4px;
454
- }
455
-
456
377
  /*
457
378
  Make elements with the HTML hidden attribute stay hidden by default.
458
379
  */
package/theme.css CHANGED
@@ -296,21 +296,21 @@
296
296
  --container-prose: 65ch;
297
297
 
298
298
  --text-xs: 0.75rem;
299
- --text-xs--line-height: 1rem;
299
+ --text-xs--line-height: calc(1 / 0.75);
300
300
  --text-sm: 0.875rem;
301
- --text-sm--line-height: 1.25rem;
301
+ --text-sm--line-height: calc(1.25 / 0.875);
302
302
  --text-base: 1rem;
303
- --text-base--line-height: 1.5rem;
303
+ --text-base--line-height: calc(1.5 / 1);
304
304
  --text-lg: 1.125rem;
305
- --text-lg--line-height: 1.75rem;
305
+ --text-lg--line-height: calc(1.75 / 1.125);
306
306
  --text-xl: 1.25rem;
307
- --text-xl--line-height: 1.75rem;
307
+ --text-xl--line-height: calc(1.75 / 1.25);
308
308
  --text-2xl: 1.5rem;
309
- --text-2xl--line-height: 2rem;
309
+ --text-2xl--line-height: calc(2 / 1.5);
310
310
  --text-3xl: 1.875rem;
311
- --text-3xl--line-height: 2.25rem;
311
+ --text-3xl--line-height: calc(2.25 / 1.875);
312
312
  --text-4xl: 2.25rem;
313
- --text-4xl--line-height: 2.5rem;
313
+ --text-4xl--line-height: calc(2.5 / 2.25);
314
314
  --text-5xl: 3rem;
315
315
  --text-5xl--line-height: 1;
316
316
  --text-6xl: 3.75rem;