luakit / luakit

Fast, small, webkit based browser framework extensible by Lua.
https://luakit.github.io/
GNU General Public License v3.0
2.09k stars 251 forks source link

Way to style WebInspector #868

Open megnu opened 4 years ago

megnu commented 4 years ago

Hi, I've been searching for way to style the WebInspector so the font used is darker colored and larger in size. I'm on Linux.

Any help is greatly appreciated. Regards.

c0dev0id commented 4 years ago

At the moment, it is not possible to style the WebInspector. I would also like to see some WebView attributes applied to the WebInspector. Especially the default zoom. Because right now, the WebInspector is basically unusable on HIDPI screens because of an incredible tiny font.

taobert commented 3 years ago

I may have misunderstood the issue here, so please be patient with me... The web inspector has a settings section (top right cog) which has Appearance and Zoom settings. The Zoom setting goes up to 240%, and seems to function correctly (for me). The Appearance purports to offer System, Light, and Dark, but does nothing for me. However, the web inspector seems to honour the GTK_THEME environment variable. (if i run GTK_THEME=Adwaita:dark luakit then the web inspector is themed dark.) GTK themes seem to be css, so it should be possible to tweak it to look the way you want (i imagine, i've never tried).

Edit (20210406): Theming the web inspector may be a subset of #405.

megnu commented 3 years ago

Thanks. Increasing the Zoom setting made it usable for me. I tried GTK_THEME=Adwaita:dark luakit and yes I can see the dark background. However, font colors remains the same... I wonder if that can be changed with css.

I also noticed that the System, Light and Dark options did not take effect.

taobert commented 3 years ago

However, font colors remains the same...

I hadn't noticed that, but i believe you.

I wonder if that can be changed with css.

That's my supposition. I've never written a GTK theme (and have very little interest in exploring that), but i can see that (for example) /usr/share/themes/Greybird-dark/gtk-3.0/gtk-dark.css contains things like:

/* GTK NAMED COLORS ---------------- use responsibly! */
/* widget text/foreground color */
@define-color theme_fg_color #eeeeec;

I assume there'll be a (possibly very steep) learning curve... Good luck...:-)