goober icon indicating copy to clipboard operation
goober copied to clipboard

(fix) Bug when extending styles (#218)

Open atersolis opened this issue 4 years ago â€ĸ 7 comments

A proposal to fix #218 I couldn't find anything better It adds a comment like /go4214727443/ before every style in the stylesheet so that you can easily insert other styles right before it. This way the styles are declared in the right order. Unfortunately it adds around 30 bytes. 1kb sure is small... It's hard to make some changes without significantly increasing the bundle size. I hope you can find a better fix.

atersolis avatar Jan 02 '21 14:01 atersolis

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5aa0f0b378d66560ee8a270907c48f2569cd31c5:

Sandbox Source
Vanilla Configuration

codesandbox-ci[bot] avatar Jan 02 '21 14:01 codesandbox-ci[bot]

Size Change: 0 B

Total Size: 3.56 kB

ℹī¸ View Unchanged
Filename Size Change
dist/goober.js 1.16 kB 0 B
dist/goober.modern.js 1.17 kB 0 B
dist/goober.umd.js 1.24 kB 0 B

compressed-size-action

github-actions[bot] avatar Jan 06 '21 10:01 github-actions[bot]

@atersolis what do you think about this one? I'm really on the fence because of the size increase 😞 do you think having a note about the known issue for the media query above will help? And merge in the replace method?

cristianbote avatar Jan 18 '21 20:01 cristianbote

I don't know if this pattern is common, but it can happen. Also media queries is only an example, there might be other cases we didn't think about. I don't think it's worth creating potential bugs just to save a few bytes. It might discourage people from using your lib (it would be a shame). Personally I would prefer a stable 2kb-3kb library over a buggy 1kb one.

atersolis avatar Jan 19 '21 22:01 atersolis

We are having this same issue, even if the bundle increase the library won't have bugs like this!

riccardogiorato avatar Jul 12 '21 14:07 riccardogiorato

What's the status of this PR? If this bug isn't fixed then goober needs to be sunsetted.

buchansm avatar Sep 01 '23 14:09 buchansm

What's the status of this PR? If this bug isn't fixed then goober needs to be sunsetted.

@buchansm what's the status of your financial contribution https://opencollective.com/goober?

cristianbote avatar Sep 01 '23 14:09 cristianbote