-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - The default transition
of tailwindcss is overridden by the nextui
plugin and has a higher priority.
#1502
Comments
@u3u could you explain better, what is the issue here?, Are you trying to add a custom transition to the tailwind config and the NextUI ones override it? |
@jrgarciadev I think nextui should directly remove the existing They should not be redefined. This patch is effective for me.
diff --git a/dist/chunk-KPK2JQIF.mjs b/dist/chunk-KPK2JQIF.mjs
index 8ca977c23a07bc8bd2429fb29c3bc14e058bc012..ca3ace0e4d4789a34e4db3e4fc6ee78ad32aedba 100644
--- a/dist/chunk-KPK2JQIF.mjs
+++ b/dist/chunk-KPK2JQIF.mjs
@@ -1,31 +1,11 @@
// src/utilities/transition.ts
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
- ".transition-all": {
- "transition-property": "all",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-colors": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-opacity": {
- "transition-property": "opacity",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
@@ -46,16 +26,6 @@ var transition_default = {
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition-shadow": {
- "transition-property": "box-shadow",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-transform": {
- "transition-property": "transform",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
diff --git a/dist/index.js b/dist/index.js
index 0aa490d0657747f37c0fdc9c7a93b52600d7b36a..7b917fd4ece71810471861be3ba4c7de43cfc460 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -7194,31 +7194,11 @@ var animations = {
// src/utilities/transition.ts
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
- ".transition-all": {
- "transition-property": "all",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-colors": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-opacity": {
- "transition-property": "opacity",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
@@ -7239,16 +7219,6 @@ var transition_default = {
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition-shadow": {
- "transition-property": "box-shadow",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-transform": {
- "transition-property": "transform",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
diff --git a/dist/plugin.js b/dist/plugin.js
index 2d8b265b91b491d0127e02078f13b64dcbce06cb..174d61bdc7cf155169cd4f5b879c09eda2e9ed36 100644
--- a/dist/plugin.js
+++ b/dist/plugin.js
@@ -425,31 +425,11 @@ var animations = {
// src/utilities/transition.ts
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
- ".transition-all": {
- "transition-property": "all",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-colors": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-opacity": {
- "transition-property": "opacity",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
@@ -470,16 +450,6 @@ var transition_default = {
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition-shadow": {
- "transition-property": "box-shadow",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-transform": {
- "transition-property": "transform",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
diff --git a/dist/utilities/index.js b/dist/utilities/index.js
index 41a6cbc22352e6c8935a5927dfdf2deab0615207..051eaa05cb43d201df9ad72463de13919c9edf55 100644
--- a/dist/utilities/index.js
+++ b/dist/utilities/index.js
@@ -27,31 +27,11 @@ module.exports = __toCommonJS(utilities_exports);
// src/utilities/transition.ts
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
- ".transition-all": {
- "transition-property": "all",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-colors": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-opacity": {
- "transition-property": "opacity",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
@@ -72,16 +52,6 @@ var transition_default = {
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition-shadow": {
- "transition-property": "box-shadow",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-transform": {
- "transition-property": "transform",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
diff --git a/dist/utilities/transition.js b/dist/utilities/transition.js
index 083201d35b4f89df0dd2a68b83c7c13e3d0be7fc..6905f1d79f1d5feb062889e21cbdd0cb891dbe95 100644
--- a/dist/utilities/transition.js
+++ b/dist/utilities/transition.js
@@ -25,31 +25,11 @@ __export(transition_exports, {
module.exports = __toCommonJS(transition_exports);
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
- ".transition-all": {
- "transition-property": "all",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-colors": {
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-opacity": {
- "transition-property": "opacity",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
@@ -70,16 +50,6 @@ var transition_default = {
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
- ".transition-shadow": {
- "transition-property": "box-shadow",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
- ".transition-transform": {
- "transition-property": "transform",
- "transition-timing-function": "ease",
- "transition-duration": DEFAULT_TRANSITION_DURATION
- },
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
|
I agree, I'll redefine the transitions names to avoid the conflicts |
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
extend: {
transitionDuration: {
+ DEFAULT: '250ms',
},
}
}
} Thank you! However, I believe that the standard transition effects |
Facing the same issue. Importing NextUI also overrides transition durations set via Tailwind arbitrary values like |
I think I have the same problem, I want to replace the default transition duration and did it like @u3u but it doesn't seem to do anything. |
It seems that it is still an issue. I cannot define custom transition durations via tailwind as mentioned by luisanton-io. nextui always overwrites them? It makes it hard to mix with other custom components. Any plans for a fix or a solution? |
I have submitted a PR (#2677), the next version will address this issue. |
NextUI Version
2.1.5
Describe the bug
This will prevent me from directly setting my own
transition
effect.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Add the
nextui()
plugin totailwind.config.js
.Expected behavior
There should not be duplicate
transition
.Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: