ShareLatex.com - 80 & 100 column code ruler

Added by masamunecyrus@userstyles, Created: May 13, 2015, Updated: May 18, 2015
With the style applied
Browser
Ruler color

Description:

Adds 80 and 100-character rulers in the code viewer on ShareLatex.com

More info
Because CSS does not have a "character width" unit, it's impossible to simply make code that says "put a vertical ruler at columns 80 and 100."

Unfortunately, that means that we have to manually give an x-offset for the rulers.

In the CSS, you'll find two em-sizes. Those are the x-offsets of the 80-column and 100-column rulers, respectively. These offsets were tested on Windows 7 in Firefox, but they will undoubtedly need to be adjusted for different OSes and different browsers. That must simply be done by manually adjusting the values and guess-and-check.

UPDATE (2015/05/18): I added a couple of settings. You can now choose to install the theme with white rulers (e.g., for dark themes) or black rulers (e.g., for light themes). Additionally, you can choose between Chrome and Firefox. As before, the x-offsets for the rulers have been tested on Chrome and Firefox using Windows 7 with default font sizes and 1920x1080 resolution. People with different setups will likely have to manually adjust the x-offsets.

Installs:
Applies to:
sharelatex.com
License:
CC0 1.0 Universal.
masamunecyrus@userstyles has waived all copyright and related or neighboring rights to ShareLatex.com - 80 & 100 column code ruler, to the extent allowed by law.

Related styles:

WARNING: This webware is not functioning properly. Please enable javascript in your browser and try again.