Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

Custom.css not applied #127

Open
BlueskyFR opened this issue Jun 17, 2020 · 2 comments
Open

Custom.css not applied #127

BlueskyFR opened this issue Jun 17, 2020 · 2 comments

Comments

@BlueskyFR
Copy link

Hi!

Great work we have here!
The only problem on my side is the custom.css file not being applied correctly:

I want to hide the app bar because it causes the window to have a scrollbar on the right which I don't want.
image
How may I hide it correctly?
I already tried the following in ~/.devdocs/custom.css:

.header {
    display: none !important;
}

But it seems that it is not even applied to the page.

Can someone help?

@M3TIOR
Copy link

M3TIOR commented Dec 1, 2020

So I just got done digging into the source code. Apparently the app hardly does anything besides use electron as a shell to host devdocs.io using a webview. In previous versions; going back to 2017, the renderer CSS and Javascript were injected into the client HTML. Due to recent improvements in web security standards, webviews cannot be modified directly by the invoking renderer; except by load-time injection. So the target for the custom CSS and Javascript is actually the webview element directly. Thus, the custom.css doesn't affect the .title element you're targeting.

I very much dislike the header element as well, so I'm going to make a quick PR to toggle it on and off in the preferences; especially since it doesn't maintain style homogeneity with devdocs.io.

@M3TIOR
Copy link

M3TIOR commented Dec 1, 2020

Got it kinda covered, I'll be leaving my fork available for a while since I don't think the maintainer's going to get to implementing the changes too soon in case you absolutely need the feature asap. #140

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants