UEA-PRODEM
This commit is contained in:
+292
-41
@@ -351,15 +351,27 @@ const createConfigUtils = config => ({
|
||||
cache: createLruCache(config.cacheSize),
|
||||
parseClassName: createParseClassName(config),
|
||||
sortModifiers: createSortModifiers(config),
|
||||
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
|
||||
...createClassGroupUtils(config)
|
||||
});
|
||||
const createPostfixLookupClassGroupIds = config => {
|
||||
const lookup = Object.create(null);
|
||||
const classGroupIds = config.postfixLookupClassGroups;
|
||||
if (classGroupIds) {
|
||||
for (let i = 0; i < classGroupIds.length; i++) {
|
||||
lookup[classGroupIds[i]] = true;
|
||||
}
|
||||
}
|
||||
return lookup;
|
||||
};
|
||||
const SPLIT_CLASSES_REGEX = /\s+/;
|
||||
const mergeClassList = (classList, configUtils) => {
|
||||
const {
|
||||
parseClassName,
|
||||
getClassGroupId,
|
||||
getConflictingClassGroupIds,
|
||||
sortModifiers
|
||||
sortModifiers,
|
||||
postfixLookupClassGroupIds
|
||||
} = configUtils;
|
||||
/**
|
||||
* Set of classGroupIds in following format:
|
||||
@@ -385,7 +397,18 @@ const mergeClassList = (classList, configUtils) => {
|
||||
continue;
|
||||
}
|
||||
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
||||
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
||||
let classGroupId;
|
||||
if (hasPostfixModifier) {
|
||||
const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
|
||||
classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
|
||||
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : undefined;
|
||||
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
|
||||
classGroupId = classGroupIdWithPostfix;
|
||||
hasPostfixModifier = false;
|
||||
}
|
||||
} else {
|
||||
classGroupId = getClassGroupId(baseClassName);
|
||||
}
|
||||
if (!classGroupId) {
|
||||
if (!hasPostfixModifier) {
|
||||
// Not a Tailwind class
|
||||
@@ -494,7 +517,7 @@ const fromTheme = key => {
|
||||
};
|
||||
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
||||
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
||||
const fractionRegex = /^\d+\/\d+$/;
|
||||
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
||||
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
||||
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
||||
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
||||
@@ -516,10 +539,13 @@ const isNever = () => false;
|
||||
const isShadow = value => shadowRegex.test(value);
|
||||
const isImage = value => imageRegex.test(value);
|
||||
const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
||||
const isNamedContainerQuery = value => value.startsWith('@container') && (value[10] === '/' && value[11] !== undefined || value[11] === 's' && value[16] !== undefined && value.startsWith('-size/', 10) || value[11] === 'n' && value[18] !== undefined && value.startsWith('-normal/', 10));
|
||||
const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
|
||||
const isArbitraryValue = value => arbitraryValueRegex.test(value);
|
||||
const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
||||
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
||||
const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
|
||||
const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
||||
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
||||
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
||||
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
||||
@@ -530,6 +556,7 @@ const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLab
|
||||
const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
|
||||
const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
|
||||
const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
|
||||
const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);
|
||||
// Helpers
|
||||
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
||||
const result = arbitraryValueRegex.exec(value);
|
||||
@@ -558,11 +585,13 @@ const isLabelSize = label => label === 'length' || label === 'size' || label ===
|
||||
const isLabelLength = label => label === 'length';
|
||||
const isLabelNumber = label => label === 'number';
|
||||
const isLabelFamilyName = label => label === 'family-name';
|
||||
const isLabelWeight = label => label === 'number' || label === 'weight';
|
||||
const isLabelShadow = label => label === 'shadow';
|
||||
const validators = /*#__PURE__*/Object.defineProperty({
|
||||
__proto__: null,
|
||||
isAny,
|
||||
isAnyNonArbitrary,
|
||||
isArbitraryFamilyName,
|
||||
isArbitraryImage,
|
||||
isArbitraryLength,
|
||||
isArbitraryNumber,
|
||||
@@ -577,8 +606,11 @@ const validators = /*#__PURE__*/Object.defineProperty({
|
||||
isArbitraryVariablePosition,
|
||||
isArbitraryVariableShadow,
|
||||
isArbitraryVariableSize,
|
||||
isArbitraryVariableWeight,
|
||||
isArbitraryWeight,
|
||||
isFraction,
|
||||
isInteger,
|
||||
isNamedContainerQuery,
|
||||
isNumber,
|
||||
isPercent,
|
||||
isTshirtSize
|
||||
@@ -642,6 +674,8 @@ const getDefaultConfig = () => {
|
||||
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
|
||||
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
||||
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
||||
const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
||||
const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
||||
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
||||
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
|
||||
position: [isArbitraryVariable, isArbitraryValue]
|
||||
@@ -707,6 +741,18 @@ const getDefaultConfig = () => {
|
||||
* @deprecated since Tailwind CSS v4.0.0
|
||||
*/
|
||||
container: ['container'],
|
||||
/**
|
||||
* Container Type
|
||||
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
||||
*/
|
||||
'container-type': [{
|
||||
'@container': ['', 'normal', 'size', isArbitraryVariable, isArbitraryValue]
|
||||
}],
|
||||
/**
|
||||
* Container Name
|
||||
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
||||
*/
|
||||
'container-named': [isNamedContainerQuery],
|
||||
/**
|
||||
* Columns
|
||||
* @see https://tailwindcss.com/docs/columns
|
||||
@@ -840,40 +886,66 @@ const getDefaultConfig = () => {
|
||||
*/
|
||||
position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
|
||||
/**
|
||||
* Top / Right / Bottom / Left
|
||||
* Inset
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
*/
|
||||
inset: [{
|
||||
inset: scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Right / Left
|
||||
* Inset Inline
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
*/
|
||||
'inset-x': [{
|
||||
'inset-x': scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Top / Bottom
|
||||
* Inset Block
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
*/
|
||||
'inset-y': [{
|
||||
'inset-y': scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Start
|
||||
* Inset Inline Start
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
* @todo class group will be renamed to `inset-s` in next major release
|
||||
*/
|
||||
start: [{
|
||||
'inset-s': scaleInset(),
|
||||
/**
|
||||
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
||||
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
||||
*/
|
||||
start: scaleInset()
|
||||
}],
|
||||
/**
|
||||
* End
|
||||
* Inset Inline End
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
* @todo class group will be renamed to `inset-e` in next major release
|
||||
*/
|
||||
end: [{
|
||||
'inset-e': scaleInset(),
|
||||
/**
|
||||
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
||||
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
||||
*/
|
||||
end: scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Inset Block Start
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
*/
|
||||
'inset-bs': [{
|
||||
'inset-bs': scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Inset Block End
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
*/
|
||||
'inset-be': [{
|
||||
'inset-be': scaleInset()
|
||||
}],
|
||||
/**
|
||||
* Top
|
||||
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
||||
@@ -1140,33 +1212,47 @@ const getDefaultConfig = () => {
|
||||
p: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding X
|
||||
* Padding Inline
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
px: [{
|
||||
px: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding Y
|
||||
* Padding Block
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
py: [{
|
||||
py: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding Start
|
||||
* Padding Inline Start
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
ps: [{
|
||||
ps: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding End
|
||||
* Padding Inline End
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
pe: [{
|
||||
pe: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding Block Start
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
pbs: [{
|
||||
pbs: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding Block End
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
*/
|
||||
pbe: [{
|
||||
pbe: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Padding Top
|
||||
* @see https://tailwindcss.com/docs/padding
|
||||
@@ -1203,33 +1289,47 @@ const getDefaultConfig = () => {
|
||||
m: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin X
|
||||
* Margin Inline
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
mx: [{
|
||||
mx: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin Y
|
||||
* Margin Block
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
my: [{
|
||||
my: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin Start
|
||||
* Margin Inline Start
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
ms: [{
|
||||
ms: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin End
|
||||
* Margin Inline End
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
me: [{
|
||||
me: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin Block Start
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
mbs: [{
|
||||
mbs: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin Block End
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
*/
|
||||
mbe: [{
|
||||
mbe: scaleMargin()
|
||||
}],
|
||||
/**
|
||||
* Margin Top
|
||||
* @see https://tailwindcss.com/docs/margin
|
||||
@@ -1292,6 +1392,48 @@ const getDefaultConfig = () => {
|
||||
size: [{
|
||||
size: scaleSizing()
|
||||
}],
|
||||
/**
|
||||
* Inline Size
|
||||
* @see https://tailwindcss.com/docs/width
|
||||
*/
|
||||
'inline-size': [{
|
||||
inline: ['auto', ...scaleSizingInline()]
|
||||
}],
|
||||
/**
|
||||
* Min-Inline Size
|
||||
* @see https://tailwindcss.com/docs/min-width
|
||||
*/
|
||||
'min-inline-size': [{
|
||||
'min-inline': ['auto', ...scaleSizingInline()]
|
||||
}],
|
||||
/**
|
||||
* Max-Inline Size
|
||||
* @see https://tailwindcss.com/docs/max-width
|
||||
*/
|
||||
'max-inline-size': [{
|
||||
'max-inline': ['none', ...scaleSizingInline()]
|
||||
}],
|
||||
/**
|
||||
* Block Size
|
||||
* @see https://tailwindcss.com/docs/height
|
||||
*/
|
||||
'block-size': [{
|
||||
block: ['auto', ...scaleSizingBlock()]
|
||||
}],
|
||||
/**
|
||||
* Min-Block Size
|
||||
* @see https://tailwindcss.com/docs/min-height
|
||||
*/
|
||||
'min-block-size': [{
|
||||
'min-block': ['auto', ...scaleSizingBlock()]
|
||||
}],
|
||||
/**
|
||||
* Max-Block Size
|
||||
* @see https://tailwindcss.com/docs/max-height
|
||||
*/
|
||||
'max-block-size': [{
|
||||
'max-block': ['none', ...scaleSizingBlock()]
|
||||
}],
|
||||
/**
|
||||
* Width
|
||||
* @see https://tailwindcss.com/docs/width
|
||||
@@ -1364,7 +1506,7 @@ const getDefaultConfig = () => {
|
||||
* @see https://tailwindcss.com/docs/font-weight
|
||||
*/
|
||||
'font-weight': [{
|
||||
font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
|
||||
font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
|
||||
}],
|
||||
/**
|
||||
* Font Stretch
|
||||
@@ -1378,7 +1520,14 @@ const getDefaultConfig = () => {
|
||||
* @see https://tailwindcss.com/docs/font-family
|
||||
*/
|
||||
'font-family': [{
|
||||
font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
|
||||
font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
|
||||
}],
|
||||
/**
|
||||
* Font Feature Settings
|
||||
* @see https://tailwindcss.com/docs/font-feature-settings
|
||||
*/
|
||||
'font-features': [{
|
||||
'font-features': [isArbitraryValue]
|
||||
}],
|
||||
/**
|
||||
* Font Variant Numeric
|
||||
@@ -1532,6 +1681,13 @@ const getDefaultConfig = () => {
|
||||
indent: [{
|
||||
indent: scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Tab Size
|
||||
* @see https://tailwindcss.com/docs/tab-size
|
||||
*/
|
||||
'tab-size': [{
|
||||
tab: [isInteger, isArbitraryVariable, isArbitraryValue]
|
||||
}],
|
||||
/**
|
||||
* Vertical Alignment
|
||||
* @see https://tailwindcss.com/docs/vertical-align
|
||||
@@ -1797,33 +1953,47 @@ const getDefaultConfig = () => {
|
||||
border: scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width X
|
||||
* Border Width Inline
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-x': [{
|
||||
'border-x': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width Y
|
||||
* Border Width Block
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-y': [{
|
||||
'border-y': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width Start
|
||||
* Border Width Inline Start
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-s': [{
|
||||
'border-s': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width End
|
||||
* Border Width Inline End
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-e': [{
|
||||
'border-e': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width Block Start
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-bs': [{
|
||||
'border-bs': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width Block End
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
*/
|
||||
'border-w-be': [{
|
||||
'border-be': scaleBorderWidth()
|
||||
}],
|
||||
/**
|
||||
* Border Width Top
|
||||
* @see https://tailwindcss.com/docs/border-width
|
||||
@@ -1898,33 +2068,47 @@ const getDefaultConfig = () => {
|
||||
border: scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color X
|
||||
* Border Color Inline
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-x': [{
|
||||
'border-x': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color Y
|
||||
* Border Color Block
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-y': [{
|
||||
'border-y': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color S
|
||||
* Border Color Inline Start
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-s': [{
|
||||
'border-s': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color E
|
||||
* Border Color Inline End
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-e': [{
|
||||
'border-e': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color Block Start
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-bs': [{
|
||||
'border-bs': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color Block End
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
*/
|
||||
'border-color-be': [{
|
||||
'border-be': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Border Color Top
|
||||
* @see https://tailwindcss.com/docs/border-color
|
||||
@@ -2711,6 +2895,13 @@ const getDefaultConfig = () => {
|
||||
* @see https://tailwindcss.com/docs/translate
|
||||
*/
|
||||
'translate-none': ['translate-none'],
|
||||
/**
|
||||
* Zoom
|
||||
* @see https://tailwindcss.com/docs/zoom
|
||||
*/
|
||||
zoom: [{
|
||||
zoom: [isInteger, isArbitraryVariable, isArbitraryValue]
|
||||
}],
|
||||
// ---------------------
|
||||
// --- Interactivity ---
|
||||
// ---------------------
|
||||
@@ -2777,6 +2968,34 @@ const getDefaultConfig = () => {
|
||||
'scroll-behavior': [{
|
||||
scroll: ['auto', 'smooth']
|
||||
}],
|
||||
/**
|
||||
* Scrollbar Thumb Color
|
||||
* @see https://tailwindcss.com/docs/scrollbar-color
|
||||
*/
|
||||
'scrollbar-thumb-color': [{
|
||||
'scrollbar-thumb': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Scrollbar Track Color
|
||||
* @see https://tailwindcss.com/docs/scrollbar-color
|
||||
*/
|
||||
'scrollbar-track-color': [{
|
||||
'scrollbar-track': scaleColor()
|
||||
}],
|
||||
/**
|
||||
* Scrollbar Gutter
|
||||
* @see https://tailwindcss.com/docs/scrollbar-gutter
|
||||
*/
|
||||
'scrollbar-gutter': [{
|
||||
'scrollbar-gutter': ['auto', 'stable', 'both']
|
||||
}],
|
||||
/**
|
||||
* Scrollbar Width
|
||||
* @see https://tailwindcss.com/docs/scrollbar-width
|
||||
*/
|
||||
'scrollbar-w': [{
|
||||
scrollbar: ['auto', 'thin', 'none']
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
@@ -2785,33 +3004,47 @@ const getDefaultConfig = () => {
|
||||
'scroll-m': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin X
|
||||
* Scroll Margin Inline
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-mx': [{
|
||||
'scroll-mx': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin Y
|
||||
* Scroll Margin Block
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-my': [{
|
||||
'scroll-my': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin Start
|
||||
* Scroll Margin Inline Start
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-ms': [{
|
||||
'scroll-ms': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin End
|
||||
* Scroll Margin Inline End
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-me': [{
|
||||
'scroll-me': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin Block Start
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-mbs': [{
|
||||
'scroll-mbs': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin Block End
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
*/
|
||||
'scroll-mbe': [{
|
||||
'scroll-mbe': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Margin Top
|
||||
* @see https://tailwindcss.com/docs/scroll-margin
|
||||
@@ -2848,33 +3081,47 @@ const getDefaultConfig = () => {
|
||||
'scroll-p': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding X
|
||||
* Scroll Padding Inline
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-px': [{
|
||||
'scroll-px': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding Y
|
||||
* Scroll Padding Block
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-py': [{
|
||||
'scroll-py': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding Start
|
||||
* Scroll Padding Inline Start
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-ps': [{
|
||||
'scroll-ps': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding End
|
||||
* Scroll Padding Inline End
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-pe': [{
|
||||
'scroll-pe': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding Block Start
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-pbs': [{
|
||||
'scroll-pbs': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding Block End
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
*/
|
||||
'scroll-pbe': [{
|
||||
'scroll-pbe': scaleUnambiguousSpacing()
|
||||
}],
|
||||
/**
|
||||
* Scroll Padding Top
|
||||
* @see https://tailwindcss.com/docs/scroll-padding
|
||||
@@ -3007,17 +3254,18 @@ const getDefaultConfig = () => {
|
||||
}]
|
||||
},
|
||||
conflictingClassGroups: {
|
||||
'container-named': ['container-type'],
|
||||
overflow: ['overflow-x', 'overflow-y'],
|
||||
overscroll: ['overscroll-x', 'overscroll-y'],
|
||||
inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
||||
inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
||||
'inset-x': ['right', 'left'],
|
||||
'inset-y': ['top', 'bottom'],
|
||||
flex: ['basis', 'grow', 'shrink'],
|
||||
gap: ['gap-x', 'gap-y'],
|
||||
p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
|
||||
p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
|
||||
px: ['pr', 'pl'],
|
||||
py: ['pt', 'pb'],
|
||||
m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
|
||||
m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],
|
||||
mx: ['mr', 'ml'],
|
||||
my: ['mt', 'mb'],
|
||||
size: ['w', 'h'],
|
||||
@@ -3037,18 +3285,18 @@ const getDefaultConfig = () => {
|
||||
'rounded-b': ['rounded-br', 'rounded-bl'],
|
||||
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
||||
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
||||
'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
||||
'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
||||
'border-w-x': ['border-w-r', 'border-w-l'],
|
||||
'border-w-y': ['border-w-t', 'border-w-b'],
|
||||
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
||||
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
||||
'border-color-x': ['border-color-r', 'border-color-l'],
|
||||
'border-color-y': ['border-color-t', 'border-color-b'],
|
||||
translate: ['translate-x', 'translate-y', 'translate-none'],
|
||||
'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
|
||||
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
||||
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
||||
'scroll-mx': ['scroll-mr', 'scroll-ml'],
|
||||
'scroll-my': ['scroll-mt', 'scroll-mb'],
|
||||
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
||||
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
||||
'scroll-px': ['scroll-pr', 'scroll-pl'],
|
||||
'scroll-py': ['scroll-pt', 'scroll-pb'],
|
||||
touch: ['touch-x', 'touch-y', 'touch-pz'],
|
||||
@@ -3059,6 +3307,7 @@ const getDefaultConfig = () => {
|
||||
conflictingClassGroupModifiers: {
|
||||
'font-size': ['leading']
|
||||
},
|
||||
postfixLookupClassGroups: ['container-type'],
|
||||
orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
|
||||
};
|
||||
};
|
||||
@@ -3081,11 +3330,13 @@ const mergeConfigs = (baseConfig, {
|
||||
overrideConfigProperties(baseConfig.classGroups, override.classGroups);
|
||||
overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
|
||||
overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
|
||||
overrideProperty(baseConfig, 'postfixLookupClassGroups', override.postfixLookupClassGroups);
|
||||
overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);
|
||||
mergeConfigProperties(baseConfig.theme, extend.theme);
|
||||
mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
|
||||
mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
|
||||
mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);
|
||||
mergeArrayProperties(baseConfig, extend, 'postfixLookupClassGroups');
|
||||
mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');
|
||||
return baseConfig;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user