请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

spcss: 适用于简单的文本型网站的样式表

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

spcss

开源软件地址:

https://gitee.com/mirrors/spcss

开源软件介绍:


SPCSS

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

View DemoView CSSNPM VersionJSDelivr HitsMIT LicenseTwitter

Contents

Demo

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

SPCSS supports systems and web browsers with dark color theme too, sohow the page looks depends on the color theme selected on your system orbrowser.

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 boththemes:

Demo of SPCSS light themeDemo of SPCSS dark theme

Use SPCSS

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

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/spcss@0.8.0">

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

CDN URLs

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

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

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

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

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

https://unpkg.com/spcss

Why SPCSS?

I often develop primarily text-based websites and webpages. The defaultstyle chosen by the web browsers while decent leaves a bit to bedesired, so I often add a minimal stylesheet to improve the apperance ofthe document, hyperlinks, code blocks, blockquotes, tables, etc. Thisproject shares the minimal stylesheet that I often rely on for stylingsimple websites and webpages.

You are welcome to fork this repository and customize it tomaintain your own copy of sp.css with styles that youfrequently 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 beingtoo long. Shorter lines make it easier for our eyes to gauge thebeginning 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 frompreceding content.
  • Less margin below headings as well as less line-height for marginsto associate them more tightly with succeeding content.
  • Support for heading anchor links to facilitate sharing direct links tosections of a page.
  • Support for special styling of keyboard input (<kbd>) within codeblocks (<pre>).
  • Ensure width of images do not exceed the maximum width for the<body> element.
  • Simple styling for <figure> and <figcaption> elements such asmargins aligned with the margins of text paragraphs, centeredcaptions, reduced font size for captions.
  • Light gray background for code blocks and blockquotes.
  • Prevent very long lines of code from overflowing outside the gray boxfor code blocks. Instead, make the code block scrollable when the codeoverflows the gray box.
  • Light borders for table cells.

See this example page for a quick demonstration of some ofthese 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.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap