• Stars
    star
    939
  • Rank 48,667 (Top 1.0 %)
  • Language
    CSS
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple, minimal, classless stylesheet for simple HTML pages

SPCSS

SPCSS is a simple and plain stylesheet for simple text-based websites.

View Demo View CSS NPM Version JSDelivr Hits MIT License Twitter

Contents

Demo

Check this demo page to see how SPCSS styles a simple HTML page.

SPCSS supports systems and web browsers with dark color theme too, so how the page looks depends on the color theme selected on your system or browser.

If you are unable to change your desktop or browser theme right now, here are some screenshots to see what the output looks like with both themes:

Demo of SPCSS light theme Demo of SPCSS dark theme

Use SPCSS

To use SPCSS, merely add this line of code to the <head> element of your HTML file:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]">

Alternatively, download the CSS file from here, edit and customize it as per your requirements, and use it in your project. You are also welcome to fork this repository and customize it to maintain your own copy of sp.css with styles you frequently need.

CDN URLs

Use the following URL in the <link> tag to load version 0.9.0 (the current version at this time) of SPCSS:

https://cdn.jsdelivr.net/npm/[email protected]

Use the following URL in the <link> tag to always load the latest version of SPCSS:

https://cdn.jsdelivr.net/npm/spcss

If you need something really easy to remember, use this URL to load the latest version of SPCSS:

https://unpkg.com/spcss

Why SPCSS?

I often develop primarily text-based websites and webpages. The default style chosen by the web browsers while decent leaves a bit to be desired, so I often add a minimal stylesheet to improve the apperance of the document, hyperlinks, code blocks, blockquotes, tables, etc. This project shares the minimal stylesheet that I often rely on for styling simple websites and webpages.

You are welcome to fork this repository and customize it to maintain your own copy of sp.css with styles that you frequently need.

Features

Here is a summary of the style changes provided by SPCSS:

  • Support for dark color theme (prefers-color-scheme: dark).
  • Maximum width for the <body> element to prevent the lines from being too long. Shorter lines make it easier for our eyes to gauge the beginning and end of the lines.
  • Dark gray (#333) text color instead of black (#000) in light mode.
  • Increased line-height to add more room around the lines.
  • More margin above headings to separate them more conspicuously from preceding content.
  • Less margin below headings as well as less line-height for margins to associate them more tightly with succeeding content.
  • Support for heading anchor links to facilitate sharing direct links to sections of a page.
  • Support for special styling of keyboard input (<kbd>) within code blocks (<pre>).
  • Ensure width of images do not exceed the maximum width for the <body> element.
  • Simple styling for <figure> and <figcaption> elements such as margins aligned with the margins of text paragraphs, centered captions, reduced font size for captions.
  • Light gray background for code blocks and blockquotes.
  • Prevent very long lines of code from overflowing outside the gray box for code blocks. Instead, make the code block scrollable when the code overflows the gray box.
  • Light borders for table cells.

See this example page for a quick demonstration of some of these features.

License

This is free and open source software. You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of it, under the terms of the MIT License. See LICENSE.md for details.

This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or implied. See LICENSE.md for details.

Support

To report bugs, suggest improvements, or ask questions, create issues.

More Repositories

1

texme

Self-rendering Markdown + LaTeX documents
JavaScript
2,276
star
2

mintotp

Minimal TOTP generator in 20 lines of Python
Python
1,299
star
3

uncap

Map Caps Lock to Escape or any key to any key
C
1,048
star
4

gitpr

Quick reference guide on fork and pull request workflow
Makefile
957
star
5

emfy

A dark and sleek Emacs setup for general purpose editing and programming
Emacs Lisp
932
star
6

muboard

Self-rendering and distributable mathematics chalkboards
JavaScript
560
star
7

emacs4cl

A tiny DIY kit to set up vanilla Emacs for Common Lisp programming
Emacs Lisp
368
star
8

tucl

The first-ever paper on the Unix shell written by Ken Thompson in 1976 scanned, transcribed, and redistributed with permission
Makefile
355
star
9

mathb

Share mathematics on the web with LaTeX and Markdown
Common Lisp
308
star
10

cfrs

An extremely minimal drawing language consisting of only 6 simple commands: C, F, R, S, [, and ].
HTML
240
star
11

invaders

A 1980s-arcade-style game written using HTML5, Canvas, and Web Audio
HTML
166
star
12

hello

A 23-byte β€œhello, world” program assembled with DEBUG.EXE in MS-DOS
Assembly
156
star
13

devil

Emacs minor mode that intercepts and translates keystrokes to provide a modifier-free non-modal editing experience
Emacs Lisp
156
star
14

pov25

Ray tracing 25 scenes in 25 days with POV-Ray
POV-Ray SDL
154
star
15

fxyt

Tiny, esoteric, stack-based, postfix, canvas colouring language with only 36 simple commands
HTML
114
star
16

pcface

Bitmap arrays for rendering CP437 glyphs using IBM PC OEM fonts
Python
86
star
17

lab

Random experiments, exploration, and learning
Shell
80
star
18

vimer

Declutter your desktop by opening files in existing instance of GVim/MacVim
Shell
70
star
19

myrgb

A simple RGB color guessing game
HTML
67
star
20

quickqwerty

Touch typing tutor that runs in your web browser
JavaScript
61
star
21

ice

Ice - WSGI on the rocks
Python
58
star
22

aes.vbs

AES-256-CBC Encrypt and Decrypt Functions in VBScript
VBScript
52
star
23

heart

Hearts drawn with Python Matplotlib and C
Python
43
star
24

timebox

A timer script for Windows/Linux/Unix/macOS to practice timeboxing (the time management technique)
Shell
43
star
25

may4

Celebrating Star Wars Day with some Forth code! May the Forth be with you!
Forth
38
star
26

susam.net

Source code of https://susam.net/
Common Lisp
35
star
27

inwee

Conveniently send text and commands from file or standard input to WeeChat with this wrapper around WeeChat's FIFO pipe
Shell
25
star
28

bfc

Brainfuck compiler and interpreter
C
17
star
29

reboot

A 5-byte reboot program assembled with DEBUG.EXE in MS-DOS
Assembly
16
star
30

nimb

NIMB IRC Matrix Bridge (NIMB) is a simple client tool that bridges IRC and Matrix channels and forwards messages from one to others
Python
16
star
31

dotfiles

Mostly ~/.* files to configure emacs, vim, sh, tmux, etc. on Debian, macOS, and Windows
Shell
13
star
32

userscripts

Very tiny userscripts to customise the apperance of Hacker News
JavaScript
10
star
33

mano-cpu

My bachelor's degree final year project: A CPLD implementation of a 16-bit microprocessor I learnt from Computer System Architecture by M. Morris Mano
VHDL
8
star
34

susam.github.io

Mirror of https://susam.net/ generated from https://github.com/susam/susam.net
HTML
6
star
35

talks

Talks and presentations
TeX
6
star
36

maze

Susam's Maze β€’ Main website: https://susam.in/maze/ β€’ Mirror: https://susam.github.io/maze/
Common Lisp
5
star
37

licenses

Reusable copies of open source licenses
HTML
3
star
38

blob

Binary files generated from or used by other repositories
HTML
3
star
39

sunaina-and-susam

Sunaina & Susam's wedding website
HTML
2
star
40

.github

1
star
41

emacskeys

Screencasts of Emacs keys and commands
HTML
1
star