Surf Browser ... Why do you tease me so?

I want to use Surf browser as my default. It’s simple, fast and I get all my screen real estate (i.e. no borders or tabs) but, yes I know it is a minor thing, the Bunsen and Arch forums don’t scale nicely.

As most of you know I happen to have 4k monitors and I have my scaling in Surf set as 1.25. Everywhere else seems to scale nicely except for the BL and Arch forum. I really have no idea why.

If anyone does and can enlighten me, please do.

1 Like

I solved this but increasing the font size will keeping the scaling at 1.25, This seems to work.

There’s a better way for problematic sites.

Create ~/.surf/styles/archlinuxforum.css containing

* {
	font-size: 20px;

should also be able to use pt for point size

Now edit your surf config.h and add it to the styles list with a matching regex, eg.

static SiteSpecific styles[] = {
	/* regexp               file in $styledir */
	{ ".**",  "archlinuxforum.css" },
	{ ".*",                     "default.css" },

Recompile and now the arch forum text will be larger. As a small plus you can now tweak those sites font sizes without recompiling :wink:

If you just change the font and want many sites to use the same css file then perhaps change the name to be less specific and just regex match those site as well to the same file eg.

{ ".*(|*", "bigfont.css" },

Here’s surf on the arch forum with 20px text

You can get more specific for what fonts you want at what size but that will require you to inspect the site css and find the names for each (inspector tools).

1 Like

I thought about doing it that way. I’ll keep it in mind if I strike any other problematic sites.

Cheers @natemaia

1 Like

Necro-post here… :wink:

Is there a way to handle passwords with surf that works cleanly? Pointers are most appreciated.

Check the files and patches section for surf at suckless. There may be a script or something to provide that functionality.

1 Like