tailwindcss 0.0.0-insiders.667eac5 → 0.0.0-insiders.66c640b

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",
@@ -232,7 +232,25 @@ let variantPlugins = {
232
232
  let result = (0, _dataTypes.normalize)(typeof value === "function" ? value(extra) : value);
233
233
  if (!result.includes("&")) result = "&" + result;
234
234
  let [a, b] = fn("", extra);
235
- return result.replace(/&(\S+)?/g, (_, pseudo = "")=>a + pseudo + b);
235
+ let start = null;
236
+ let end = null;
237
+ let quotes = 0;
238
+ for(let i = 0; i < result.length; ++i){
239
+ let c = result[i];
240
+ if (c === "&") {
241
+ start = i;
242
+ } else if (c === "'" || c === '"') {
243
+ quotes += 1;
244
+ } else if (start !== null && c === " " && !quotes) {
245
+ end = i;
246
+ }
247
+ }
248
+ if (start !== null && end === null) {
249
+ end = result.length;
250
+ }
251
+ // Basically this but can handle quotes:
252
+ // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
253
+ return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
236
254
  }, {
237
255
  values: Object.fromEntries(pseudoVariants)
238
256
  });
@@ -1035,6 +1053,16 @@ let corePlugins = {
1035
1053
  }
1036
1054
  });
1037
1055
  },
1056
+ captionSide: ({ addUtilities })=>{
1057
+ addUtilities({
1058
+ ".caption-top": {
1059
+ "caption-side": "top"
1060
+ },
1061
+ ".caption-bottom": {
1062
+ "caption-side": "bottom"
1063
+ }
1064
+ });
1065
+ },
1038
1066
  borderCollapse: ({ addUtilities })=>{
1039
1067
  addUtilities({
1040
1068
  ".border-collapse": {
@@ -1821,6 +1849,9 @@ let corePlugins = {
1821
1849
  },
1822
1850
  justifyContent: ({ addUtilities })=>{
1823
1851
  addUtilities({
1852
+ ".justify-normal": {
1853
+ "justify-content": "normal"
1854
+ },
1824
1855
  ".justify-start": {
1825
1856
  "justify-content": "flex-start"
1826
1857
  },
@@ -1838,6 +1869,9 @@ let corePlugins = {
1838
1869
  },
1839
1870
  ".justify-evenly": {
1840
1871
  "justify-content": "space-evenly"
1872
+ },
1873
+ ".justify-stretch": {
1874
+ "justify-content": "stretch"
1841
1875
  }
1842
1876
  });
1843
1877
  },
@@ -2202,6 +2236,19 @@ let corePlugins = {
2202
2236
  }
2203
2237
  });
2204
2238
  },
2239
+ hyphens: ({ addUtilities })=>{
2240
+ addUtilities({
2241
+ ".hyphens-none": {
2242
+ hyphens: "none"
2243
+ },
2244
+ ".hyphens-manual": {
2245
+ hyphens: "manual"
2246
+ },
2247
+ ".hyphens-auto": {
2248
+ hyphens: "auto"
2249
+ }
2250
+ });
2251
+ },
2205
2252
  whitespace: ({ addUtilities })=>{
2206
2253
  addUtilities({
2207
2254
  ".whitespace-normal": {
@@ -3015,11 +3062,14 @@ let corePlugins = {
3015
3062
  let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
3016
3063
  value
3017
3064
  ];
3018
- let { fontFeatureSettings } = options;
3065
+ let { fontFeatureSettings , fontVariationSettings } = options;
3019
3066
  return {
3020
3067
  "font-family": Array.isArray(families) ? families.join(", ") : families,
3021
3068
  ...fontFeatureSettings === undefined ? {} : {
3022
3069
  "font-feature-settings": fontFeatureSettings
3070
+ },
3071
+ ...fontVariationSettings === undefined ? {} : {
3072
+ "font-variation-settings": fontVariationSettings
3023
3073
  }
3024
3074
  };
3025
3075
  }
@@ -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
  /*
@@ -13,7 +13,6 @@ const _generateRules = require("./generateRules");
13
13
  const _log = /*#__PURE__*/ _interopRequireDefault(require("../util/log"));
14
14
  const _cloneNodes = /*#__PURE__*/ _interopRequireDefault(require("../util/cloneNodes"));
15
15
  const _defaultExtractor = require("./defaultExtractor");
16
- const _oxide = /*#__PURE__*/ _interopRequireDefault(require("@tailwindcss/oxide"));
17
16
  function _interopRequireDefault(obj) {
18
17
  return obj && obj.__esModule ? obj : {
19
18
  default: obj
@@ -155,7 +154,7 @@ function expandTailwindAtRules(context) {
155
154
  env.DEBUG && console.time("Reading changed files");
156
155
  if (env.OXIDE) {
157
156
  // TODO: Pass through or implement `extractor`
158
- for (let candidate of _oxide.default.parseCandidateStringsFromFiles(context.changedContent)){
157
+ for (let candidate of require("@tailwindcss/oxide").parseCandidateStringsFromFiles(context.changedContent)){
159
158
  candidates.add(candidate);
160
159
  }
161
160
  // for (let { file, content, extension } of context.changedContent) {
@@ -198,10 +198,16 @@ function applyVariant(variant, matches, context) {
198
198
  };
199
199
  // Retrieve "modifier"
200
200
  {
201
- let match = /(.*)\/(.*)$/g.exec(variant);
202
- if (match && !context.variantMap.has(variant)) {
203
- variant = match[1];
204
- args.modifier = match[2];
201
+ let [baseVariant, ...modifiers] = (0, _splitAtTopLevelOnlyJs.splitAtTopLevelOnly)(variant, "/");
202
+ // This is a hack to support variants with `/` in them, like `ar-1/10/20:text-red-500`
203
+ // In this case 1/10 is a value but /20 is a modifier
204
+ if (modifiers.length > 1) {
205
+ baseVariant = baseVariant + "/" + modifiers.slice(0, -1).join("/");
206
+ modifiers = modifiers.slice(-1);
207
+ }
208
+ if (modifiers.length && !context.variantMap.has(variant)) {
209
+ variant = baseVariant;
210
+ args.modifier = modifiers[0];
205
211
  if (!(0, _featureFlags.flagEnabled)(context.tailwindConfig, "generalizedModifiers")) {
206
212
  return [];
207
213
  }
@@ -216,9 +222,9 @@ function applyVariant(variant, matches, context) {
216
222
  // But we don't want:
217
223
  // @-[200px] (`-` is incorrect)
218
224
  // group[:hover] (`-` is missing)
219
- let match1 = /(.)(-?)\[(.*)\]/g.exec(variant);
220
- if (match1) {
221
- let [, char, seperator, value] = match1;
225
+ let match = /(.)(-?)\[(.*)\]/g.exec(variant);
226
+ if (match) {
227
+ let [, char, seperator, value] = match;
222
228
  // @-[200px] case
223
229
  if (char === "@" && seperator === "-") return [];
224
230
  // group[:hover] case
@@ -167,6 +167,11 @@ class Offsets {
167
167
  if (a.layer !== b.layer) {
168
168
  return this.layerPositions[a.layer] - this.layerPositions[b.layer];
169
169
  }
170
+ // When sorting the `variants` layer, we need to sort based on the parent layer as well within
171
+ // this variants layer.
172
+ if (a.parentLayer !== b.parentLayer) {
173
+ return this.layerPositions[a.parentLayer] - this.layerPositions[b.parentLayer];
174
+ }
170
175
  // Sort based on the sorting function
171
176
  for (let aOptions of a.options){
172
177
  for (let bOptions of b.options){
@@ -926,21 +926,40 @@ function registerPlugins(plugins, context) {
926
926
  };
927
927
  // Generate a list of strings for autocompletion purposes, e.g.
928
928
  // ['uppercase', 'lowercase', ...]
929
- context.getClassList = function getClassList() {
929
+ context.getClassList = function getClassList(options = {}) {
930
930
  let output = [];
931
931
  for (let util of classList){
932
932
  if (Array.isArray(util)) {
933
- let [utilName, options] = util;
933
+ var _utilOptions_types;
934
+ let [utilName, utilOptions] = util;
934
935
  let negativeClasses = [];
935
- var _options_values;
936
- for (let [key, value] of Object.entries((_options_values = options === null || options === void 0 ? void 0 : options.values) !== null && _options_values !== void 0 ? _options_values : {})){
936
+ var _utilOptions_modifiers;
937
+ let modifiers = Object.keys((_utilOptions_modifiers = utilOptions === null || utilOptions === void 0 ? void 0 : utilOptions.modifiers) !== null && _utilOptions_modifiers !== void 0 ? _utilOptions_modifiers : {});
938
+ if (utilOptions === null || utilOptions === void 0 ? void 0 : (_utilOptions_types = utilOptions.types) === null || _utilOptions_types === void 0 ? void 0 : _utilOptions_types.some(({ type })=>type === "color")) {
939
+ var _context_tailwindConfig_theme_opacity;
940
+ modifiers.push(...Object.keys((_context_tailwindConfig_theme_opacity = context.tailwindConfig.theme.opacity) !== null && _context_tailwindConfig_theme_opacity !== void 0 ? _context_tailwindConfig_theme_opacity : {}));
941
+ }
942
+ let metadata = {
943
+ modifiers
944
+ };
945
+ let includeMetadata = options.includeMetadata && modifiers.length > 0;
946
+ var _utilOptions_values;
947
+ for (let [key, value] of Object.entries((_utilOptions_values = utilOptions === null || utilOptions === void 0 ? void 0 : utilOptions.values) !== null && _utilOptions_values !== void 0 ? _utilOptions_values : {})){
937
948
  // Ignore undefined and null values
938
949
  if (value == null) {
939
950
  continue;
940
951
  }
941
- output.push((0, _nameClass.formatClass)(utilName, key));
942
- if ((options === null || options === void 0 ? void 0 : options.supportsNegativeValues) && (0, _negateValue.default)(value)) {
943
- negativeClasses.push((0, _nameClass.formatClass)(utilName, `-${key}`));
952
+ let cls = (0, _nameClass.formatClass)(utilName, key);
953
+ output.push(includeMetadata ? [
954
+ cls,
955
+ metadata
956
+ ] : cls);
957
+ if ((utilOptions === null || utilOptions === void 0 ? void 0 : utilOptions.supportsNegativeValues) && (0, _negateValue.default)(value)) {
958
+ let cls1 = (0, _nameClass.formatClass)(utilName, `-${key}`);
959
+ negativeClasses.push(includeMetadata ? [
960
+ cls1,
961
+ metadata
962
+ ] : cls1);
944
963
  }
945
964
  }
946
965
  output.push(...negativeClasses);
package/lib/plugin.js CHANGED
@@ -37,6 +37,56 @@ module.exports = function tailwindcss(configOrPath) {
37
37
  }
38
38
  (0, _processTailwindFeatures.default)(context)(root, result);
39
39
  },
40
+ _sharedState.env.OXIDE && function lightningCssPlugin(_root, result) {
41
+ let postcss = require("postcss");
42
+ let lightningcss = require("lightningcss");
43
+ let browserslist = require("browserslist");
44
+ try {
45
+ let transformed = lightningcss.transform({
46
+ filename: result.opts.from,
47
+ code: Buffer.from(result.root.toString()),
48
+ minify: false,
49
+ sourceMap: !!result.map,
50
+ inputSourceMap: result.map ? result.map.toString() : undefined,
51
+ targets: typeof process !== "undefined" && process.env.JEST_WORKER_ID ? {
52
+ chrome: 106 << 16
53
+ } : lightningcss.browserslistToTargets(browserslist(require("../package.json").browserslist)),
54
+ drafts: {
55
+ nesting: true,
56
+ customMedia: true
57
+ }
58
+ });
59
+ var _result_map;
60
+ result.map = Object.assign((_result_map = result.map) !== null && _result_map !== void 0 ? _result_map : {}, {
61
+ toJSON () {
62
+ return transformed.map.toJSON();
63
+ },
64
+ toString () {
65
+ return transformed.map.toString();
66
+ }
67
+ });
68
+ result.root = postcss.parse(transformed.code.toString("utf8"));
69
+ } catch (err) {
70
+ if (typeof process !== "undefined" && process.env.JEST_WORKER_ID) {
71
+ let lines = err.source.split("\n");
72
+ err = new Error([
73
+ "Error formatting using Lightning CSS:",
74
+ "",
75
+ ...[
76
+ "```css",
77
+ ...lines.slice(Math.max(err.loc.line - 3, 0), err.loc.line),
78
+ " ".repeat(err.loc.column - 1) + "^-- " + err.toString(),
79
+ ...lines.slice(err.loc.line, err.loc.line + 2),
80
+ "```"
81
+ ]
82
+ ].join("\n"));
83
+ }
84
+ if (Error.captureStackTrace) {
85
+ Error.captureStackTrace(err, lightningCssPlugin);
86
+ }
87
+ throw err;
88
+ }
89
+ },
40
90
  _sharedState.env.DEBUG && function(root) {
41
91
  console.timeEnd("JIT TOTAL");
42
92
  console.log("\n");
package/lib/util/color.js CHANGED
@@ -24,8 +24,8 @@ let VALUE = /(?:\d+|\d*\.\d+)%?/;
24
24
  let SEP = /(?:\s*,\s*|\s+)/;
25
25
  let ALPHA_SEP = /\s*[,/]\s*/;
26
26
  let CUSTOM_PROPERTY = /var\(--(?:[^ )]*?)\)/;
27
- let RGB = new RegExp(`^(rgb)a?\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
28
- let HSL = new RegExp(`^(hsl)a?\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
27
+ let RGB = new RegExp(`^(rgba?)\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
28
+ let HSL = new RegExp(`^(hsla?)\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
29
29
  function parseColor(value, { loose =false } = {}) {
30
30
  var _match_, _match__toString;
31
31
  if (typeof value !== "string") {
@@ -80,6 +80,17 @@ function parseColor(value, { loose =false } = {}) {
80
80
  match[3],
81
81
  match[4]
82
82
  ].filter(Boolean).map((v)=>v.toString());
83
+ // rgba(var(--my-color), 0.1)
84
+ // hsla(var(--my-color), 0.1)
85
+ if (color.length === 2 && color[0].startsWith("var(")) {
86
+ return {
87
+ mode: match[1],
88
+ color: [
89
+ color[0]
90
+ ],
91
+ alpha: color[1]
92
+ };
93
+ }
83
94
  if (!loose && color.length !== 3) {
84
95
  return null;
85
96
  }
@@ -94,5 +105,8 @@ function parseColor(value, { loose =false } = {}) {
94
105
  }
95
106
  function formatColor({ mode , color , alpha }) {
96
107
  let hasAlpha = alpha !== undefined;
108
+ if (mode === "rgba" || mode === "hsla") {
109
+ return `${mode}(${color.join(", ")}${hasAlpha ? `, ${alpha}` : ""})`;
110
+ }
97
111
  return `${mode}(${color.join(" ")}${hasAlpha ? ` / ${alpha}` : ""})`;
98
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "0.0.0-insiders.667eac5",
3
+ "version": "0.0.0-insiders.66c640b",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -41,7 +41,6 @@
41
41
  "stubs/*.stub.js",
42
42
  "nesting/*",
43
43
  "types/**/*",
44
- "oxide-node-api-shim",
45
44
  "*.d.ts",
46
45
  "*.css",
47
46
  "*.js"
@@ -52,6 +51,7 @@
52
51
  "@swc/jest": "0.2.24",
53
52
  "@swc/register": "0.1.10",
54
53
  "autoprefixer": "^10.4.13",
54
+ "browserslist": "^4.21.4",
55
55
  "concurrently": "^7.5.0",
56
56
  "cssnano": "^5.1.14",
57
57
  "esbuild": "^0.16.10",
@@ -60,6 +60,7 @@
60
60
  "eslint-plugin-prettier": "^4.2.1",
61
61
  "jest": "^28.1.3",
62
62
  "jest-diff": "^28.1.3",
63
+ "lightningcss": "^1.18.0",
63
64
  "prettier": "^2.8.1",
64
65
  "rimraf": "^3.0.0",
65
66
  "source-map-js": "^1.0.2",
@@ -69,7 +70,6 @@
69
70
  "postcss": "^8.0.9"
70
71
  },
71
72
  "dependencies": {
72
- "@tailwindcss/oxide": "file:./oxide-node-api-shim",
73
73
  "arg": "^5.0.2",
74
74
  "chokidar": "^3.5.3",
75
75
  "color-name": "^1.1.4",
@@ -84,7 +84,7 @@
84
84
  "normalize-path": "^3.0.0",
85
85
  "object-hash": "^3.0.0",
86
86
  "picocolors": "^1.0.0",
87
- "postcss": "^8.4.21",
87
+ "postcss": "^8.0.9",
88
88
  "postcss-import": "^14.1.0",
89
89
  "postcss-js": "^4.0.0",
90
90
  "postcss-load-config": "^3.1.4",
@@ -111,6 +111,9 @@
111
111
  "/standalone-cli/",
112
112
  "\\.test\\.skip\\.js$"
113
113
  ],
114
+ "transformIgnorePatterns": [
115
+ "node_modules/(?!lightningcss)"
116
+ ],
114
117
  "transform": {
115
118
  "\\.js$": "@swc/jest",
116
119
  "\\.ts$": "@swc/jest"
@@ -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"]
@@ -168,7 +168,30 @@ export let variantPlugins = {
168
168
  if (!result.includes('&')) result = '&' + result
169
169
 
170
170
  let [a, b] = fn('', extra)
171
- return result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
171
+
172
+ let start = null
173
+ let end = null
174
+ let quotes = 0
175
+
176
+ for (let i = 0; i < result.length; ++i) {
177
+ let c = result[i]
178
+ if (c === '&') {
179
+ start = i
180
+ } else if (c === "'" || c === '"') {
181
+ quotes += 1
182
+ } else if (start !== null && c === ' ' && !quotes) {
183
+ end = i
184
+ }
185
+ }
186
+
187
+ if (start !== null && end === null) {
188
+ end = result.length
189
+ }
190
+
191
+ // Basically this but can handle quotes:
192
+ // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
193
+
194
+ return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end)
172
195
  },
173
196
  { values: Object.fromEntries(pseudoVariants) }
174
197
  )
@@ -749,6 +772,13 @@ export let corePlugins = {
749
772
  })
750
773
  },
751
774
 
775
+ captionSide: ({ addUtilities }) => {
776
+ addUtilities({
777
+ '.caption-top': { 'caption-side': 'top' },
778
+ '.caption-bottom': { 'caption-side': 'bottom' },
779
+ })
780
+ },
781
+
752
782
  borderCollapse: ({ addUtilities }) => {
753
783
  addUtilities({
754
784
  '.border-collapse': { 'border-collapse': 'collapse' },
@@ -1188,12 +1218,14 @@ export let corePlugins = {
1188
1218
 
1189
1219
  justifyContent: ({ addUtilities }) => {
1190
1220
  addUtilities({
1221
+ '.justify-normal': { 'justify-content': 'normal' },
1191
1222
  '.justify-start': { 'justify-content': 'flex-start' },
1192
1223
  '.justify-end': { 'justify-content': 'flex-end' },
1193
1224
  '.justify-center': { 'justify-content': 'center' },
1194
1225
  '.justify-between': { 'justify-content': 'space-between' },
1195
1226
  '.justify-around': { 'justify-content': 'space-around' },
1196
1227
  '.justify-evenly': { 'justify-content': 'space-evenly' },
1228
+ '.justify-stretch': { 'justify-content': 'stretch' },
1197
1229
  })
1198
1230
  },
1199
1231
 
@@ -1443,6 +1475,14 @@ export let corePlugins = {
1443
1475
  })
1444
1476
  },
1445
1477
 
1478
+ hyphens: ({ addUtilities }) => {
1479
+ addUtilities({
1480
+ '.hyphens-none': { hyphens: 'none' },
1481
+ '.hyphens-manual': { hyphens: 'manual' },
1482
+ '.hyphens-auto': { hyphens: 'auto' },
1483
+ })
1484
+ },
1485
+
1446
1486
  whitespace: ({ addUtilities }) => {
1447
1487
  addUtilities({
1448
1488
  '.whitespace-normal': { 'white-space': 'normal' },
@@ -1884,13 +1924,16 @@ export let corePlugins = {
1884
1924
  font: (value) => {
1885
1925
  let [families, options = {}] =
1886
1926
  Array.isArray(value) && isPlainObject(value[1]) ? value : [value]
1887
- let { fontFeatureSettings } = options
1927
+ let { fontFeatureSettings, fontVariationSettings } = options
1888
1928
 
1889
1929
  return {
1890
1930
  'font-family': Array.isArray(families) ? families.join(', ') : families,
1891
1931
  ...(fontFeatureSettings === undefined
1892
1932
  ? {}
1893
1933
  : { 'font-feature-settings': fontFeatureSettings }),
1934
+ ...(fontVariationSettings === undefined
1935
+ ? {}
1936
+ : { 'font-variation-settings': fontVariationSettings }),
1894
1937
  }
1895
1938
  },
1896
1939
  },
@@ -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
  /*
@@ -6,8 +6,6 @@ import log from '../util/log'
6
6
  import cloneNodes from '../util/cloneNodes'
7
7
  import { defaultExtractor } from './defaultExtractor'
8
8
 
9
- import oxide from '@tailwindcss/oxide'
10
-
11
9
  let env = sharedState.env
12
10
 
13
11
  const builtInExtractors = {
@@ -134,7 +132,7 @@ export default function expandTailwindAtRules(context) {
134
132
 
135
133
  if (env.OXIDE) {
136
134
  // TODO: Pass through or implement `extractor`
137
- for (let candidate of oxide.parseCandidateStringsFromFiles(
135
+ for (let candidate of require('@tailwindcss/oxide').parseCandidateStringsFromFiles(
138
136
  context.changedContent
139
137
  // Object.assign({}, builtInTransformers, context.tailwindConfig.content.transform)
140
138
  )) {
@@ -152,10 +152,18 @@ function applyVariant(variant, matches, context) {
152
152
 
153
153
  // Retrieve "modifier"
154
154
  {
155
- let match = /(.*)\/(.*)$/g.exec(variant)
156
- if (match && !context.variantMap.has(variant)) {
157
- variant = match[1]
158
- args.modifier = match[2]
155
+ let [baseVariant, ...modifiers] = splitAtTopLevelOnly(variant, '/')
156
+
157
+ // This is a hack to support variants with `/` in them, like `ar-1/10/20:text-red-500`
158
+ // In this case 1/10 is a value but /20 is a modifier
159
+ if (modifiers.length > 1) {
160
+ baseVariant = baseVariant + '/' + modifiers.slice(0, -1).join('/')
161
+ modifiers = modifiers.slice(-1)
162
+ }
163
+
164
+ if (modifiers.length && !context.variantMap.has(variant)) {
165
+ variant = baseVariant
166
+ args.modifier = modifiers[0]
159
167
 
160
168
  if (!flagEnabled(context.tailwindConfig, 'generalizedModifiers')) {
161
169
  return []
@@ -209,6 +209,12 @@ export class Offsets {
209
209
  return this.layerPositions[a.layer] - this.layerPositions[b.layer]
210
210
  }
211
211
 
212
+ // When sorting the `variants` layer, we need to sort based on the parent layer as well within
213
+ // this variants layer.
214
+ if (a.parentLayer !== b.parentLayer) {
215
+ return this.layerPositions[a.parentLayer] - this.layerPositions[b.parentLayer]
216
+ }
217
+
212
218
  // Sort based on the sorting function
213
219
  for (let aOptions of a.options) {
214
220
  for (let bOptions of b.options) {
@@ -962,23 +962,35 @@ function registerPlugins(plugins, context) {
962
962
 
963
963
  // Generate a list of strings for autocompletion purposes, e.g.
964
964
  // ['uppercase', 'lowercase', ...]
965
- context.getClassList = function getClassList() {
965
+ context.getClassList = function getClassList(options = {}) {
966
966
  let output = []
967
967
 
968
968
  for (let util of classList) {
969
969
  if (Array.isArray(util)) {
970
- let [utilName, options] = util
970
+ let [utilName, utilOptions] = util
971
971
  let negativeClasses = []
972
972
 
973
- for (let [key, value] of Object.entries(options?.values ?? {})) {
973
+ let modifiers = Object.keys(utilOptions?.modifiers ?? {})
974
+
975
+ if (utilOptions?.types?.some(({ type }) => type === 'color')) {
976
+ modifiers.push(...Object.keys(context.tailwindConfig.theme.opacity ?? {}))
977
+ }
978
+
979
+ let metadata = { modifiers }
980
+ let includeMetadata = options.includeMetadata && modifiers.length > 0
981
+
982
+ for (let [key, value] of Object.entries(utilOptions?.values ?? {})) {
974
983
  // Ignore undefined and null values
975
984
  if (value == null) {
976
985
  continue
977
986
  }
978
987
 
979
- output.push(formatClass(utilName, key))
980
- if (options?.supportsNegativeValues && negateValue(value)) {
981
- negativeClasses.push(formatClass(utilName, `-${key}`))
988
+ let cls = formatClass(utilName, key)
989
+ output.push(includeMetadata ? [cls, metadata] : cls)
990
+
991
+ if (utilOptions?.supportsNegativeValues && negateValue(value)) {
992
+ let cls = formatClass(utilName, `-${key}`)
993
+ negativeClasses.push(includeMetadata ? [cls, metadata] : cls)
982
994
  }
983
995
  }
984
996
 
package/src/plugin.js CHANGED
@@ -34,6 +34,66 @@ module.exports = function tailwindcss(configOrPath) {
34
34
 
35
35
  processTailwindFeatures(context)(root, result)
36
36
  },
37
+ env.OXIDE &&
38
+ function lightningCssPlugin(_root, result) {
39
+ let postcss = require('postcss')
40
+ let lightningcss = require('lightningcss')
41
+ let browserslist = require('browserslist')
42
+
43
+ try {
44
+ let transformed = lightningcss.transform({
45
+ filename: result.opts.from,
46
+ code: Buffer.from(result.root.toString()),
47
+ minify: false,
48
+ sourceMap: !!result.map,
49
+ inputSourceMap: result.map ? result.map.toString() : undefined,
50
+ targets:
51
+ typeof process !== 'undefined' && process.env.JEST_WORKER_ID
52
+ ? { chrome: 106 << 16 }
53
+ : lightningcss.browserslistToTargets(
54
+ browserslist(require('../package.json').browserslist)
55
+ ),
56
+
57
+ drafts: {
58
+ nesting: true,
59
+ customMedia: true,
60
+ },
61
+ })
62
+
63
+ result.map = Object.assign(result.map ?? {}, {
64
+ toJSON() {
65
+ return transformed.map.toJSON()
66
+ },
67
+ toString() {
68
+ return transformed.map.toString()
69
+ },
70
+ })
71
+
72
+ result.root = postcss.parse(transformed.code.toString('utf8'))
73
+ } catch (err) {
74
+ if (typeof process !== 'undefined' && process.env.JEST_WORKER_ID) {
75
+ let lines = err.source.split('\n')
76
+ err = new Error(
77
+ [
78
+ 'Error formatting using Lightning CSS:',
79
+ '',
80
+ ...[
81
+ '```css',
82
+ ...lines.slice(Math.max(err.loc.line - 3, 0), err.loc.line),
83
+ ' '.repeat(err.loc.column - 1) + '^-- ' + err.toString(),
84
+ ...lines.slice(err.loc.line, err.loc.line + 2),
85
+ '```',
86
+ ],
87
+ ].join('\n')
88
+ )
89
+ }
90
+
91
+ if (Error.captureStackTrace) {
92
+ Error.captureStackTrace(err, lightningCssPlugin)
93
+ }
94
+ throw err
95
+ }
96
+ },
37
97
  env.DEBUG &&
38
98
  function (root) {
39
99
  console.timeEnd('JIT TOTAL')
package/src/util/color.js CHANGED
@@ -8,10 +8,10 @@ let ALPHA_SEP = /\s*[,/]\s*/
8
8
  let CUSTOM_PROPERTY = /var\(--(?:[^ )]*?)\)/
9
9
 
10
10
  let RGB = new RegExp(
11
- `^(rgb)a?\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`
11
+ `^(rgba?)\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`
12
12
  )
13
13
  let HSL = new RegExp(
14
- `^(hsl)a?\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`
14
+ `^(hsla?)\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`
15
15
  )
16
16
 
17
17
  // In "loose" mode the color may contain fewer than 3 parts, as long as at least
@@ -52,6 +52,16 @@ export function parseColor(value, { loose = false } = {}) {
52
52
 
53
53
  let color = [match[2], match[3], match[4]].filter(Boolean).map((v) => v.toString())
54
54
 
55
+ // rgba(var(--my-color), 0.1)
56
+ // hsla(var(--my-color), 0.1)
57
+ if (color.length === 2 && color[0].startsWith('var(')) {
58
+ return {
59
+ mode: match[1],
60
+ color: [color[0]],
61
+ alpha: color[1],
62
+ }
63
+ }
64
+
55
65
  if (!loose && color.length !== 3) {
56
66
  return null
57
67
  }
@@ -69,5 +79,10 @@ export function parseColor(value, { loose = false } = {}) {
69
79
 
70
80
  export function formatColor({ mode, color, alpha }) {
71
81
  let hasAlpha = alpha !== undefined
82
+
83
+ if (mode === 'rgba' || mode === 'hsla') {
84
+ return `${mode}(${color.join(', ')}${hasAlpha ? `, ${alpha}` : ''})`
85
+ }
86
+
72
87
  return `${mode}(${color.join(' ')}${hasAlpha ? ` / ${alpha}` : ''})`
73
88
  }
@@ -584,6 +584,7 @@ module.exports = {
584
584
  }),
585
585
  maxHeight: ({ theme }) => ({
586
586
  ...theme('spacing'),
587
+ none: 'none',
587
588
  full: '100%',
588
589
  screen: '100vh',
589
590
  min: 'min-content',
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'
@@ -1,21 +0,0 @@
1
- let log = require('../lib/util/log').default
2
-
3
- // This should be a temporary file.
4
- //
5
- // Right now we require `@tailwindcss/oxide` as one of the packages in package.json. This contains
6
- // all the necessary Rust bindings. However, we won't ship those bindings by default yet, and
7
- // therefore you need to install the explicit oxide-insiders version where the Rust bindings are
8
- // available.
9
- //
10
- // To ensure that this doesn't break existing builds of the insiders release, we will use this shim
11
- // to implement all the APIs and show a warning in case you are trying to run `OXIDE=1 npx
12
- // tailwindcs ...` without having installed the oxide-insiders version.
13
- module.exports.parseCandidateStringsFromFiles = function parseCandidateStringsFromFiles(
14
- _changedContent
15
- ) {
16
- log.warn('oxide-required', [
17
- 'It looks like you are trying to run Tailwind CSS with the OXIDE=1 environment variable.',
18
- 'This version does not have the necessary Rust bindings, so please install the `tailwindcss@insiders-oxide` version instead.',
19
- ])
20
- return []
21
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@tailwindcss/oxide-shim",
3
- "main": "./index.js",
4
- "license": "MIT"
5
- }