slight enhancements for the user agent stylesheet slightcss.devins.page
css stylesheet framework lightweight
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 711a792e6ec21cb0ee052e5be6f6042dd4233d93 173 lines 5.7 kB view raw
1<!doctype html> 2<html lang="en"> 3 <head> 4 <meta charset="UTF-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 6 <title>slight.css</title> 7 <link rel="stylesheet" href="slight.css" /> 8 </head> 9 <body> 10 <header> 11 <h1>slight.css</h1> 12 <nav> 13 <ul> 14 <li> 15 <a href="https://npmjs.com/package/@intergrav/slight.css">npm</a> 16 </li> 17 <li> 18 <a href="https://github.com/intergrav/slight.css">git</a> 19 </li> 20 <li> 21 <a href="https://github.com/intergrav/slight.css/issues">issues</a> 22 </li> 23 </ul> 24 </nav> 25 </header> 26 <p> 27 <strong>slight.css</strong> is an incredibly simple CSS stylesheet that 28 adds some <em>slight</em> enhancements on top of the default user agent 29 stylesheet. 30 </p> 31 <p> 32 it aims to provide a more pleasant reading experience while relying mostly 33 on native browser styles. things such as background and text colors are 34 chosen by the browser. 35 </p> 36 <p> 37 this can be used as a good baseline for any web project, or as-is for a 38 super barebones website. 39 </p> 40 <p> 41 the page that you are currently viewing is using slight.css as its 42 stylesheet. 43 </p> 44 <h2>how do i use it?</h2> 45 <h3>html import</h3> 46 <p>place this somewhere in your <code>head</code>:</p> 47 <pre><code>&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/slight.css@1"&gt;</code></pre> 48 <h3>css import</h3> 49 <p>place this somewhere in your stylesheet:</p> 50 <pre><code>@import url(https://cdn.jsdelivr.net/npm/@intergrav/slight.css@1);</code></pre> 51 <h3>npm package</h3> 52 <p> 53 run this in your terminal, 54 <strong>replacing with the proper command</strong>: 55 </p> 56 <pre><code>[npm/yarn/pnpm/bun] add @intergrav/slight.css</code></pre> 57 <h2>what exactly does it change?</h2> 58 <ol> 59 <li> 60 automatically adjusts the color scheme based on system preferences 61 </li> 62 <li>uses the default system sans-serif/monospace fonts</li> 63 <li>sets a maximum width for the body content on widescreen viewports</li> 64 <li>increases line height and changes tab size</li> 65 <li> 66 adds borders and padding to table elements for better spacing and 67 clarity 68 </li> 69 <li> 70 adds a border to inline code and code blocks for better readability 71 </li> 72 <li>makes blockquotes look a bit nicer with a border and padding</li> 73 <li>displays lists in nav horizontally when placed in header</li> 74 </ol> 75 <p> 76 keep in mind that mostly relying on the user agent stylesheet means that 77 things could possibly look different on other browsers. for certain 78 projects, this may matter, and you might want to look into using a CSS 79 reset/normalize stylesheet such as 80 <a href="https://github.com/sindresorhus/modern-normalize" 81 >modern-normalize</a 82 >. 83 </p> 84 <h2>demo elements</h2> 85 <h3>blockquote</h3> 86 <blockquote cite="https://example.com"> 87 <p> 88 congue ex inceptos ut est gravida purus. convallis suspendisse mattis 89 porta metus mus nisl ad ante eros inceptos. iaculis convallis gravida 90 odio venenatis ut velit. fames non nunc sollicitudin dictumst litora 91 natoque consectetur erat. fermentum mattis arcu quam sociosqu libero 92 tincidunt pellentesque rutrum. pulvinar per habitasse fusce nec bibendum 93 tempor natoque efficitur si. 94 </p> 95 <footer><cite>a really cool person</cite></footer> 96 </blockquote> 97 <blockquote> 98 <p>this is a blockquote without a citation.</p> 99 <blockquote> 100 <p>this is a nested blockquote.</p> 101 </blockquote> 102 </blockquote> 103 <h3>table</h3> 104 <table> 105 <caption> 106 table caption 107 </caption> 108 <thead> 109 <tr> 110 <th>header 1</th> 111 <th>header 2</th> 112 <th>header 3</th> 113 </tr> 114 </thead> 115 <tbody> 116 <tr> 117 <td>row 1</td> 118 <td>row 1</td> 119 <td>row 1</td> 120 </tr> 121 <tr> 122 <td>row 2</td> 123 <td>row 2</td> 124 <td>row 2</td> 125 </tr> 126 </tbody> 127 </table> 128 <h3>code</h3> 129 <p> 130 this is normal text, while this is <code>inline code</code> marked with 131 code tag. 132 </p> 133 <h3>code block (pre+code)</h3> 134 <pre><code>this is a code block 135 this is a line of code, indented with tab 136 this is another line of code, indented with tab 137beep boop</code></pre> 138 <h3>forms</h3> 139 <p>this form doesn't actually do anything its just a demo</p> 140 <form> 141 <label for="fname">first name</label><br /> 142 <input type="text" id="fname" name="fname" /><br /> 143 <label for="lname">last name</label><br /> 144 <input type="text" id="lname" name="lname" /><br /><br /> 145 <input type="radio" id="one" name="options" value="option 1" /> 146 <label for="one">option 1</label><br /> 147 <input type="radio" id="two" name="options" value="option 2" /> 148 <label for="two">option 2</label><br /> 149 <input type="radio" id="three" name="options" value="option 3" /> 150 <label for="three">option 3</label><br /><br /> 151 <input type="submit" value="submit" /> 152 </form> 153 <h2>difference between this and dev.css?</h2> 154 <p> 155 i maintain and use both, but this is a much more simple alternative to 156 <a href="https://devcss.devins.page">dev.css</a> that mainly focuses on 157 improving default user agent stylesheets rather than having a full custom 158 set of styles. slight.css is more limited as it has less built-in element 159 styles and doesn't have custom theme support (although you can apply your 160 own stylesheets on top). it may also be less consistent across browsers. 161 </p> 162 <a href="https://devins.page" 163 ><img 164 src="https://raw.githubusercontent.com/intergrav/branding/refs/heads/main/personal/badge.svg" 165 /></a> 166 <footer> 167 <p> 168 slight.css and this website was written by 169 <a href="https://github.com/intergrav">intergrav</a> 170 </p> 171 </footer> 172 </body> 173</html>