tailwindcss 0.0.0-oxide-insiders.7f81849 → 0.0.0-oxide-insiders.6c77544

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.
@@ -40,6 +40,7 @@ const _default = [
40
40
  "flexGrow",
41
41
  "flexBasis",
42
42
  "tableLayout",
43
+ "captionSide",
43
44
  "borderCollapse",
44
45
  "borderSpacing",
45
46
  "transformOrigin",
@@ -91,6 +92,7 @@ const _default = [
91
92
  "overscrollBehavior",
92
93
  "scrollBehavior",
93
94
  "textOverflow",
95
+ "hyphens",
94
96
  "whitespace",
95
97
  "wordBreak",
96
98
  "borderRadius",
@@ -15,6 +15,7 @@ _export(exports, {
15
15
  const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
16
16
  const _path = /*#__PURE__*/ _interopRequireWildcard(require("path"));
17
17
  const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
18
+ const _sharedState = require("./lib/sharedState");
18
19
  const _createUtilityPlugin = /*#__PURE__*/ _interopRequireDefault(require("./util/createUtilityPlugin"));
19
20
  const _buildMediaQuery = /*#__PURE__*/ _interopRequireDefault(require("./util/buildMediaQuery"));
20
21
  const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("./util/escapeClassName"));
@@ -668,6 +669,18 @@ let corePlugins = {
668
669
  ]
669
670
  ],
670
671
  [
672
+ [
673
+ "start",
674
+ [
675
+ "inset-inline-start"
676
+ ]
677
+ ],
678
+ [
679
+ "end",
680
+ [
681
+ "inset-inline-end"
682
+ ]
683
+ ],
671
684
  [
672
685
  "top",
673
686
  [
@@ -820,6 +833,18 @@ let corePlugins = {
820
833
  ]
821
834
  ],
822
835
  [
836
+ [
837
+ "ms",
838
+ [
839
+ "margin-inline-start"
840
+ ]
841
+ ],
842
+ [
843
+ "me",
844
+ [
845
+ "margin-inline-end"
846
+ ]
847
+ ],
823
848
  [
824
849
  "mt",
825
850
  [
@@ -1028,6 +1053,16 @@ let corePlugins = {
1028
1053
  }
1029
1054
  });
1030
1055
  },
1056
+ captionSide: ({ addUtilities })=>{
1057
+ addUtilities({
1058
+ ".caption-top": {
1059
+ "caption-side": "top"
1060
+ },
1061
+ ".caption-bottom": {
1062
+ "caption-side": "bottom"
1063
+ }
1064
+ });
1065
+ },
1031
1066
  borderCollapse: ({ addUtilities })=>{
1032
1067
  addUtilities({
1033
1068
  ".border-collapse": {
@@ -1434,6 +1469,18 @@ let corePlugins = {
1434
1469
  ]
1435
1470
  ],
1436
1471
  [
1472
+ [
1473
+ "scroll-ms",
1474
+ [
1475
+ "scroll-margin-inline-start"
1476
+ ]
1477
+ ],
1478
+ [
1479
+ "scroll-me",
1480
+ [
1481
+ "scroll-margin-inline-end"
1482
+ ]
1483
+ ],
1437
1484
  [
1438
1485
  "scroll-mt",
1439
1486
  [
@@ -1486,6 +1533,18 @@ let corePlugins = {
1486
1533
  ]
1487
1534
  ],
1488
1535
  [
1536
+ [
1537
+ "scroll-ps",
1538
+ [
1539
+ "scroll-padding-inline-start"
1540
+ ]
1541
+ ],
1542
+ [
1543
+ "scroll-pe",
1544
+ [
1545
+ "scroll-padding-inline-end"
1546
+ ]
1547
+ ],
1489
1548
  [
1490
1549
  "scroll-pt",
1491
1550
  [
@@ -1852,6 +1911,15 @@ let corePlugins = {
1852
1911
  matchUtilities({
1853
1912
  "space-x": (value)=>{
1854
1913
  value = value === "0" ? "0px" : value;
1914
+ if (_sharedState.env.OXIDE) {
1915
+ return {
1916
+ "& > :not([hidden]) ~ :not([hidden])": {
1917
+ "--tw-space-x-reverse": "0",
1918
+ "margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
1919
+ "margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
1920
+ }
1921
+ };
1922
+ }
1855
1923
  return {
1856
1924
  "& > :not([hidden]) ~ :not([hidden])": {
1857
1925
  "--tw-space-x-reverse": "0",
@@ -1887,6 +1955,16 @@ let corePlugins = {
1887
1955
  matchUtilities({
1888
1956
  "divide-x": (value)=>{
1889
1957
  value = value === "0" ? "0px" : value;
1958
+ if (_sharedState.env.OXIDE) {
1959
+ return {
1960
+ "& > :not([hidden]) ~ :not([hidden])": {
1961
+ "@defaults border-width": {},
1962
+ "--tw-divide-x-reverse": "0",
1963
+ "border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
1964
+ "border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
1965
+ }
1966
+ };
1967
+ }
1890
1968
  return {
1891
1969
  "& > :not([hidden]) ~ :not([hidden])": {
1892
1970
  "@defaults border-width": {},
@@ -2152,6 +2230,19 @@ let corePlugins = {
2152
2230
  }
2153
2231
  });
2154
2232
  },
2233
+ hyphens: ({ addUtilities })=>{
2234
+ addUtilities({
2235
+ ".hyphens-none": {
2236
+ hyphens: "none"
2237
+ },
2238
+ ".hyphens-manual": {
2239
+ hyphens: "manual"
2240
+ },
2241
+ ".hyphens-auto": {
2242
+ hyphens: "auto"
2243
+ }
2244
+ });
2245
+ },
2155
2246
  whitespace: ({ addUtilities })=>{
2156
2247
  addUtilities({
2157
2248
  ".whitespace-normal": {
@@ -2196,6 +2287,20 @@ let corePlugins = {
2196
2287
  ]
2197
2288
  ],
2198
2289
  [
2290
+ [
2291
+ "rounded-s",
2292
+ [
2293
+ "border-start-start-radius",
2294
+ "border-end-start-radius"
2295
+ ]
2296
+ ],
2297
+ [
2298
+ "rounded-e",
2299
+ [
2300
+ "border-start-end-radius",
2301
+ "border-end-end-radius"
2302
+ ]
2303
+ ],
2199
2304
  [
2200
2305
  "rounded-t",
2201
2306
  [
@@ -2226,6 +2331,30 @@ let corePlugins = {
2226
2331
  ]
2227
2332
  ],
2228
2333
  [
2334
+ [
2335
+ "rounded-ss",
2336
+ [
2337
+ "border-start-start-radius"
2338
+ ]
2339
+ ],
2340
+ [
2341
+ "rounded-se",
2342
+ [
2343
+ "border-start-end-radius"
2344
+ ]
2345
+ ],
2346
+ [
2347
+ "rounded-ee",
2348
+ [
2349
+ "border-end-end-radius"
2350
+ ]
2351
+ ],
2352
+ [
2353
+ "rounded-es",
2354
+ [
2355
+ "border-end-start-radius"
2356
+ ]
2357
+ ],
2229
2358
  [
2230
2359
  "rounded-tl",
2231
2360
  [
@@ -2288,6 +2417,26 @@ let corePlugins = {
2288
2417
  ]
2289
2418
  ],
2290
2419
  [
2420
+ [
2421
+ "border-s",
2422
+ [
2423
+ [
2424
+ "@defaults border-width",
2425
+ {}
2426
+ ],
2427
+ "border-inline-start-width"
2428
+ ]
2429
+ ],
2430
+ [
2431
+ "border-e",
2432
+ [
2433
+ [
2434
+ "@defaults border-width",
2435
+ {}
2436
+ ],
2437
+ "border-inline-end-width"
2438
+ ]
2439
+ ],
2291
2440
  [
2292
2441
  "border-t",
2293
2442
  [
@@ -2419,6 +2568,30 @@ let corePlugins = {
2419
2568
  ]
2420
2569
  });
2421
2570
  matchUtilities({
2571
+ "border-s": (value)=>{
2572
+ if (!corePlugins("borderOpacity")) {
2573
+ return {
2574
+ "border-inline-start-color": (0, _toColorValue.default)(value)
2575
+ };
2576
+ }
2577
+ return (0, _withAlphaVariable.default)({
2578
+ color: value,
2579
+ property: "border-inline-start-color",
2580
+ variable: "--tw-border-opacity"
2581
+ });
2582
+ },
2583
+ "border-e": (value)=>{
2584
+ if (!corePlugins("borderOpacity")) {
2585
+ return {
2586
+ "border-inline-end-color": (0, _toColorValue.default)(value)
2587
+ };
2588
+ }
2589
+ return (0, _withAlphaVariable.default)({
2590
+ color: value,
2591
+ property: "border-inline-end-color",
2592
+ variable: "--tw-border-opacity"
2593
+ });
2594
+ },
2422
2595
  "border-t": (value)=>{
2423
2596
  if (!corePlugins("borderOpacity")) {
2424
2597
  return {
@@ -2774,6 +2947,18 @@ let corePlugins = {
2774
2947
  ]
2775
2948
  ],
2776
2949
  [
2950
+ [
2951
+ "ps",
2952
+ [
2953
+ "padding-inline-start"
2954
+ ]
2955
+ ],
2956
+ [
2957
+ "pe",
2958
+ [
2959
+ "padding-inline-end"
2960
+ ]
2961
+ ],
2777
2962
  [
2778
2963
  "pt",
2779
2964
  [
@@ -2871,11 +3056,14 @@ let corePlugins = {
2871
3056
  let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
2872
3057
  value
2873
3058
  ];
2874
- let { fontFeatureSettings } = options;
3059
+ let { fontFeatureSettings , fontVariationSettings } = options;
2875
3060
  return {
2876
3061
  "font-family": Array.isArray(families) ? families.join(", ") : families,
2877
3062
  ...fontFeatureSettings === undefined ? {} : {
2878
3063
  "font-feature-settings": fontFeatureSettings
3064
+ },
3065
+ ...fontVariationSettings === undefined ? {} : {
3066
+ "font-variation-settings": fontVariationSettings
2879
3067
  }
2880
3068
  };
2881
3069
  }
@@ -2890,10 +3078,16 @@ let corePlugins = {
2890
3078
  },
2891
3079
  fontSize: ({ matchUtilities , theme })=>{
2892
3080
  matchUtilities({
2893
- text: (value)=>{
3081
+ text: (value, { modifier })=>{
2894
3082
  let [fontSize, options] = Array.isArray(value) ? value : [
2895
3083
  value
2896
3084
  ];
3085
+ if (modifier) {
3086
+ return {
3087
+ "font-size": fontSize,
3088
+ "line-height": modifier
3089
+ };
3090
+ }
2897
3091
  let { lineHeight , letterSpacing , fontWeight } = (0, _isPlainObject.default)(options) ? options : {
2898
3092
  lineHeight: options
2899
3093
  };
@@ -2912,6 +3106,7 @@ let corePlugins = {
2912
3106
  }
2913
3107
  }, {
2914
3108
  values: theme("fontSize"),
3109
+ modifiers: theme("lineHeight"),
2915
3110
  type: [
2916
3111
  "absolute-size",
2917
3112
  "relative-size",
@@ -23,6 +23,7 @@
23
23
  3. Use a more readable tab size.
24
24
  4. Use the user's configured `sans` font-family by default.
25
25
  5. Use the user's configured `sans` font-feature-settings by default.
26
+ 6. Use the user's configured `sans` font-variation-settings by default.
26
27
  */
27
28
 
28
29
  html {
@@ -32,6 +33,7 @@ html {
32
33
  tab-size: 4; /* 3 */
33
34
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
34
35
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
36
+ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
35
37
  }
36
38
 
37
39
  /*
@@ -41,6 +41,9 @@ function isCSSFunction(value) {
41
41
  const placeholder = "--tw-placeholder";
42
42
  const placeholderRe = new RegExp(placeholder, "g");
43
43
  function normalize(value, isRoot = true) {
44
+ if (value.startsWith("--")) {
45
+ return `var(${value})`;
46
+ }
44
47
  // Keep raw strings if it starts with `url(`
45
48
  if (value.includes("url(")) {
46
49
  return value.split(/(url\(.*?\))/g).filter(Boolean).map((part)=>{
@@ -123,6 +123,13 @@ function parseColorFormat(value) {
123
123
  }
124
124
  return value;
125
125
  }
126
+ function unwrapArbitraryModifier(modifier) {
127
+ modifier = modifier.slice(1, -1);
128
+ if (modifier.startsWith("--")) {
129
+ modifier = `var(${modifier})`;
130
+ }
131
+ return modifier;
132
+ }
126
133
  function asColor(modifier, options = {}, { tailwindConfig ={} } = {}) {
127
134
  var _options_values;
128
135
  if (((_options_values = options.values) === null || _options_values === void 0 ? void 0 : _options_values[modifier]) !== undefined) {
@@ -141,7 +148,7 @@ function asColor(modifier, options = {}, { tailwindConfig ={} } = {}) {
141
148
  }
142
149
  normalizedColor = parseColorFormat(normalizedColor);
143
150
  if (isArbitraryValue(alpha)) {
144
- return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, alpha.slice(1, -1));
151
+ return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, unwrapArbitraryModifier(alpha));
145
152
  }
146
153
  if (((_tailwindConfig_theme = tailwindConfig.theme) === null || _tailwindConfig_theme === void 0 ? void 0 : (_tailwindConfig_theme_opacity = _tailwindConfig_theme.opacity) === null || _tailwindConfig_theme_opacity === void 0 ? void 0 : _tailwindConfig_theme_opacity[alpha]) === undefined) {
147
154
  return undefined;
@@ -256,7 +263,7 @@ function* getMatchingTypes(types, rawModifier, options, tailwindConfig) {
256
263
  if (configValue !== null) {
257
264
  utilityModifier = configValue;
258
265
  } else if (isArbitraryValue(utilityModifier)) {
259
- utilityModifier = utilityModifier.slice(1, -1);
266
+ utilityModifier = unwrapArbitraryModifier(utilityModifier);
260
267
  }
261
268
  }
262
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "0.0.0-oxide-insiders.7f81849",
3
+ "version": "0.0.0-oxide-insiders.6c77544",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -70,7 +70,7 @@
70
70
  "postcss": "^8.0.9"
71
71
  },
72
72
  "dependencies": {
73
- "@tailwindcss/oxide": "0.0.0-oxide-insiders.7f81849",
73
+ "@tailwindcss/oxide": "0.0.0-oxide-insiders.6c77544",
74
74
  "arg": "^5.0.2",
75
75
  "browserslist": "^4.21.5",
76
76
  "chokidar": "^3.5.3",
@@ -1 +1 @@
1
- export default ["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","display","aspectRatio","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","whitespace","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","content"]
1
+ export default ["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","display","aspectRatio","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","captionSide","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","hyphens","whitespace","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","content"]
@@ -1,6 +1,7 @@
1
1
  import fs from 'fs'
2
2
  import * as path from 'path'
3
3
  import postcss from 'postcss'
4
+ import { env } from './lib/sharedState'
4
5
  import createUtilityPlugin from './util/createUtilityPlugin'
5
6
  import buildMediaQuery from './util/buildMediaQuery'
6
7
  import escapeClassName from './util/escapeClassName'
@@ -646,6 +647,8 @@ export let corePlugins = {
646
647
  ['inset-y', ['top', 'bottom']],
647
648
  ],
648
649
  [
650
+ ['start', ['inset-inline-start']],
651
+ ['end', ['inset-inline-end']],
649
652
  ['top', ['top']],
650
653
  ['right', ['right']],
651
654
  ['bottom', ['bottom']],
@@ -697,6 +700,8 @@ export let corePlugins = {
697
700
  ['my', ['margin-top', 'margin-bottom']],
698
701
  ],
699
702
  [
703
+ ['ms', ['margin-inline-start']],
704
+ ['me', ['margin-inline-end']],
700
705
  ['mt', ['margin-top']],
701
706
  ['mr', ['margin-right']],
702
707
  ['mb', ['margin-bottom']],
@@ -767,6 +772,13 @@ export let corePlugins = {
767
772
  })
768
773
  },
769
774
 
775
+ captionSide: ({ addUtilities }) => {
776
+ addUtilities({
777
+ '.caption-top': { 'caption-side': 'top' },
778
+ '.caption-bottom': { 'caption-side': 'bottom' },
779
+ })
780
+ },
781
+
770
782
  borderCollapse: ({ addUtilities }) => {
771
783
  addUtilities({
772
784
  '.border-collapse': { 'border-collapse': 'collapse' },
@@ -1045,6 +1057,8 @@ export let corePlugins = {
1045
1057
  ['scroll-my', ['scroll-margin-top', 'scroll-margin-bottom']],
1046
1058
  ],
1047
1059
  [
1060
+ ['scroll-ms', ['scroll-margin-inline-start']],
1061
+ ['scroll-me', ['scroll-margin-inline-end']],
1048
1062
  ['scroll-mt', ['scroll-margin-top']],
1049
1063
  ['scroll-mr', ['scroll-margin-right']],
1050
1064
  ['scroll-mb', ['scroll-margin-bottom']],
@@ -1061,6 +1075,8 @@ export let corePlugins = {
1061
1075
  ['scroll-py', ['scroll-padding-top', 'scroll-padding-bottom']],
1062
1076
  ],
1063
1077
  [
1078
+ ['scroll-ps', ['scroll-padding-inline-start']],
1079
+ ['scroll-pe', ['scroll-padding-inline-end']],
1064
1080
  ['scroll-pt', ['scroll-padding-top']],
1065
1081
  ['scroll-pr', ['scroll-padding-right']],
1066
1082
  ['scroll-pb', ['scroll-padding-bottom']],
@@ -1234,6 +1250,16 @@ export let corePlugins = {
1234
1250
  'space-x': (value) => {
1235
1251
  value = value === '0' ? '0px' : value
1236
1252
 
1253
+ if (env.OXIDE) {
1254
+ return {
1255
+ '& > :not([hidden]) ~ :not([hidden])': {
1256
+ '--tw-space-x-reverse': '0',
1257
+ 'margin-inline-end': `calc(${value} * var(--tw-space-x-reverse))`,
1258
+ 'margin-inline-start': `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`,
1259
+ },
1260
+ }
1261
+ }
1262
+
1237
1263
  return {
1238
1264
  '& > :not([hidden]) ~ :not([hidden])': {
1239
1265
  '--tw-space-x-reverse': '0',
@@ -1269,6 +1295,17 @@ export let corePlugins = {
1269
1295
  'divide-x': (value) => {
1270
1296
  value = value === '0' ? '0px' : value
1271
1297
 
1298
+ if (env.OXIDE) {
1299
+ return {
1300
+ '& > :not([hidden]) ~ :not([hidden])': {
1301
+ '@defaults border-width': {},
1302
+ '--tw-divide-x-reverse': '0',
1303
+ 'border-inline-end-width': `calc(${value} * var(--tw-divide-x-reverse))`,
1304
+ 'border-inline-start-width': `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`,
1305
+ },
1306
+ }
1307
+ }
1308
+
1272
1309
  return {
1273
1310
  '& > :not([hidden]) ~ :not([hidden])': {
1274
1311
  '@defaults border-width': {},
@@ -1436,6 +1473,14 @@ export let corePlugins = {
1436
1473
  })
1437
1474
  },
1438
1475
 
1476
+ hyphens: ({ addUtilities }) => {
1477
+ addUtilities({
1478
+ '.hyphens-none': { hyphens: 'none' },
1479
+ '.hyphens-manual': { hyphens: 'manual' },
1480
+ '.hyphens-auto': { hyphens: 'auto' },
1481
+ })
1482
+ },
1483
+
1439
1484
  whitespace: ({ addUtilities }) => {
1440
1485
  addUtilities({
1441
1486
  '.whitespace-normal': { 'white-space': 'normal' },
@@ -1458,12 +1503,18 @@ export let corePlugins = {
1458
1503
  borderRadius: createUtilityPlugin('borderRadius', [
1459
1504
  ['rounded', ['border-radius']],
1460
1505
  [
1506
+ ['rounded-s', ['border-start-start-radius', 'border-end-start-radius']],
1507
+ ['rounded-e', ['border-start-end-radius', 'border-end-end-radius']],
1461
1508
  ['rounded-t', ['border-top-left-radius', 'border-top-right-radius']],
1462
1509
  ['rounded-r', ['border-top-right-radius', 'border-bottom-right-radius']],
1463
1510
  ['rounded-b', ['border-bottom-right-radius', 'border-bottom-left-radius']],
1464
1511
  ['rounded-l', ['border-top-left-radius', 'border-bottom-left-radius']],
1465
1512
  ],
1466
1513
  [
1514
+ ['rounded-ss', ['border-start-start-radius']],
1515
+ ['rounded-se', ['border-start-end-radius']],
1516
+ ['rounded-ee', ['border-end-end-radius']],
1517
+ ['rounded-es', ['border-end-start-radius']],
1467
1518
  ['rounded-tl', ['border-top-left-radius']],
1468
1519
  ['rounded-tr', ['border-top-right-radius']],
1469
1520
  ['rounded-br', ['border-bottom-right-radius']],
@@ -1480,6 +1531,8 @@ export let corePlugins = {
1480
1531
  ['border-y', [['@defaults border-width', {}], 'border-top-width', 'border-bottom-width']],
1481
1532
  ],
1482
1533
  [
1534
+ ['border-s', [['@defaults border-width', {}], 'border-inline-start-width']],
1535
+ ['border-e', [['@defaults border-width', {}], 'border-inline-end-width']],
1483
1536
  ['border-t', [['@defaults border-width', {}], 'border-top-width']],
1484
1537
  ['border-r', [['@defaults border-width', {}], 'border-right-width']],
1485
1538
  ['border-b', [['@defaults border-width', {}], 'border-bottom-width']],
@@ -1562,6 +1615,32 @@ export let corePlugins = {
1562
1615
 
1563
1616
  matchUtilities(
1564
1617
  {
1618
+ 'border-s': (value) => {
1619
+ if (!corePlugins('borderOpacity')) {
1620
+ return {
1621
+ 'border-inline-start-color': toColorValue(value),
1622
+ }
1623
+ }
1624
+
1625
+ return withAlphaVariable({
1626
+ color: value,
1627
+ property: 'border-inline-start-color',
1628
+ variable: '--tw-border-opacity',
1629
+ })
1630
+ },
1631
+ 'border-e': (value) => {
1632
+ if (!corePlugins('borderOpacity')) {
1633
+ return {
1634
+ 'border-inline-end-color': toColorValue(value),
1635
+ }
1636
+ }
1637
+
1638
+ return withAlphaVariable({
1639
+ color: value,
1640
+ property: 'border-inline-end-color',
1641
+ variable: '--tw-border-opacity',
1642
+ })
1643
+ },
1565
1644
  'border-t': (value) => {
1566
1645
  if (!corePlugins('borderOpacity')) {
1567
1646
  return {
@@ -1798,6 +1877,8 @@ export let corePlugins = {
1798
1877
  ['py', ['padding-top', 'padding-bottom']],
1799
1878
  ],
1800
1879
  [
1880
+ ['ps', ['padding-inline-start']],
1881
+ ['pe', ['padding-inline-end']],
1801
1882
  ['pt', ['padding-top']],
1802
1883
  ['pr', ['padding-right']],
1803
1884
  ['pb', ['padding-bottom']],
@@ -1841,13 +1922,16 @@ export let corePlugins = {
1841
1922
  font: (value) => {
1842
1923
  let [families, options = {}] =
1843
1924
  Array.isArray(value) && isPlainObject(value[1]) ? value : [value]
1844
- let { fontFeatureSettings } = options
1925
+ let { fontFeatureSettings, fontVariationSettings } = options
1845
1926
 
1846
1927
  return {
1847
1928
  'font-family': Array.isArray(families) ? families.join(', ') : families,
1848
1929
  ...(fontFeatureSettings === undefined
1849
1930
  ? {}
1850
1931
  : { 'font-feature-settings': fontFeatureSettings }),
1932
+ ...(fontVariationSettings === undefined
1933
+ ? {}
1934
+ : { 'font-variation-settings': fontVariationSettings }),
1851
1935
  }
1852
1936
  },
1853
1937
  },
@@ -1861,9 +1945,16 @@ export let corePlugins = {
1861
1945
  fontSize: ({ matchUtilities, theme }) => {
1862
1946
  matchUtilities(
1863
1947
  {
1864
- text: (value) => {
1948
+ text: (value, { modifier }) => {
1865
1949
  let [fontSize, options] = Array.isArray(value) ? value : [value]
1866
1950
 
1951
+ if (modifier) {
1952
+ return {
1953
+ 'font-size': fontSize,
1954
+ 'line-height': modifier,
1955
+ }
1956
+ }
1957
+
1867
1958
  let { lineHeight, letterSpacing, fontWeight } = isPlainObject(options)
1868
1959
  ? options
1869
1960
  : { lineHeight: options }
@@ -1878,6 +1969,7 @@ export let corePlugins = {
1878
1969
  },
1879
1970
  {
1880
1971
  values: theme('fontSize'),
1972
+ modifiers: theme('lineHeight'),
1881
1973
  type: ['absolute-size', 'relative-size', 'length', 'percentage'],
1882
1974
  }
1883
1975
  )
@@ -23,6 +23,7 @@
23
23
  3. Use a more readable tab size.
24
24
  4. Use the user's configured `sans` font-family by default.
25
25
  5. Use the user's configured `sans` font-feature-settings by default.
26
+ 6. Use the user's configured `sans` font-variation-settings by default.
26
27
  */
27
28
 
28
29
  html {
@@ -32,6 +33,7 @@ html {
32
33
  tab-size: 4; /* 3 */
33
34
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
34
35
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
36
+ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
35
37
  }
36
38
 
37
39
  /*
@@ -16,6 +16,10 @@ const placeholderRe = new RegExp(placeholder, 'g')
16
16
  // This is not a data type, but rather a function that can normalize the
17
17
  // correct values.
18
18
  export function normalize(value, isRoot = true) {
19
+ if (value.startsWith('--')) {
20
+ return `var(${value})`
21
+ }
22
+
19
23
  // Keep raw strings if it starts with `url(`
20
24
  if (value.includes('url(')) {
21
25
  return value
@@ -133,6 +133,14 @@ export function parseColorFormat(value) {
133
133
  return value
134
134
  }
135
135
 
136
+ function unwrapArbitraryModifier(modifier) {
137
+ modifier = modifier.slice(1, -1)
138
+ if (modifier.startsWith('--')) {
139
+ modifier = `var(${modifier})`
140
+ }
141
+ return modifier
142
+ }
143
+
136
144
  export function asColor(modifier, options = {}, { tailwindConfig = {} } = {}) {
137
145
  if (options.values?.[modifier] !== undefined) {
138
146
  return parseColorFormat(options.values?.[modifier])
@@ -153,7 +161,7 @@ export function asColor(modifier, options = {}, { tailwindConfig = {} } = {}) {
153
161
  normalizedColor = parseColorFormat(normalizedColor)
154
162
 
155
163
  if (isArbitraryValue(alpha)) {
156
- return withAlphaValue(normalizedColor, alpha.slice(1, -1))
164
+ return withAlphaValue(normalizedColor, unwrapArbitraryModifier(alpha))
157
165
  }
158
166
 
159
167
  if (tailwindConfig.theme?.opacity?.[alpha] === undefined) {
@@ -287,7 +295,7 @@ export function* getMatchingTypes(types, rawModifier, options, tailwindConfig) {
287
295
  if (configValue !== null) {
288
296
  utilityModifier = configValue
289
297
  } else if (isArbitraryValue(utilityModifier)) {
290
- utilityModifier = utilityModifier.slice(1, -1)
298
+ utilityModifier = unwrapArbitraryModifier(utilityModifier)
291
299
  }
292
300
  }
293
301
  }
@@ -853,6 +853,7 @@ module.exports = {
853
853
  'top-left': 'top left',
854
854
  },
855
855
  transitionDelay: {
856
+ 0: '0s',
856
857
  75: '75ms',
857
858
  100: '100ms',
858
859
  150: '150ms',
@@ -864,6 +865,7 @@ module.exports = {
864
865
  },
865
866
  transitionDuration: {
866
867
  DEFAULT: '150ms',
868
+ 0: '0s',
867
869
  75: '75ms',
868
870
  100: '100ms',
869
871
  150: '150ms',
package/types/config.d.ts CHANGED
@@ -168,7 +168,13 @@ interface ThemeConfig {
168
168
  string,
169
169
  | string
170
170
  | string[]
171
- | [fontFamily: string | string[], configuration: Partial<{ fontFeatureSettings: string }>]
171
+ | [
172
+ fontFamily: string | string[],
173
+ configuration: Partial<{
174
+ fontFeatureSettings: string
175
+ fontVariationSettings: string
176
+ }>
177
+ ]
172
178
  >
173
179
  >
174
180
  fontSize: ResolvableTo<
@@ -1 +1 @@
1
- export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'display' | 'aspectRatio' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'whitespace' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
1
+ export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'display' | 'aspectRatio' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'captionSide' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'hyphens' | 'whitespace' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
@@ -327,9 +327,12 @@ export type DefaultTheme = Config['theme'] & {
327
327
  | 'top-left',
328
328
  string
329
329
  >
330
- transitionDelay: Record<'75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000', string>
330
+ transitionDelay: Record<
331
+ '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000',
332
+ string
333
+ >
331
334
  transitionDuration: Record<
332
- '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
335
+ '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
333
336
  string
334
337
  >
335
338
  transitionProperty: Record<