Skip to content

Dark reader style for the book - Learning Modern 3D Graphics Programming. by jaxvanyang

Screenshot of Dark reader style for the book - Learning Modern 3D Graphics Programming.

Details

Authorjaxvanyang

LicenseNo License

Categoryparoj.github.io

Created

Updated

Size1.4 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Dark style is inspired by Microsoft Edge immersive reader. Also limit line width to 80 characters for readability. But I didn't find a way to center the body block, maybe you could help with this.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           Dark reader style for the book - Learning Modern 3D Graphics Programming.
@namespace      github.com/openstyles/stylus
@version        1.0.0
@description    A new userstyle
@author         JaxVanYang
==/UserStyle== */
@-moz-document url-prefix("https://paroj.github.io/gltut/") {
	/* Dark reader styles */
	body {
		font-family: "Sitka Text", Georgia, Cambria, Calibri;
		font-size: 16px;
		line-height: 1.5;
		color: #B2B2B2 !important;
		background-color: #242424;
		padding-right: 8px;
		max-width: 80ch;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-weight: 600;
		margin: 0;
		padding: 0;
		line-height: 1.2;
	}

	h1 {
		font-size: 2.75em;
	}

	h2 {
		font-size: 2em;
	}

	h3 {
		font-size: 1.5em;
	}

	h4 {
		font-size: 1.25em;
	}

	p {
		font-size: 1.125em;
		line-height: 1.5;
	}

	div.navheader,
	div.preface,
	div.section,
	div.navfooter,
	body > div {
		max-width: 80ch;
		overflow-wrap: break-word;
	}

	a:link {
		color: #9CEBED;
	}


	a:visited {
		color: #F9B8B8;
	}

	a:hover {
		color: #BBBDF7;
		text-decoration: none;
	}

	::selection {
		background-color: rgba(56, 139, 253, 0.4);
	}

	/* Style for special texts and code */
	code.function {
		color: #FFA3AC;
	}

	code.varname {
		color: #ED94FF;
	}

	code.literal {
		color: #B0ADFA;
	}

	pre.programlisting {
		background-color: #030403;
	}

	span.code-modifier,
	span.code-keyword {
		color: #7272d3;
	}

	span.code-type {
		color: #9fcdd7;
	}
}

Reviews

No reviews yet.