Replies: 5 comments 9 replies
-
@amir20 Hey! Do you have any idea what the difference in filesize could be? I downloaded the file and
Maybe I'm missing something but this seems like it can be converted by using the CSS variables created in the file: <style>
[data-level="debug"],
[data-level="trace"] {
background-color: var(--color-purple) !important;
}
[data-level="info"] {
background-color: var(--color-green) !important;
}
[data-level="error"],
[data-level="fatal"] {
background-color: var(--color-red) !important;
}
[data-level="warn"] {
background-color: var(--color-orange) !important;
}
</style> |
Beta Was this translation helpful? Give feedback.
-
Hi @philipp-spiess! Thanks for the reply! You are right that I could have used I am trying to figure out what is the best way to help us debug. The problem is that in v4, I have also upgrade DasiyUI to v5. So it wouldn't really be a fair comparison. I think what I'll do is change one of the Vue How does that sound? Is there a better way? |
Beta Was this translation helpful? Give feedback.
-
v4 does produce a bit more output than v3, specifically because we include CSS variables for all of your theme variables in the output, and all of the new /* v3 */
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
/* v4 */
@property --tw-translate-x {
syntax: "*";
inherits: false;
initial-value: 0;
}
@property --tw-translate-y {
syntax: "*";
inherits: false;
initial-value: 0;
}
@property --tw-translate-z {
syntax: "*";
inherits: false;
initial-value: 0;
}
@property --tw-space-y-reverse {
syntax: "*";
inherits: false;
initial-value: 0;
}
@property --tw-divide-y-reverse {
syntax: "*";
inherits: false;
initial-value: 0;
}
@property --tw-border-style {
syntax: "*";
inherits: false;
initial-value: solid;
}
@property --tw-leading {
syntax: "*";
inherits: false;
}
@property --tw-font-weight {
syntax: "*";
inherits: false;
}
@property --tw-shadow {
syntax: "*";
inherits: false;
initial-value: 0 0 #0000;
}
@property --tw-shadow-color {
syntax: "*";
inherits: false;
}
@property --tw-inset-shadow {
syntax: "*";
inherits: false;
initial-value: 0 0 #0000;
}
@property --tw-inset-shadow-color {
syntax: "*";
inherits: false;
}
@property --tw-ring-color {
syntax: "*";
inherits: false;
}
@property --tw-ring-shadow {
syntax: "*";
inherits: false;
initial-value: 0 0 #0000;
}
@property --tw-inset-ring-color {
syntax: "*";
inherits: false;
}
@property --tw-inset-ring-shadow {
syntax: "*";
inherits: false;
initial-value: 0 0 #0000;
}
@property --tw-ring-inset {
syntax: "*";
inherits: false;
}
@property --tw-ring-offset-width {
syntax: "<length>";
inherits: false;
initial-value: 0;
}
@property --tw-ring-offset-color {
syntax: "*";
inherits: false;
initial-value: #fff;
}
@property --tw-ring-offset-shadow {
syntax: "*";
inherits: false;
initial-value: 0 0 #0000;
} 30kb is more than I would expect generally, but it is unfortunately a bit bigger in order to take advantage of a lot of this new CSS stuff. You can shave the difference down a lot by disabling theme variables that you aren't using, like unused colors for example. |
Beta Was this translation helpful? Give feedback.
-
Hey @philipp-spiess and @adamwathan, thanks for the great work! It looks like you found the culprit. Adam, that makes sense too. I appreciate the information. I've been working in software long enough to be obsessed with every KB. I am on the beta now so will update back when the release is available. 🚀 |
Beta Was this translation helpful? Give feedback.
-
The new patch dropped the size from |
Beta Was this translation helpful? Give feedback.
-
Hello all,
This is not easy for me to reproduce because it's very unique to my application. After upgrading to v4, I noticed the css file is about 30KB bigger.
in my
master
branch:However, in my new branch with dasiy v5 and tailwind v4:
I have attached the file:
main-C49OPwit.css.zip
Looking at the file, I see a lot of
@layer theme,base,components,utilities
. I have a lot of Vue components and while I have tried to minimize usage of@apply
, there were about a dozen that I couldn't convert. For example,Possibly related to #15228 @philipp-spiess
Beta Was this translation helpful? Give feedback.
All reactions