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'
5
4
import createUtilityPlugin from './util/createUtilityPlugin'
6
5
import buildMediaQuery from './util/buildMediaQuery'
7
6
import escapeClassName from './util/escapeClassName'
@@ -647,8 +646,6 @@ export let corePlugins = {
647
646
[ 'inset-y' , [ 'top' , 'bottom' ] ] ,
648
647
] ,
649
648
[
650
- [ 'start' , [ 'inset-inline-start' ] ] ,
651
- [ 'end' , [ 'inset-inline-end' ] ] ,
652
649
[ 'top' , [ 'top' ] ] ,
653
650
[ 'right' , [ 'right' ] ] ,
654
651
[ 'bottom' , [ 'bottom' ] ] ,
@@ -700,8 +697,6 @@ export let corePlugins = {
700
697
[ 'my' , [ 'margin-top' , 'margin-bottom' ] ] ,
701
698
] ,
702
699
[
703
- [ 'ms' , [ 'margin-inline-start' ] ] ,
704
- [ 'me' , [ 'margin-inline-end' ] ] ,
705
700
[ 'mt' , [ 'margin-top' ] ] ,
706
701
[ 'mr' , [ 'margin-right' ] ] ,
707
702
[ 'mb' , [ 'margin-bottom' ] ] ,
@@ -772,13 +767,6 @@ export let corePlugins = {
772
767
} )
773
768
} ,
774
769
775
- captionSide : ( { addUtilities } ) => {
776
- addUtilities ( {
777
- '.caption-top' : { 'caption-side' : 'top' } ,
778
- '.caption-bottom' : { 'caption-side' : 'bottom' } ,
779
- } )
780
- } ,
781
-
782
770
borderCollapse : ( { addUtilities } ) => {
783
771
addUtilities ( {
784
772
'.border-collapse' : { 'border-collapse' : 'collapse' } ,
@@ -1057,8 +1045,6 @@ export let corePlugins = {
1057
1045
[ 'scroll-my' , [ 'scroll-margin-top' , 'scroll-margin-bottom' ] ] ,
1058
1046
] ,
1059
1047
[
1060
- [ 'scroll-ms' , [ 'scroll-margin-inline-start' ] ] ,
1061
- [ 'scroll-me' , [ 'scroll-margin-inline-end' ] ] ,
1062
1048
[ 'scroll-mt' , [ 'scroll-margin-top' ] ] ,
1063
1049
[ 'scroll-mr' , [ 'scroll-margin-right' ] ] ,
1064
1050
[ 'scroll-mb' , [ 'scroll-margin-bottom' ] ] ,
@@ -1075,8 +1061,6 @@ export let corePlugins = {
1075
1061
[ 'scroll-py' , [ 'scroll-padding-top' , 'scroll-padding-bottom' ] ] ,
1076
1062
] ,
1077
1063
[
1078
- [ 'scroll-ps' , [ 'scroll-padding-inline-start' ] ] ,
1079
- [ 'scroll-pe' , [ 'scroll-padding-inline-end' ] ] ,
1080
1064
[ 'scroll-pt' , [ 'scroll-padding-top' ] ] ,
1081
1065
[ 'scroll-pr' , [ 'scroll-padding-right' ] ] ,
1082
1066
[ 'scroll-pb' , [ 'scroll-padding-bottom' ] ] ,
@@ -1250,16 +1234,6 @@ export let corePlugins = {
1250
1234
'space-x' : ( value ) => {
1251
1235
value = value === '0' ? '0px' : value
1252
1236
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
-
1263
1237
return {
1264
1238
'& > :not([hidden]) ~ :not([hidden])' : {
1265
1239
'--tw-space-x-reverse' : '0' ,
@@ -1295,17 +1269,6 @@ export let corePlugins = {
1295
1269
'divide-x' : ( value ) => {
1296
1270
value = value === '0' ? '0px' : value
1297
1271
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
-
1309
1272
return {
1310
1273
'& > :not([hidden]) ~ :not([hidden])' : {
1311
1274
'@defaults border-width' : { } ,
@@ -1473,14 +1436,6 @@ export let corePlugins = {
1473
1436
} )
1474
1437
} ,
1475
1438
1476
- hyphens : ( { addUtilities } ) => {
1477
- addUtilities ( {
1478
- '.hyphens-none' : { hyphens : 'none' } ,
1479
- '.hyphens-manual' : { hyphens : 'manual' } ,
1480
- '.hyphens-auto' : { hyphens : 'auto' } ,
1481
- } )
1482
- } ,
1483
-
1484
1439
whitespace : ( { addUtilities } ) => {
1485
1440
addUtilities ( {
1486
1441
'.whitespace-normal' : { 'white-space' : 'normal' } ,
@@ -1503,18 +1458,12 @@ export let corePlugins = {
1503
1458
borderRadius : createUtilityPlugin ( 'borderRadius' , [
1504
1459
[ 'rounded' , [ 'border-radius' ] ] ,
1505
1460
[
1506
- [ 'rounded-s' , [ 'border-start-start-radius' , 'border-end-start-radius' ] ] ,
1507
- [ 'rounded-e' , [ 'border-start-end-radius' , 'border-end-end-radius' ] ] ,
1508
1461
[ 'rounded-t' , [ 'border-top-left-radius' , 'border-top-right-radius' ] ] ,
1509
1462
[ 'rounded-r' , [ 'border-top-right-radius' , 'border-bottom-right-radius' ] ] ,
1510
1463
[ 'rounded-b' , [ 'border-bottom-right-radius' , 'border-bottom-left-radius' ] ] ,
1511
1464
[ 'rounded-l' , [ 'border-top-left-radius' , 'border-bottom-left-radius' ] ] ,
1512
1465
] ,
1513
1466
[
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' ] ] ,
1518
1467
[ 'rounded-tl' , [ 'border-top-left-radius' ] ] ,
1519
1468
[ 'rounded-tr' , [ 'border-top-right-radius' ] ] ,
1520
1469
[ 'rounded-br' , [ 'border-bottom-right-radius' ] ] ,
@@ -1531,8 +1480,6 @@ export let corePlugins = {
1531
1480
[ 'border-y' , [ [ '@defaults border-width' , { } ] , 'border-top-width' , 'border-bottom-width' ] ] ,
1532
1481
] ,
1533
1482
[
1534
- [ 'border-s' , [ [ '@defaults border-width' , { } ] , 'border-inline-start-width' ] ] ,
1535
- [ 'border-e' , [ [ '@defaults border-width' , { } ] , 'border-inline-end-width' ] ] ,
1536
1483
[ 'border-t' , [ [ '@defaults border-width' , { } ] , 'border-top-width' ] ] ,
1537
1484
[ 'border-r' , [ [ '@defaults border-width' , { } ] , 'border-right-width' ] ] ,
1538
1485
[ 'border-b' , [ [ '@defaults border-width' , { } ] , 'border-bottom-width' ] ] ,
@@ -1615,32 +1562,6 @@ export let corePlugins = {
1615
1562
1616
1563
matchUtilities (
1617
1564
{
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
- } ,
1644
1565
'border-t' : ( value ) => {
1645
1566
if ( ! corePlugins ( 'borderOpacity' ) ) {
1646
1567
return {
@@ -1877,8 +1798,6 @@ export let corePlugins = {
1877
1798
[ 'py' , [ 'padding-top' , 'padding-bottom' ] ] ,
1878
1799
] ,
1879
1800
[
1880
- [ 'ps' , [ 'padding-inline-start' ] ] ,
1881
- [ 'pe' , [ 'padding-inline-end' ] ] ,
1882
1801
[ 'pt' , [ 'padding-top' ] ] ,
1883
1802
[ 'pr' , [ 'padding-right' ] ] ,
1884
1803
[ 'pb' , [ 'padding-bottom' ] ] ,
@@ -1922,16 +1841,13 @@ export let corePlugins = {
1922
1841
font : ( value ) => {
1923
1842
let [ families , options = { } ] =
1924
1843
Array . isArray ( value ) && isPlainObject ( value [ 1 ] ) ? value : [ value ]
1925
- let { fontFeatureSettings, fontVariationSettings } = options
1844
+ let { fontFeatureSettings } = options
1926
1845
1927
1846
return {
1928
1847
'font-family' : Array . isArray ( families ) ? families . join ( ', ' ) : families ,
1929
1848
...( fontFeatureSettings === undefined
1930
1849
? { }
1931
1850
: { 'font-feature-settings' : fontFeatureSettings } ) ,
1932
- ...( fontVariationSettings === undefined
1933
- ? { }
1934
- : { 'font-variation-settings' : fontVariationSettings } ) ,
1935
1851
}
1936
1852
} ,
1937
1853
} ,
@@ -1945,16 +1861,9 @@ export let corePlugins = {
1945
1861
fontSize : ( { matchUtilities, theme } ) => {
1946
1862
matchUtilities (
1947
1863
{
1948
- text : ( value , { modifier } ) => {
1864
+ text : ( value ) => {
1949
1865
let [ fontSize , options ] = Array . isArray ( value ) ? value : [ value ]
1950
1866
1951
- if ( modifier ) {
1952
- return {
1953
- 'font-size' : fontSize ,
1954
- 'line-height' : modifier ,
1955
- }
1956
- }
1957
-
1958
1867
let { lineHeight, letterSpacing, fontWeight } = isPlainObject ( options )
1959
1868
? options
1960
1869
: { lineHeight : options }
@@ -1969,7 +1878,6 @@ export let corePlugins = {
1969
1878
} ,
1970
1879
{
1971
1880
values : theme ( 'fontSize' ) ,
1972
- modifiers : theme ( 'lineHeight' ) ,
1973
1881
type : [ 'absolute-size' , 'relative-size' , 'length' , 'percentage' ] ,
1974
1882
}
1975
1883
)
0 commit comments