@@ -1954,99 +1954,39 @@ export function createUtilities(theme: Theme) {
1954
1954
staticUtility ( 'break-all' , [ [ 'word-break' , 'break-all' ] ] )
1955
1955
staticUtility ( 'break-keep' , [ [ 'word-break' , 'break-keep' ] ] )
1956
1956
1957
- // rounded-*
1958
- functionalUtility ( 'rounded' , {
1959
- themeKeys : [ '--radius' ] ,
1960
- handle : ( value ) => [ decl ( 'border-radius' , value ) ] ,
1961
- } )
1962
-
1963
- functionalUtility ( 'rounded-s' , {
1964
- themeKeys : [ '--radius' ] ,
1965
- handle : ( value ) => [
1966
- decl ( 'border-start-start-radius' , value ) ,
1967
- decl ( 'border-end-start-radius' , value ) ,
1968
- ] ,
1969
- } )
1970
-
1971
- functionalUtility ( 'rounded-e' , {
1972
- themeKeys : [ '--radius' ] ,
1973
- handle : ( value ) => [
1974
- decl ( 'border-start-end-radius' , value ) ,
1975
- decl ( 'border-end-end-radius' , value ) ,
1976
- ] ,
1977
- } )
1978
-
1979
- functionalUtility ( 'rounded-t' , {
1980
- themeKeys : [ '--radius' ] ,
1981
- handle : ( value ) => [
1982
- decl ( 'border-top-left-radius' , value ) ,
1983
- decl ( 'border-top-right-radius' , value ) ,
1984
- ] ,
1985
- } )
1986
-
1987
- functionalUtility ( 'rounded-r' , {
1988
- themeKeys : [ '--radius' ] ,
1989
- handle : ( value ) => [
1990
- decl ( 'border-top-right-radius' , value ) ,
1991
- decl ( 'border-bottom-right-radius' , value ) ,
1992
- ] ,
1993
- } )
1994
-
1995
- functionalUtility ( 'rounded-b' , {
1996
- themeKeys : [ '--radius' ] ,
1997
- handle : ( value ) => [
1998
- decl ( 'border-bottom-right-radius' , value ) ,
1999
- decl ( 'border-bottom-left-radius' , value ) ,
2000
- ] ,
2001
- } )
2002
-
2003
- functionalUtility ( 'rounded-l' , {
2004
- themeKeys : [ '--radius' ] ,
2005
- handle : ( value ) => [
2006
- decl ( 'border-top-left-radius' , value ) ,
2007
- decl ( 'border-bottom-left-radius' , value ) ,
2008
- ] ,
2009
- } )
2010
-
2011
- functionalUtility ( 'rounded-ss' , {
2012
- themeKeys : [ '--radius' ] ,
2013
- handle : ( value ) => [ decl ( 'border-start-start-radius' , value ) ] ,
2014
- } )
2015
-
2016
- functionalUtility ( 'rounded-se' , {
2017
- themeKeys : [ '--radius' ] ,
2018
- handle : ( value ) => [ decl ( 'border-start-end-radius' , value ) ] ,
2019
- } )
2020
-
2021
- functionalUtility ( 'rounded-ee' , {
2022
- themeKeys : [ '--radius' ] ,
2023
- handle : ( value ) => [ decl ( 'border-end-end-radius' , value ) ] ,
2024
- } )
2025
-
2026
- functionalUtility ( 'rounded-es' , {
2027
- themeKeys : [ '--radius' ] ,
2028
- handle : ( value ) => [ decl ( 'border-end-start-radius' , value ) ] ,
2029
- } )
2030
-
2031
- functionalUtility ( 'rounded-tl' , {
2032
- themeKeys : [ '--radius' ] ,
2033
- handle : ( value ) => [ decl ( 'border-top-left-radius' , value ) ] ,
2034
- } )
2035
-
2036
- functionalUtility ( 'rounded-tr' , {
2037
- themeKeys : [ '--radius' ] ,
2038
- handle : ( value ) => [ decl ( 'border-top-right-radius' , value ) ] ,
2039
- } )
2040
-
2041
- functionalUtility ( 'rounded-br' , {
2042
- themeKeys : [ '--radius' ] ,
2043
- handle : ( value ) => [ decl ( 'border-bottom-right-radius' , value ) ] ,
2044
- } )
2045
-
2046
- functionalUtility ( 'rounded-bl' , {
2047
- themeKeys : [ '--radius' ] ,
2048
- handle : ( value ) => [ decl ( 'border-bottom-left-radius' , value ) ] ,
2049
- } )
1957
+ {
1958
+ // border-radius
1959
+ for ( let [ root , properties ] of [
1960
+ [ 'rounded' , [ 'border-radius' ] ] ,
1961
+ [ 'rounded-s' , [ 'border-start-start-radius' , 'border-end-start-radius' ] ] ,
1962
+ [ 'rounded-e' , [ 'border-start-end-radius' , 'border-end-end-radius' ] ] ,
1963
+ [ 'rounded-t' , [ 'border-top-left-radius' , 'border-top-right-radius' ] ] ,
1964
+ [ 'rounded-r' , [ 'border-top-right-radius' , 'border-bottom-right-radius' ] ] ,
1965
+ [ 'rounded-b' , [ 'border-bottom-right-radius' , 'border-bottom-left-radius' ] ] ,
1966
+ [ 'rounded-l' , [ 'border-top-left-radius' , 'border-bottom-left-radius' ] ] ,
1967
+ [ 'rounded-ss' , [ 'border-start-start-radius' ] ] ,
1968
+ [ 'rounded-se' , [ 'border-start-end-radius' ] ] ,
1969
+ [ 'rounded-ee' , [ 'border-end-end-radius' ] ] ,
1970
+ [ 'rounded-es' , [ 'border-end-start-radius' ] ] ,
1971
+ [ 'rounded-tl' , [ 'border-top-left-radius' ] ] ,
1972
+ [ 'rounded-tr' , [ 'border-top-right-radius' ] ] ,
1973
+ [ 'rounded-br' , [ 'border-bottom-right-radius' ] ] ,
1974
+ [ 'rounded-bl' , [ 'border-bottom-left-radius' ] ] ,
1975
+ ] as const ) {
1976
+ staticUtility (
1977
+ `${ root } -none` ,
1978
+ properties . map ( ( property ) => [ property , '0' ] ) ,
1979
+ )
1980
+ staticUtility (
1981
+ `${ root } -full` ,
1982
+ properties . map ( ( property ) => [ property , 'calc(infinity * 1px)' ] ) ,
1983
+ )
1984
+ functionalUtility ( root , {
1985
+ themeKeys : [ '--radius' ] ,
1986
+ handle : ( value ) => properties . map ( ( property ) => decl ( property , value ) ) ,
1987
+ } )
1988
+ }
1989
+ }
2050
1990
2051
1991
staticUtility ( 'border-solid' , [
2052
1992
[ '--tw-border-style' , 'solid' ] ,
0 commit comments