Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Tag: firefox

Fixing GTK Dark Themes on Firefox

The world is a comedy to those that think; a tragedy to those that feel.

— Horace Walpole.

If your using Linux and run Firefox1. One thing you will notice on Firefox when on a dark themed GTK2 based environment in Linux is the HTML content would adapt to the theme color.

And for some reason I don’t know why Firefox still doesn’t fix this stuff. Here is the link related to the issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1527048

UPDATE: Seems this problem has been fixed in Version 67 of Firefox.

Here is the workaround for it:

  1. Open about:config inside Firefox. You should type this in the URL bar.
  2. Right click on the content and click New > String with key widget.content.gtk-theme-override and value Arc-Darker.
  3. Restart Firefox.

The steps above would set Firefox content to adapt to white based theme while retaining chroma theme dark. You could also use Adwaita as value.

So guys, have you ever encountered this bug specifically in Gnome 3 while using Firefox? Hope you guys enjoyed this article and as always live life!


  1. Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, Mozilla Corporation. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards. ↩︎
  2. GTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary software to use it. ↩︎

Automating HTML5 Generation With AsciiDoctor

If you’re a documentation nerd or somewhat planning to create content for publishing, surely you will encounter ASCII Doc. ASCII Doc is being use by different publishing giants like O’Reilly to create books and content.

One problem I encountered is generating HTML documents from asciidoc format. So how do I automate it?

Better to die fighting for freedom then be a prisoner all the days of your life.

— Bob Marley.

Prerequisites

  • Ruby 2.5 and above

So how do we render HTML5 from ASCII Doc?

We proceed by getting all the required gems. The first step is get the file watcher to watch for changes.

gem install asciidoctor guard guard-shell guard-livereload yajl-ruby

The livereload gem watch changes in the file system. Also, you may need to install companion browser extension.

After the installation of Chrome Extension, you need to check “Allow access to file URLs” checkbox in More Tools > Extensions > Live Reload Details in order for it to work with local file URLs.

Then we create a Guardfile with the contents below.

require "asciidoctor"
guard "shell" do
	watch(/^solidity\.adoc$/) {|m|
		Asciidoctor.convert_file m[0]
	}
end
guard "livereload" do
	watch(%r{^.+\.(css|js|html)$})
end

The first guard block converts file to HTML5. Then after that the second guard block watches for file changes and reloads browser.

When all is done start the guard process to monitor and serve files.

guard start

That’s it guys we created our workflow for generating HTML5 using the asciidoctor format. Hit like if you like, subs if you love and as always live life. Hope you guys, enjoyed this article!