3 Star 0 Fork 0

Gitee 极速下载 / spcss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/susam/spcss
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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/spcss@0.9.0">

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/spcss@0.9.0

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.

The MIT License (MIT) ===================== Copyright (c) 2020-2022 Susam Pal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

适用于简单的文本型网站的样式表 展开 收起
HTML/CSS
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
HTML/CSS
1
https://gitee.com/mirrors/spcss.git
git@gitee.com:mirrors/spcss.git
mirrors
spcss
spcss
main

搜索帮助