Closed aduh95 closed 4 years ago
@aduh95 Nice work, but I need more info on that.
Can you please give an use case for using mixins but not data-balloon
attributes? Just wondering what could it be used for.
Sure, here how I'm doing it:
:host {
position: relative;
--balloon-color: #10101044;
& > span {
@include base-effects();
/* other styles down here */
}
&::before {
@include arrow-up();
@include base-effects();
content: "";
position: absolute;
z-index: 10;
/* other styles down here */
}
}
As I'm using web components, it doesn't make much sense to use data-
attributes, and it certainly doesn't make much sense for me to add all that CSS if I'm not using it.
Ok, that makes sense. Merged and published on 1.0.4
. Thanks
Allows users that use only balloon-mixins (and not balloon-classes) to avoid importing unused code.
My explicit goal is, on projects that don't use balloon-classes or
data-
attributes, to change@import "../../node_modules/balloon-css/src/balloon";
byimport "../../node_modules/balloon-css/src/mixins";
which would result in a 8.2kB reduction of the minified output CSS.Also this is not a breaking change.