tailwindcss 0.0.0-oxide-insiders.cf21d57 → 0.0.0-oxide-insiders.b88c8c4

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.
@@ -2740,30 +2740,63 @@ let corePlugins = {
2740
2740
  "any"
2741
2741
  ]
2742
2742
  };
2743
+ let positionOptions = {
2744
+ values: theme("gradientColorStopPositions"),
2745
+ type: [
2746
+ "length",
2747
+ "percentage"
2748
+ ]
2749
+ };
2743
2750
  matchUtilities({
2744
2751
  from: (value)=>{
2745
2752
  let transparentToValue = transparentTo(value);
2746
2753
  return {
2747
- "--tw-gradient-from": (0, _toColorValue.default)(value, "from"),
2748
- "--tw-gradient-to": transparentToValue,
2754
+ "--tw-gradient-from": `${(0, _toColorValue.default)(value, "from")} var(--tw-gradient-from-position)`,
2755
+ "--tw-gradient-from-position": " ",
2756
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-from-position)`,
2757
+ "--tw-gradient-to-position": " ",
2749
2758
  "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
2750
2759
  };
2751
2760
  }
2752
2761
  }, options);
2762
+ matchUtilities({
2763
+ from: (value)=>{
2764
+ return {
2765
+ "--tw-gradient-from-position": value
2766
+ };
2767
+ }
2768
+ }, positionOptions);
2753
2769
  matchUtilities({
2754
2770
  via: (value)=>{
2755
2771
  let transparentToValue = transparentTo(value);
2756
2772
  return {
2757
- "--tw-gradient-to": transparentToValue,
2758
- "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")}, var(--tw-gradient-to)`
2773
+ "--tw-gradient-via-position": " ",
2774
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
2775
+ "--tw-gradient-to-position": " ",
2776
+ "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
2759
2777
  };
2760
2778
  }
2761
2779
  }, options);
2780
+ matchUtilities({
2781
+ via: (value)=>{
2782
+ return {
2783
+ "--tw-gradient-via-position": value
2784
+ };
2785
+ }
2786
+ }, positionOptions);
2762
2787
  matchUtilities({
2763
2788
  to: (value)=>({
2764
- "--tw-gradient-to": (0, _toColorValue.default)(value, "to")
2789
+ "--tw-gradient-to": `${(0, _toColorValue.default)(value, "to")} var(--tw-gradient-to-position)`,
2790
+ "--tw-gradient-to-position": " "
2765
2791
  })
2766
2792
  }, options);
2793
+ matchUtilities({
2794
+ to: (value)=>{
2795
+ return {
2796
+ "--tw-gradient-to-position": value
2797
+ };
2798
+ }
2799
+ }, positionOptions);
2767
2800
  };
2768
2801
  })(),
2769
2802
  boxDecorationBreak: ({ addUtilities })=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "0.0.0-oxide-insiders.cf21d57",
3
+ "version": "0.0.0-oxide-insiders.b88c8c4",
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.cf21d57",
73
+ "@tailwindcss/oxide": "0.0.0-oxide-insiders.b88c8c4",
74
74
  "arg": "^5.0.2",
75
75
  "browserslist": "^4.21.5",
76
76
  "chokidar": "^3.5.3",
@@ -1756,40 +1756,92 @@ export let corePlugins = {
1756
1756
  type: ['color', 'any'],
1757
1757
  }
1758
1758
 
1759
+ let positionOptions = {
1760
+ values: theme('gradientColorStopPositions'),
1761
+ type: ['length', 'percentage'],
1762
+ }
1763
+
1759
1764
  matchUtilities(
1760
1765
  {
1761
1766
  from: (value) => {
1762
1767
  let transparentToValue = transparentTo(value)
1763
1768
 
1764
1769
  return {
1765
- '--tw-gradient-from': toColorValue(value, 'from'),
1766
- '--tw-gradient-to': transparentToValue,
1770
+ '--tw-gradient-from': `${toColorValue(
1771
+ value,
1772
+ 'from'
1773
+ )} var(--tw-gradient-from-position)`,
1774
+ '--tw-gradient-from-position': ' ',
1775
+ '--tw-gradient-to': `${transparentToValue} var(--tw-gradient-from-position)`,
1776
+ '--tw-gradient-to-position': ' ',
1767
1777
  '--tw-gradient-stops': `var(--tw-gradient-from), var(--tw-gradient-to)`,
1768
1778
  }
1769
1779
  },
1770
1780
  },
1771
1781
  options
1772
1782
  )
1783
+
1784
+ matchUtilities(
1785
+ {
1786
+ from: (value) => {
1787
+ return {
1788
+ '--tw-gradient-from-position': value,
1789
+ }
1790
+ },
1791
+ },
1792
+ positionOptions
1793
+ )
1794
+
1773
1795
  matchUtilities(
1774
1796
  {
1775
1797
  via: (value) => {
1776
1798
  let transparentToValue = transparentTo(value)
1777
1799
 
1778
1800
  return {
1779
- '--tw-gradient-to': transparentToValue,
1801
+ '--tw-gradient-via-position': ' ',
1802
+ '--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`,
1803
+ '--tw-gradient-to-position': ' ',
1780
1804
  '--tw-gradient-stops': `var(--tw-gradient-from), ${toColorValue(
1781
1805
  value,
1782
1806
  'via'
1783
- )}, var(--tw-gradient-to)`,
1807
+ )} var(--tw-gradient-via-position), var(--tw-gradient-to)`,
1784
1808
  }
1785
1809
  },
1786
1810
  },
1787
1811
  options
1788
1812
  )
1813
+
1789
1814
  matchUtilities(
1790
- { to: (value) => ({ '--tw-gradient-to': toColorValue(value, 'to') }) },
1815
+ {
1816
+ via: (value) => {
1817
+ return {
1818
+ '--tw-gradient-via-position': value,
1819
+ }
1820
+ },
1821
+ },
1822
+ positionOptions
1823
+ )
1824
+
1825
+ matchUtilities(
1826
+ {
1827
+ to: (value) => ({
1828
+ '--tw-gradient-to': `${toColorValue(value, 'to')} var(--tw-gradient-to-position)`,
1829
+ '--tw-gradient-to-position': ' ',
1830
+ }),
1831
+ },
1791
1832
  options
1792
1833
  )
1834
+
1835
+ matchUtilities(
1836
+ {
1837
+ to: (value) => {
1838
+ return {
1839
+ '--tw-gradient-to-position': value,
1840
+ }
1841
+ },
1842
+ },
1843
+ positionOptions
1844
+ )
1793
1845
  }
1794
1846
  })(),
1795
1847
 
@@ -355,6 +355,29 @@ module.exports = {
355
355
  },
356
356
  gap: ({ theme }) => theme('spacing'),
357
357
  gradientColorStops: ({ theme }) => theme('colors'),
358
+ gradientColorStopPositions: {
359
+ '0%': '0%',
360
+ '5%': '5%',
361
+ '10%': '10%',
362
+ '15%': '15%',
363
+ '20%': '20%',
364
+ '25%': '25%',
365
+ '30%': '30%',
366
+ '35%': '35%',
367
+ '40%': '40%',
368
+ '45%': '45%',
369
+ '50%': '50%',
370
+ '55%': '55%',
371
+ '60%': '60%',
372
+ '65%': '65%',
373
+ '70%': '70%',
374
+ '75%': '75%',
375
+ '80%': '80%',
376
+ '85%': '85%',
377
+ '90%': '90%',
378
+ '95%': '95%',
379
+ '100%': '100%',
380
+ },
358
381
  grayscale: {
359
382
  0: '0',
360
383
  DEFAULT: '100%',
@@ -153,6 +153,30 @@ export type DefaultTheme = Config['theme'] & {
153
153
  | 'black',
154
154
  string
155
155
  >
156
+ gradientColorStopPositions: Record<
157
+ | '0%'
158
+ | '5%'
159
+ | '10%'
160
+ | '15%'
161
+ | '20%'
162
+ | '25%'
163
+ | '30%'
164
+ | '35%'
165
+ | '40%'
166
+ | '45%'
167
+ | '50%'
168
+ | '55%'
169
+ | '60%'
170
+ | '65%'
171
+ | '70%'
172
+ | '75%'
173
+ | '80%'
174
+ | '85%'
175
+ | '90%'
176
+ | '95%'
177
+ | '100%',
178
+ string
179
+ >
156
180
  grayscale: Record<'0' | 'DEFAULT', string>
157
181
  gridAutoColumns: Record<'auto' | 'min' | 'max' | 'fr', string>
158
182
  gridAutoRows: Record<'auto' | 'min' | 'max' | 'fr', string>