-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Ability to set GOOBER_ID #535
Comments
Alternatively just allowing us to point the target directly to a Lines 11 to 24 in 2b2d422
Maybe adding an early return to the export let getSheet = (target) => {
if (typeof window === 'object') {
if (target instanceof HTMLStyleElement) {
return target;
}
//...
}
//...
} |
Hey @ecustic, thanks for opening this issue! Nice topic 😃 Before getting into it just wanted to let you know that I don't have knowledge on the Obsidian inner workings. About polluting the // src/utils/styled.js
export const styled = createGoober({
// here will go the config part
});
// src/components/button.js
import { styled } from 'src/utils/styled'; Now, the question is, is this better? Debatable 😅 |
I think the optimal solution would be to have both. Export |
This is very true and one of the reasons I chose goober after being frustrated with the tools I normally use: To avoid clashes I'm currently using an extremely hacky temporary solution where I've just written a small esbuild plugin to replace the three instances of the string But in fact there should be no need to use |
Hello, |
Is there any chance of getting a way to change the
GOOBER_ID
used, so that we don't end up withwindow._goober
?My issue is that I'm developing a plugin for Obsidian and would like to use goober for my styles. The convention here is for each plugin to clean up any thing it has added to the dom when it unloads. In this case this means removing the
#_goober
element. The issue is if any other plugin happens to also want to use goober, I'm taking their styles with me when my plugin unloads.Even setting the
target
doesn't actually work here, since it still creates a style tag with#_goober
inside it meaning it still poluteswindow._goober
.I've seen proposals for creating multiple instances of goober, and that would be the optimal solution. But if there is a quicker way to just expose the
GOOBER_ID
as a configurable value for an entire project that would also be extremely helpful.The text was updated successfully, but these errors were encountered: