├── .gitignore
├── favicon.ico
├── _assets
├── day.png
├── og.png
├── night.png
└── terminal.png
├── README.md
├── theme
├── night.css
├── boilerplate.css
├── terminal.css
├── night.html
└── terminal.html
├── now.json
├── 404.html
├── themes.html
├── usage
├── index.html
└── elements.html
├── index.html
├── lite.css
├── new.min.css
├── demo.html
├── new.css
├── legacy
└── index.html
└── all.html
/.gitignore:
--------------------------------------------------------------------------------
1 | .vercel
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xz/new.css-site/HEAD/favicon.ico
--------------------------------------------------------------------------------
/_assets/day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xz/new.css-site/HEAD/_assets/day.png
--------------------------------------------------------------------------------
/_assets/og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xz/new.css-site/HEAD/_assets/og.png
--------------------------------------------------------------------------------
/_assets/night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xz/new.css-site/HEAD/_assets/night.png
--------------------------------------------------------------------------------
/_assets/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xz/new.css-site/HEAD/_assets/terminal.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # new.css Site
2 |
3 | The website for the repo [xz/new.css](https://github.com/xz/new.css).
4 |
--------------------------------------------------------------------------------
/theme/night.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --nc-tx-1: #ffffff;
3 | --nc-tx-2: #eeeeee;
4 | --nc-bg-1: #000000;
5 | --nc-bg-2: #111111;
6 | --nc-bg-3: #222222;
7 | --nc-lk-1: #3291FF;
8 | --nc-lk-2: #0070F3;
9 | --nc-lk-tx: #FFFFFF;
10 | --nc-ac-1: #7928CA;
11 | --nc-ac-tx: #FFFFFF;
12 | }
--------------------------------------------------------------------------------
/theme/boilerplate.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --nc-font-sans: sans-serif;
3 | --nc-font-mono: monospace;
4 | --nc-tx-1: #000000;
5 | --nc-tx-2: #1A1A1A;
6 | --nc-bg-1: #FFFFFF;
7 | --nc-bg-2: #F6F8FA;
8 | --nc-bg-3: #E5E7EB;
9 | --nc-lk-1: #0070F3;
10 | --nc-lk-2: #0366D6;
11 | --nc-lk-tx: #FFFFFF;
12 | --nc-ac-1: #79FFE1;
13 | --nc-ac-tx: #000000;
14 | }
--------------------------------------------------------------------------------
/now.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "cleanUrls": true,
4 | "trailingSlash": true,
5 | "redirects": [
6 | { "source": "/old.css", "destination": "https://newcss.net/new.min.css" },
7 | { "source": "/user", "destination": "/api/user", "permanent": false },
8 | { "source": "/view-source", "destination": "https://github.com/zeit/now" }
9 | ]
10 | }
--------------------------------------------------------------------------------
/theme/terminal.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.xz.style/serve/fira-code.css");
2 |
3 | :root {
4 | --nc-font-sans: 'Fira Code', monospace;
5 | --nc-font-mono: 'Fira Code', monospace;
6 | --nc-tx-1: #FFFFFF;
7 | --nc-tx-2: #EEEEEE;
8 | --nc-bg-1: #000000;
9 | --nc-bg-2: #002700;
10 | --nc-bg-3: #005800;
11 | --nc-lk-1: #00FF00;
12 | --nc-lk-2: #00c200;
13 | --nc-lk-tx: #000000;
14 | --nc-ac-1: #00FF00;
15 | --nc-ac-tx: #000000;
16 | }
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 404 - new.css
7 |
8 |
9 |
10 |
11 | 404
12 | The page you're looking for could not be found. Maybe try returning to the homepage .
13 | Sure you're in the right place? Please open an issue on GitHub here .
14 |
--------------------------------------------------------------------------------
/themes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 | Themes
31 |
32 | Themes can change any of the colors or fonts used by new.css.
33 |
34 | For information on making your own theme, visit the GitHub page. A full theme customization guide is in the works and coming soon.
35 |
36 |
37 |
38 | Pre-made Themes
39 |
40 | Here are two extra themes with CDN links. Feel free to use or edit them!
41 |
42 | Night
43 |
44 | Night theme is enabled by default if your browser is set to prefer dark themes. Using the theme link below makes it use night theme regardless.
45 |
46 | <link rel="stylesheet" href="https://newcss.net/theme/night.css">
47 |
48 | Preview at newcss.net/theme/night/
49 |
50 |
51 |
52 | Terminal
53 |
54 | <link rel="stylesheet" href="https://newcss.net/theme/terminal.css">
55 |
56 | Preview at newcss.net/theme/terminal/
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/usage/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Usage - new.css
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 | Usage
31 |
32 | Here's how to start using new.css in under 5 minutes.
33 |
34 |
35 |
36 | 1. Create an HTML document
37 |
38 | In your favorite text/code editor, create a new HTML document. It can be as simple as this-
39 |
40 |
41 | <!DOCTYPE html>
42 | <html lang="en">
43 | <head>
44 | <meta charset="UTF-8">
45 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
46 | <title>Document</title>
47 | </head>
48 | <body>
49 | <h1>Hello, world</h1>
50 | </body>
51 | </html>
52 |
53 |
54 |
55 | 2. Add the new.css stylesheet
56 |
57 | Just before the end of your <head>, add this code.
58 |
59 |
60 | <link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css">
61 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css">
62 |
63 |
64 |
65 |
66 | 3. Add content
67 |
68 | Here's the fun part. Write your semantic HTML and watch it turn into a modern and responsive site!
69 |
70 | 3.1 - Tip
71 |
72 | Use the <header> element at the top of your <body> to create a header. Here's what it should look like-
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | Have any questions or run into an issue? I'm here to help. Feel free to open an issue on GitHub here , or join the community Discord here .
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/usage/elements.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Elements - new.css
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 | Elements
31 |
32 | new.css takes advantage of semantic HTML elements. Here are some guidelines on how these should be used for the best results.
33 |
34 |
35 |
36 | Table of Contents
37 |
40 |
41 |
42 |
43 | Body
44 |
45 | Use the <header> tag to create a large header for your page. Only use this at the very top of your <body> !
46 |
47 |
48 |
49 | Buttons
50 |
51 | For a link button, wrap the button in an <a> tag. For example-
52 |
53 |
54 | <a href="https://example.com">
55 | <button>Click me!</button>
56 | </a>
57 |
58 |
59 |
60 | Code
61 |
62 | Use <code> for short inline code.
63 |
64 | Use <pre> for code blocks.
65 |
66 | These two shouldn't be nested, but if they are, the child element will clear it's own style and match the parent.
67 |
68 | Use <kbd> for keyboard input. For example, ALT + F4
69 |
70 |
71 |
72 | Details
73 |
74 | The <details> element can make a toggle-able dropdown without any JavaScript. Here's an example-
75 |
76 |
77 | Click me!
78 | Lorem ipsum dolor sit amet.
79 |
80 |
81 | Here's the code-
82 |
83 |
84 | <details>
85 | <summary>Click me!</summary>
86 | <p>Lorem ipsum dolor sit amet.</p>
87 | </details>
88 |
89 |
90 |
91 |
92 | Text
93 |
94 | Wrap all body text in <p> tags, unless it's the sole child of another element. Here are examples-
95 |
96 |
97 | <blockquote>
98 | Hello, world!
99 | </blockquote>
100 |
101 |
102 |
103 | <blockquote>
104 | <p>Hello, world!</p>
105 | <button>Click me!</button>
106 | </blockquote>
107 |
108 |
109 |
110 | <ul>
111 | <li>Hello, world!</li>
112 | <li>
113 | <p>Line 1</p>
114 | <img src="https://example.com/image.png">
115 | </li>
116 | </ul>
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 | Write modern websites using only HTML.
31 |
32 |
33 |
34 | This site is made from vanilla HTML and the default new.css theme. View Source
35 |
36 | new.css is a classless CSS framework to write modern websites using only HTML. It's ~4.5kb.
37 |
38 | It's perfect for-
39 |
40 |
41 | A dead-simple blog
42 | Collecting your most used links
43 | Making a simple "about me" site
44 | Rendering markdown-generated HTML
45 |
46 |
47 | The web was made for semantic HTML—let's start using it.
48 |
49 |
50 |
51 | Get Started
52 |
53 | View the demo at /demo .
54 |
55 | Set up new.css in under 5 minutes at /usage .
56 |
57 | Learn about special semantic elements on /usage/elements .
58 |
59 | Learn about custom themes on /themes .
60 |
61 | new.css is fully open source at xz/new.css on GitHub.
62 |
63 |
64 |
65 | Sponsors
66 |
67 |
71 |
72 |
73 |
74 | Special Thanks
75 |
76 |
77 | sakura by oxal for introducing me to classless CSS
78 | mydarkstar for priceless advice
79 | Vercel for sponsoring xz and for their amazing color palettes
80 |
81 |
82 |
83 |
84 |
85 |
86 | We collect totally anonymous basic analytics using Simple Analytics. View live analytics at simpleanalytics.com/newcss.net .
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/lite.css:
--------------------------------------------------------------------------------
1 | :root{--nc-font-sans:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--nc-font-mono:Consolas,monaco,'Ubuntu Mono','Liberation Mono','Courier New',Courier,monospace;--nc-tx-1:#000;--nc-tx-2:#1A1A1A;--nc-bg-1:#FFF;--nc-bg-2:#F6F8FA;--nc-bg-3:#E5E7EB;--nc-lk-1:#0070F3;--nc-lk-2:#0366D6;--nc-lk-tx:#FFF;--nc-ac-1:#79FFE1;--nc-ac-tx:#0C4047}@media (prefers-color-scheme: dark){:root{--nc-tx-1:#fff;--nc-tx-2:#eee;--nc-bg-1:#000;--nc-bg-2:#111;--nc-bg-3:#222;--nc-lk-1:#3291FF;--nc-lk-2:#0070F3;--nc-lk-tx:#FFF;--nc-ac-1:#7928CA;--nc-ac-tx:#FFF}}*{margin:0;padding:0}address,area,article,aside,audio,blockquote,datalist,details,dl,fieldset,figure,form,input,iframe,img,meter,nav,ol,optgroup,option,output,p,pre,progress,ruby,section,table,textarea,ul,video{margin-bottom:1rem}html,input,select,button{font-family:var(--nc-font-sans)}body{margin:0 auto;max-width:750px;padding:2rem;border-radius:6px;overflow-x:hidden;word-break:break-word;overflow-wrap:break-word;background:var(--nc-bg-1);color:var(--nc-tx-2);font-size:1.03rem;line-height:1.5}::selection{background:var(--nc-ac-1);color:var(--nc-ac-tx)}p{margin-bottom:1rem}h1,h2,h3,h4,h5,h6{line-height:1;color:var(--nc-tx-1);padding-top:.875rem}h1,h2,h3{color:var(--nc-tx-1);padding-bottom:2px;margin-bottom:8px;border-bottom:1px solid var(--nc-bg-2)}h4,h5,h6{margin-bottom:.3rem}h1{font-size:2.25rem}h2{font-size:1.85rem}h3{font-size:1.55rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:.875rem}a{color:var(--nc-lk-1)}a:hover{color:var(--nc-lk-2)}abbr:hover{cursor:help}blockquote{padding:1.5rem;background:var(--nc-bg-2);border-left:5px solid var(--nc-bg-3)}abbr{cursor:help}blockquote :last-child{padding-bottom:0;margin-bottom:0}header{background:var(--nc-bg-2);border-bottom:1px solid var(--nc-bg-3);padding:2rem 1.5rem;margin:-2rem calc(0px - (50vw - 50%)) 2rem;padding-left:calc(50vw - 50%);padding-right:calc(50vw - 50%)}header h1,header h2,header h3{padding-bottom:0;border-bottom:0}header > :first-child{margin-top:0;padding-top:0}header > :last-child{margin-bottom:0}a button,button,input[type="submit"],input[type="reset"],input[type="button"]{font-size:1rem;display:inline-block;padding:6px 12px;text-align:center;text-decoration:none;white-space:nowrap;background:var(--nc-lk-1);color:var(--nc-lk-tx);border:0;border-radius:4px;box-sizing:border-box;cursor:pointer;color:var(--nc-lk-tx)}a button[disabled],button[disabled],input[type="submit"][disabled],input[type="reset"][disabled],input[type="button"][disabled]{cursor:default;opacity:.5;cursor:not-allowed}a button:focus,a button:hover,button:focus,button:hover,input[type="submit"]:focus,input[type="submit"]:hover,input[type="reset"]:focus,input[type="reset"]:hover,input[type="button"]:focus,input[type="button"]:hover{background:var(--nc-lk-2)}code,pre,kbd,samp{font-family:var(--nc-font-mono)}code,samp,kbd,pre{background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px;padding:3px 6px;font-size:.9rem}kbd{border-bottom:3px solid var(--nc-bg-3)}pre{padding:1rem 1.4rem;max-width:100%;overflow:auto}pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}code pre{display:inline;background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}details{padding:.6rem 1rem;background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px}summary{cursor:pointer;font-weight:700}details[open]{padding-bottom:.75rem}details[open] summary{margin-bottom:6px}details[open]>:last-child{margin-bottom:0}dt{font-weight:700}dd::before{content:'→ '}hr{border:0;border-bottom:1px solid var(--nc-bg-3);margin:1rem auto}fieldset{margin-top:1rem;padding:2rem;border:1px solid var(--nc-bg-3);border-radius:4px}legend{padding:auto .5rem}table{border-collapse:collapse;width:100%}td,th{border:1px solid var(--nc-bg-3);text-align:left;padding:.5rem}th{background:var(--nc-bg-2)}tr:nth-child(even){background:var(--nc-bg-2)}table caption{font-weight:700;margin-bottom:.5rem}textarea{max-width:100%}ol,ul{padding-left:2rem}li{margin-top:.4rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}mark{padding:3px 6px;background:var(--nc-ac-1);color:var(--nc-ac-tx)}textarea,select,input{padding:6px 12px;margin-bottom:.5rem;background:var(--nc-bg-2);color:var(--nc-tx-2);border:1px solid var(--nc-bg-2);border-radius:4px;box-shadow:none;box-sizing:border-box}textarea:focus,select:focus,input[type]:focus{border:1px solid var(--nc-bg-3);outline:0}img{max-width:100%}
2 |
--------------------------------------------------------------------------------
/new.min.css:
--------------------------------------------------------------------------------
1 | @import "https://fonts.xz.style/serve/inter.css";:root{--nc-font-sans:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--nc-font-mono:Consolas,monaco,'Ubuntu Mono','Liberation Mono','Courier New',Courier,monospace;--nc-tx-1:#000;--nc-tx-2:#1A1A1A;--nc-bg-1:#FFF;--nc-bg-2:#F6F8FA;--nc-bg-3:#E5E7EB;--nc-lk-1:#0070F3;--nc-lk-2:#0366D6;--nc-lk-tx:#FFF;--nc-ac-1:#79FFE1;--nc-ac-tx:#0C4047}@media (prefers-color-scheme: dark){:root{--nc-tx-1:#fff;--nc-tx-2:#eee;--nc-bg-1:#000;--nc-bg-2:#111;--nc-bg-3:#222;--nc-lk-1:#3291FF;--nc-lk-2:#0070F3;--nc-lk-tx:#FFF;--nc-ac-1:#7928CA;--nc-ac-tx:#FFF}}*{margin:0;padding:0}address,area,article,aside,audio,blockquote,datalist,details,dl,fieldset,figure,form,input,iframe,img,meter,nav,ol,optgroup,option,output,p,pre,progress,ruby,section,table,textarea,ul,video{margin-bottom:1rem}html,input,select,button{font-family:var(--nc-font-sans)}body{margin:0 auto;max-width:750px;padding:2rem;border-radius:6px;overflow-x:hidden;word-break:break-word;overflow-wrap:break-word;background:var(--nc-bg-1);color:var(--nc-tx-2);font-size:1.03rem;line-height:1.5}::selection{background:var(--nc-ac-1);color:var(--nc-ac-tx)}p{margin-bottom:1rem}h1,h2,h3,h4,h5,h6{line-height:1;color:var(--nc-tx-1);padding-top:.875rem}h1,h2,h3{color:var(--nc-tx-1);padding-bottom:2px;margin-bottom:8px;border-bottom:1px solid var(--nc-bg-2)}h4,h5,h6{margin-bottom:.3rem}h1{font-size:2.25rem}h2{font-size:1.85rem}h3{font-size:1.55rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:.875rem}a{color:var(--nc-lk-1)}a:hover{color:var(--nc-lk-2)}abbr:hover{cursor:help}blockquote{padding:1.5rem;background:var(--nc-bg-2);border-left:5px solid var(--nc-bg-3)}abbr{cursor:help}blockquote :last-child{padding-bottom:0;margin-bottom:0}header{background:var(--nc-bg-2);border-bottom:1px solid var(--nc-bg-3);padding:2rem 1.5rem;margin:-2rem calc(0px - (50vw - 50%)) 2rem;padding-left:calc(50vw - 50%);padding-right:calc(50vw - 50%)}header h1,header h2,header h3{padding-bottom:0;border-bottom:0}header > :first-child{margin-top:0;padding-top:0}header > :last-child{margin-bottom:0}a button,button,input[type="submit"],input[type="reset"],input[type="button"]{font-size:1rem;display:inline-block;padding:6px 12px;text-align:center;text-decoration:none;white-space:nowrap;background:var(--nc-lk-1);color:var(--nc-lk-tx);border:0;border-radius:4px;box-sizing:border-box;cursor:pointer;color:var(--nc-lk-tx)}a button[disabled],button[disabled],input[type="submit"][disabled],input[type="reset"][disabled],input[type="button"][disabled]{cursor:default;opacity:.5;cursor:not-allowed}a button:focus,a button:hover,button:focus,button:hover,input[type="submit"]:focus,input[type="submit"]:hover,input[type="reset"]:focus,input[type="reset"]:hover,input[type="button"]:focus,input[type="button"]:hover{background:var(--nc-lk-2)}code,pre,kbd,samp{font-family:var(--nc-font-mono)}code,samp,kbd,pre{background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px;padding:3px 6px;font-size:.9rem}kbd{border-bottom:3px solid var(--nc-bg-3)}pre{padding:1rem 1.4rem;max-width:100%;overflow:auto}pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}code pre{display:inline;background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}details{padding:.6rem 1rem;background:var(--nc-bg-2);border:1px solid var(--nc-bg-3);border-radius:4px}summary{cursor:pointer;font-weight:700}details[open]{padding-bottom:.75rem}details[open] summary{margin-bottom:6px}details[open]>:last-child{margin-bottom:0}dt{font-weight:700}dd::before{content:'→ '}hr{border:0;border-bottom:1px solid var(--nc-bg-3);margin:1rem auto}fieldset{margin-top:1rem;padding:2rem;border:1px solid var(--nc-bg-3);border-radius:4px}legend{padding:auto .5rem}table{border-collapse:collapse;width:100%}td,th{border:1px solid var(--nc-bg-3);text-align:left;padding:.5rem}th{background:var(--nc-bg-2)}tr:nth-child(even){background:var(--nc-bg-2)}table caption{font-weight:700;margin-bottom:.5rem}textarea{max-width:100%}ol,ul{padding-left:2rem}li{margin-top:.4rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}mark{padding:3px 6px;background:var(--nc-ac-1);color:var(--nc-ac-tx)}textarea,select,input{padding:6px 12px;margin-bottom:.5rem;background:var(--nc-bg-2);color:var(--nc-tx-2);border:1px solid var(--nc-bg-2);border-radius:4px;box-shadow:none;box-sizing:border-box}textarea:focus,select:focus,input[type]:focus{border:1px solid var(--nc-bg-3);outline:0}img{max-width:100%}
2 |
--------------------------------------------------------------------------------
/theme/night.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css Night Theme
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | new.css Night Theme
15 |
16 |
17 | Heading 1
18 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
19 | Heading 2
20 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
21 | Heading 3
22 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
23 | Heading 4
24 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
25 | Heading 5
26 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
27 | Heading 6
28 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
29 |
30 |
31 |
32 |
33 |
34 |
35 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Aut harum
36 | molestias labore amet
37 | possimus exercitationem aperiam earum, doloribus nobis ducimus maiores quia voluptates quis omnis
38 | molestiae quisquam. Voluptatibus, officiis laudantium?
39 |
40 |
41 |
42 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic culpa, nobis doloremque veniam non,
43 | nihil
44 | cupiditate odit repellat est ALT + F4 expedita facilis. Fuga aspernatur, alias debitis eveniet totam
45 | minima vel.
46 |
47 |
48 |
49 | List item
50 | List item
51 | List item
52 | List item
53 |
54 |
55 |
56 | Step 1
57 | Step 2
58 | ????
59 | PROFIT!!!
60 |
61 |
62 |
63 | Web
64 | The part of the Internet that contains websites and web pages
65 | HTML
66 | A markup language for creating web pages
67 | CSS
68 | A technology to make HTML look better
69 |
70 |
71 |
72 | If you think privacy is unimportant for you because you have nothing to hide, you might as well say free speech
73 | is unimportant for you because you have nothing useful to say. – Edward Snowden
74 |
75 |
76 |
77 | <!DOCTYPE html>
78 | <html>
79 | <head>
80 | <title>Hello World</title>
81 | </head>
82 | <body>
83 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
84 | </body>
85 | </html>
86 |
87 |
88 |
89 |
90 |
91 |
92 | Ho-kago Tea Time
93 |
94 |
95 | Name
96 | Instrument
97 |
98 |
99 |
100 |
101 | Name
102 | Instrument
103 |
104 |
105 |
106 |
107 | Yui Hirasawa
108 | Lead Guitar
109 |
110 |
111 | Mio Akiyama
112 | Bass
113 |
114 |
115 | Ritsu Tainaka
116 | Drums
117 |
118 |
119 | Tsumugi Kotobuki
120 | Keyboard
121 |
122 |
123 | Azusa Nakano
124 | Rhythm Guitar
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/theme/terminal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css Terminal Theme
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | new.css Terminal Theme
15 |
16 |
17 | Heading 1
18 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
19 | Heading 2
20 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
21 | Heading 3
22 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
23 | Heading 4
24 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
25 | Heading 5
26 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
27 | Heading 6
28 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
29 |
30 |
31 |
32 |
33 |
34 |
35 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Aut harum
36 | molestias labore amet
37 | possimus exercitationem aperiam earum, doloribus nobis ducimus maiores quia voluptates quis omnis
38 | molestiae quisquam. Voluptatibus, officiis laudantium?
39 |
40 |
41 |
42 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic culpa, nobis doloremque veniam non,
43 | nihil
44 | cupiditate odit repellat est ALT + F4 expedita facilis. Fuga aspernatur, alias debitis eveniet totam
45 | minima vel.
46 |
47 |
48 |
49 | List item
50 | List item
51 | List item
52 | List item
53 |
54 |
55 |
56 | Step 1
57 | Step 2
58 | ????
59 | PROFIT!!!
60 |
61 |
62 |
63 | Web
64 | The part of the Internet that contains websites and web pages
65 | HTML
66 | A markup language for creating web pages
67 | CSS
68 | A technology to make HTML look better
69 |
70 |
71 |
72 | If you think privacy is unimportant for you because you have nothing to hide, you might as well say free speech
73 | is unimportant for you because you have nothing useful to say. – Edward Snowden
74 |
75 |
76 |
77 | <!DOCTYPE html>
78 | <html>
79 | <head>
80 | <title>Hello World</title>
81 | </head>
82 | <body>
83 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
84 | </body>
85 | </html>
86 |
87 |
88 |
89 |
90 |
91 |
92 | Ho-kago Tea Time
93 |
94 |
95 | Name
96 | Instrument
97 |
98 |
99 |
100 |
101 | Name
102 | Instrument
103 |
104 |
105 |
106 |
107 | Yui Hirasawa
108 | Lead Guitar
109 |
110 |
111 | Mio Akiyama
112 | Bass
113 |
114 |
115 | Ritsu Tainaka
116 | Drums
117 |
118 |
119 | Tsumugi Kotobuki
120 | Keyboard
121 |
122 |
123 | Azusa Nakano
124 | Rhythm Guitar
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 | This is not a real form and does not submit or save any information.
135 |
136 | First name
137 |
138 |
139 |
140 | Last name
141 |
142 |
143 |
144 | Gender
145 |
146 |
147 | Male
148 |
149 |
150 |
151 |
152 | Female
153 |
154 |
155 |
156 |
157 | Non-binary
158 |
159 |
160 |
161 | Email
162 |
163 |
164 |
165 | Phone number
166 |
167 |
168 |
169 | Password
170 |
171 |
172 |
173 | Favorite Flavor
174 |
175 | Chocolate
176 | Vanilla
177 | Strawberry
178 | Mint Chocolate Chip
179 | Coffee
180 |
181 |
182 |
183 | Comments
184 |
185 |
186 |
187 |
188 |
189 | I agree to the terms and conditions
190 |
191 |
192 |
193 | Sign up
194 | Reset form
195 | Disabled
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css Demo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 | Heading 1
23 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
24 | Heading 2
25 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
26 | Heading 3
27 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
28 | Heading 4
29 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
30 | Heading 5
31 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
32 | Heading 6
33 | This is paragraph text. Lorem ipsum dolor sit amet consectetur adipisicing elit.
34 |
35 |
36 |
37 |
38 |
39 |
40 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Aut harum
41 | molestias labore amet
42 | possimus exercitationem aperiam earum, doloribus nobis ducimus maiores quia voluptates quis omnis
43 | molestiae quisquam. Voluptatibus, officiis laudantium?
44 |
45 |
46 |
47 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic culpa, nobis doloremque veniam non,
48 | nihil
49 | cupiditate odit repellat est ALT + F4 expedita facilis. Fuga aspernatur, alias debitis eveniet totam
50 | minima vel.
51 |
52 |
53 |
54 | List item
55 | List item
56 | List item
57 | List item
58 |
59 |
60 |
61 | Step 1
62 | Step 2
63 | ????
64 | PROFIT!!!
65 |
66 |
67 |
68 | Web
69 | The part of the Internet that contains websites and web pages
70 | HTML
71 | A markup language for creating web pages
72 | CSS
73 | A technology to make HTML look better
74 |
75 |
76 |
77 | If you think privacy is unimportant for you because you have nothing to hide, you might as well say free speech
78 | is unimportant for you because you have nothing useful to say. – Edward Snowden
79 |
80 |
81 |
82 | <!DOCTYPE html>
83 | <html>
84 | <head>
85 | <title>Hello World</title>
86 | </head>
87 | <body>
88 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
89 | </body>
90 | </html>
91 |
92 |
93 |
94 |
95 |
96 |
97 | Ho-kago Tea Time
98 |
99 |
100 | Name
101 | Instrument
102 |
103 |
104 |
105 |
106 | Name
107 | Instrument
108 |
109 |
110 |
111 |
112 | Yui Hirasawa
113 | Lead Guitar
114 |
115 |
116 | Mio Akiyama
117 | Bass
118 |
119 |
120 | Ritsu Tainaka
121 | Drums
122 |
123 |
124 | Tsumugi Kotobuki
125 | Keyboard
126 |
127 |
128 | Azusa Nakano
129 | Rhythm Guitar
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | This is not a real form and does not submit or save any information.
140 |
141 | First name
142 |
143 |
144 |
145 | Last name
146 |
147 |
148 |
149 | Gender
150 |
151 |
152 | Male
153 |
154 |
155 |
156 |
157 | Female
158 |
159 |
160 |
161 |
162 | Non-binary
163 |
164 |
165 |
166 | Email
167 |
168 |
169 |
170 | Phone number
171 |
172 |
173 |
174 | Password
175 |
176 |
177 |
178 | Favorite Flavor
179 |
180 | Chocolate
181 | Vanilla
182 | Strawberry
183 | Mint Chocolate Chip
184 | Coffee
185 |
186 |
187 |
188 | Comments
189 |
190 |
191 |
192 |
193 |
194 | I agree to the terms and conditions
195 |
196 |
197 |
198 | Sign up
199 | Reset form
200 | Disabled
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
--------------------------------------------------------------------------------
/new.css:
--------------------------------------------------------------------------------
1 | /* Import Inter font */
2 | /* More info at https://github.com/xz/fonts */
3 | @import url('https://fonts.xz.style/serve/inter.css');
4 |
5 | :root {
6 | --nc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
7 | --nc-font-mono: Consolas, monaco, 'Ubuntu Mono', 'Liberation Mono', 'Courier New', Courier, monospace;
8 | --nc-tx-1: #000000;
9 | --nc-tx-2: #1A1A1A;
10 | --nc-bg-1: #FFFFFF;
11 | --nc-bg-2: #F6F8FA;
12 | --nc-bg-3: #E5E7EB;
13 | --nc-lk-1: #0070F3;
14 | --nc-lk-2: #0366D6;
15 | --nc-lk-tx: #FFFFFF;
16 | --nc-ac-1: #79FFE1;
17 | --nc-ac-tx: #0C4047;
18 | }
19 |
20 | @media (prefers-color-scheme: dark) {
21 | :root {
22 | --nc-tx-1: #ffffff;
23 | --nc-tx-2: #eeeeee;
24 | --nc-bg-1: #000000;
25 | --nc-bg-2: #111111;
26 | --nc-bg-3: #222222;
27 | --nc-lk-1: #3291FF;
28 | --nc-lk-2: #0070F3;
29 | --nc-lk-tx: #FFFFFF;
30 | --nc-ac-1: #7928CA;
31 | --nc-ac-tx: #FFFFFF;
32 | }
33 | }
34 |
35 | * {
36 | /* Reset margins and padding */
37 | margin: 0;
38 | padding: 0;
39 | }
40 |
41 | address,
42 | area,
43 | article,
44 | aside,
45 | audio,
46 | blockquote,
47 | datalist,
48 | details,
49 | dl,
50 | fieldset,
51 | figure,
52 | form,
53 | input,
54 | iframe,
55 | img,
56 | meter,
57 | nav,
58 | ol,
59 | optgroup,
60 | option,
61 | output,
62 | p,
63 | pre,
64 | progress,
65 | ruby,
66 | section,
67 | table,
68 | textarea,
69 | ul,
70 | video {
71 | /* Margins for most elements */
72 | margin-bottom: 1rem;
73 | }
74 |
75 | html,input,select,button {
76 | /* Set body font family and some finicky elements */
77 | font-family: var(--nc-font-sans);
78 | }
79 |
80 | body {
81 | /* Center body in page */
82 | margin: 0 auto;
83 | max-width: 750px;
84 | padding: 2rem;
85 | border-radius: 6px;
86 | overflow-x: hidden;
87 | word-break: break-word;
88 | overflow-wrap: break-word;
89 | background: var(--nc-bg-1);
90 |
91 | /* Main body text */
92 | color: var(--nc-tx-2);
93 | font-size: 1.03rem;
94 | line-height: 1.5;
95 | }
96 |
97 | ::selection {
98 | /* Set background color for selected text */
99 | background: var(--nc-ac-1);
100 | color: var(--nc-ac-tx);
101 | }
102 |
103 | h1,h2,h3,h4,h5,h6 {
104 | line-height: 1;
105 | color: var(--nc-tx-1);
106 | padding-top: .875rem;
107 | }
108 |
109 | h1,
110 | h2,
111 | h3 {
112 | color: var(--nc-tx-1);
113 | padding-bottom: 2px;
114 | margin-bottom: 8px;
115 | border-bottom: 1px solid var(--nc-bg-2);
116 | }
117 |
118 | h4,
119 | h5,
120 | h6 {
121 | margin-bottom: .3rem;
122 | }
123 |
124 | h1 {
125 | font-size: 2.25rem;
126 | }
127 |
128 | h2 {
129 | font-size: 1.85rem;
130 | }
131 |
132 | h3 {
133 | font-size: 1.55rem;
134 | }
135 |
136 | h4 {
137 | font-size: 1.25rem;
138 | }
139 |
140 | h5 {
141 | font-size: 1rem;
142 | }
143 |
144 | h6 {
145 | font-size: .875rem;
146 | }
147 |
148 | a {
149 | color: var(--nc-lk-1);
150 | }
151 |
152 | a:hover {
153 | color: var(--nc-lk-2);
154 | }
155 |
156 | abbr:hover {
157 | /* Set the '?' cursor while hovering an abbreviation */
158 | cursor: help;
159 | }
160 |
161 | blockquote {
162 | padding: 1.5rem;
163 | background: var(--nc-bg-2);
164 | border-left: 5px solid var(--nc-bg-3);
165 | }
166 |
167 | abbr {
168 | cursor: help;
169 | }
170 |
171 | blockquote *:last-child {
172 | padding-bottom: 0;
173 | margin-bottom: 0;
174 | }
175 |
176 | header {
177 | background: var(--nc-bg-2);
178 | border-bottom: 1px solid var(--nc-bg-3);
179 | padding: 2rem 1.5rem;
180 |
181 | /* This sets the right and left margins to cancel out the body's margins. It's width is still the same, but the background stretches across the page's width. */
182 |
183 | margin: -2rem calc(0px - (50vw - 50%)) 2rem;
184 |
185 | /* Shorthand for:
186 |
187 | margin-top: -2rem;
188 | margin-bottom: 2rem;
189 |
190 | margin-left: calc(0px - (50vw - 50%));
191 | margin-right: calc(0px - (50vw - 50%)); */
192 |
193 | padding-left: calc(50vw - 50%);
194 | padding-right: calc(50vw - 50%);
195 | }
196 |
197 | header h1,
198 | header h2,
199 | header h3 {
200 | padding-bottom: 0;
201 | border-bottom: 0;
202 | }
203 |
204 | header > *:first-child {
205 | margin-top: 0;
206 | padding-top: 0;
207 | }
208 |
209 | header > *:last-child {
210 | margin-bottom: 0;
211 | }
212 |
213 | a button,
214 | button,
215 | input[type="submit"],
216 | input[type="reset"],
217 | input[type="button"] {
218 | font-size: 1rem;
219 | display: inline-block;
220 | padding: 6px 12px;
221 | text-align: center;
222 | text-decoration: none;
223 | white-space: nowrap;
224 | background: var(--nc-lk-1);
225 | color: var(--nc-lk-tx);
226 | border: 0;
227 | border-radius: 4px;
228 | box-sizing: border-box;
229 | cursor: pointer;
230 | color: var(--nc-lk-tx);
231 | }
232 |
233 | a button[disabled],
234 | button[disabled],
235 | input[type="submit"][disabled],
236 | input[type="reset"][disabled],
237 | input[type="button"][disabled] {
238 | cursor: default;
239 | opacity: .5;
240 |
241 | /* Set the [X] cursor while hovering a disabled link */
242 | cursor: not-allowed;
243 | }
244 |
245 | .button:focus,
246 | .button:hover,
247 | button:focus,
248 | button:hover,
249 | input[type="submit"]:focus,
250 | input[type="submit"]:hover,
251 | input[type="reset"]:focus,
252 | input[type="reset"]:hover,
253 | input[type="button"]:focus,
254 | input[type="button"]:hover {
255 | background: var(--nc-lk-2);
256 | }
257 |
258 | code,
259 | pre,
260 | kbd,
261 | samp {
262 | /* Set the font family for monospaced elements */
263 | font-family: var(--nc-font-mono);
264 | }
265 |
266 | code,
267 | samp,
268 | kbd,
269 | pre {
270 | /* The main preformatted style. This is changed slightly across different cases. */
271 | background: var(--nc-bg-2);
272 | border: 1px solid var(--nc-bg-3);
273 | border-radius: 4px;
274 | padding: 3px 6px;
275 | font-size: 0.9rem;
276 | }
277 |
278 | kbd {
279 | /* Makes the kbd element look like a keyboard key */
280 | border-bottom: 3px solid var(--nc-bg-3);
281 | }
282 |
283 | pre {
284 | padding: 1rem 1.4rem;
285 | max-width: 100%;
286 | overflow: auto;
287 | }
288 |
289 | pre code {
290 | /* When is in a , reset it's formatting to blend in */
291 | background: inherit;
292 | font-size: inherit;
293 | color: inherit;
294 | border: 0;
295 | padding: 0;
296 | margin: 0;
297 | }
298 |
299 | code pre {
300 | /* When is in a , reset it's formatting to blend in */
301 | display: inline;
302 | background: inherit;
303 | font-size: inherit;
304 | color: inherit;
305 | border: 0;
306 | padding: 0;
307 | margin: 0;
308 | }
309 |
310 | details {
311 | /* Make the look more "clickable" */
312 | padding: .6rem 1rem;
313 | background: var(--nc-bg-2);
314 | border: 1px solid var(--nc-bg-3);
315 | border-radius: 4px;
316 | }
317 |
318 | summary {
319 | /* Makes the look more like a "clickable" link with the pointer cursor */
320 | cursor: pointer;
321 | font-weight: bold;
322 | }
323 |
324 | details[open] {
325 | /* Adjust the padding while open */
326 | padding-bottom: .75rem;
327 | }
328 |
329 | details[open] summary {
330 | /* Adjust the padding while open */
331 | margin-bottom: 6px;
332 | }
333 |
334 | details[open]>*:last-child {
335 | /* Resets the bottom margin of the last element in the while is opened. This prevents double margins/paddings. */
336 | margin-bottom: 0;
337 | }
338 |
339 | dt {
340 | font-weight: bold;
341 | }
342 |
343 | dd::before {
344 | /* Add an arrow to data table definitions */
345 | content: '→ ';
346 | }
347 |
348 | hr {
349 | /* Reset the border of the separator, then set a better line */
350 | border: 0;
351 | border-bottom: 1px solid var(--nc-bg-3);
352 | margin: 1rem auto;
353 | }
354 |
355 | fieldset {
356 | margin-top: 1rem;
357 | padding: 2rem;
358 | border: 1px solid var(--nc-bg-3);
359 | border-radius: 4px;
360 | }
361 |
362 | legend {
363 | padding: auto .5rem;
364 | }
365 |
366 | table {
367 | /* border-collapse sets the table's elements to share borders, rather than floating as separate "boxes". */
368 | border-collapse: collapse;
369 | width: 100%
370 | }
371 |
372 | td,
373 | th {
374 | border: 1px solid var(--nc-bg-3);
375 | text-align: left;
376 | padding: .5rem;
377 | }
378 |
379 | th {
380 | background: var(--nc-bg-2);
381 | }
382 |
383 | tr:nth-child(even) {
384 | /* Set every other cell slightly darker. Improves readability. */
385 | background: var(--nc-bg-2);
386 | }
387 |
388 | table caption {
389 | font-weight: bold;
390 | margin-bottom: .5rem;
391 | }
392 |
393 | textarea {
394 | /* Don't let the extend off the screen naturally or when dragged by the user */
395 | max-width: 100%;
396 | }
397 |
398 | ol,
399 | ul {
400 | /* Replace the browser default padding */
401 | padding-left: 2rem;
402 | }
403 |
404 | li {
405 | margin-top: .4rem;
406 | }
407 |
408 | ul ul,
409 | ol ul,
410 | ul ol,
411 | ol ol {
412 | margin-bottom: 0;
413 | }
414 |
415 | mark {
416 | padding: 3px 6px;
417 | background: var(--nc-ac-1);
418 | color: var(--nc-ac-tx);
419 | }
420 |
421 | textarea,
422 | select,
423 | input {
424 | padding: 6px 12px;
425 | margin-bottom: .5rem;
426 | background: var(--nc-bg-2);
427 | color: var(--nc-tx-2);
428 |
429 | /* Set a transparent border. It isn't visible on idle, but prevents the cell from growing in size when a darker border is set on focus. */
430 | border: 1px solid transparent;
431 | border-radius: 4px;
432 | box-shadow: none;
433 | box-sizing: border-box;
434 | }
435 |
436 | textarea:focus,
437 | select:focus,
438 | input[type]:focus {
439 | border-color: var(--nc-bg-3);
440 |
441 | /* Reset any browser default outlines */
442 | outline: 0;
443 | }
444 |
445 | img {
446 | max-width: 100%;
447 | }
448 |
--------------------------------------------------------------------------------
/legacy/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | new.css
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
25 | This site is made from vanilla HTML and the default new.css theme. View Source
26 |
27 |
28 | A classless CSS framework to write modern websites using only HTML. It weighs~4.5kb .
29 |
30 | View a demo here , or the quick-start guide here .
31 |
32 | Vercel 's impossibly fast CDN delivers new.css and the font Inter using xz/fonts , so there's virtually no bloat added to your pages.
33 |
34 | And of course, there's a dark mode. It automatically applies a light/dark theme based on your browser's preference.
35 |
36 | It supports custom color themes and fonts using CSS variables. For example, check out the terminal theme: newcss.net/theme/terminal/
37 |
38 | new.css is a project from xz .
39 |
40 |
41 |
42 | Table of Contents
43 |
44 |
63 |
64 |
65 |
66 | Usage
67 |
68 | Here's your configuration:
69 |
70 |
71 | Add <link rel="stylesheet" href="https://newcss.net/new.min.css"> to your <head>.
72 | Done.
73 |
74 |
75 |
76 | 💡 Use the code <link rel="stylesheet" href="https://newcss.net/lite.css"> for the lite version, which uses the system font stack rather than importing one.
77 |
78 |
79 |
80 |
81 | Use Cases
82 |
83 |
84 | A dead-simple blog
85 | Collecting your most used links
86 | Making a simple "about me" site
87 | Rendering markdown-generated HTML
88 |
89 |
90 |
91 |
92 | Details
93 |
94 | Here are the improvements new.css adds to your browser's basic HTML.
95 |
96 |
97 | Full Changes
98 |
99 |
100 | Global
101 |
102 | Slightly increase all text sizes
103 | Use a less harsh color scheme
104 | Use the Inter font, and if not possible, the system font
105 | Redefine all margins to more sensible defaults
106 |
107 |
108 | body
109 |
110 | Set a reasonable max width
111 | Centered the body element, keeping left-alignment
112 |
113 |
114 | abbr
115 |
116 | Question mark cursor on hover
117 |
118 |
119 | blockquote
120 |
121 | Improved margins
122 | Added background color
123 |
124 |
125 | button
126 |
127 | Appears uniformly across browsers
128 | Looks like a real button
129 |
130 |
131 | code
132 |
133 | Added background color
134 | Added outline stroke
135 |
136 |
137 | details
138 |
139 | Looks more button-like with background color and link cursor
140 | on hover
141 |
142 |
143 | h1–h6
144 |
145 | Uniform margins and padding
146 | Tweaked font size
147 |
148 |
149 | h1-h3
150 |
151 | Added thin bottom border line
152 |
153 |
154 | header
155 |
156 | Makes a screen-wide slightly darker header bar. Only use at the top of the <body>!
157 |
158 |
159 | hr
160 |
161 | Changed to single 1px line
162 |
163 |
164 | kbd
165 |
166 | Looks like a real keyboard key
167 |
168 |
169 | mark
170 |
171 | Added padding
172 | Color follows theme
173 |
174 |
175 | nav
176 |
177 | Added between-element margins
178 |
179 |
180 | samp
181 |
182 | Ambiguous element, merged with code
183 |
184 |
185 | table
186 |
187 | Basic styling to make cells more discernable
188 |
189 | Border stroke across all cells
190 | Alternating row background color
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 | Themes
201 |
202 | new.css uses an 10-color palette and can be easily customized. These are declared as CSS variables in the :root attribute.
203 |
204 |
205 | 💡 Both new.min.css and lite.css have support for custom themes. lite doesn't import the font Inter by default, so it is recommended if you are using a custom font.
206 |
207 |
208 | Customizing
209 |
210 | By loading a secondary style sheet after new.css in your HTML, you can override these variables. Here's the default theme:
211 |
212 |
213 | Default theme
214 |
215 |
216 | @import url('https://fonts.xz.style/serve/inter.css');
217 |
218 | :root {
219 | --nc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont,
220 | 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open
221 | Sans', 'Helvetica Neue', sans-serif, "Apple Color
222 | Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
223 | --nc-font-mono: 'Courier New', Courier, 'Ubuntu Mono',
224 | 'Liberation Mono', monospace;
225 | --nc-tx-1: #000000;
226 | --nc-tx-2: #1A1A1A;
227 | --nc-bg-1: #FFFFFF;
228 | --nc-bg-2: #F6F8FA;
229 | --nc-bg-3: #E5E7EB;
230 | --nc-lk-1: #0070F3;
231 | --nc-lk-2: #0366D6;
232 | --nc-lk-tx: #FFFFFF;
233 | --nc-ac-1: #79FFE1;
234 | --nc-ac-tx: #0C4047;
235 | }
236 |
237 |
238 | Legend
239 |
240 |
241 | --nc-font-sans: Font for all text besides code or
242 | preformatted
243 | --nc-font-mono: Font for <code>, <pre>,
244 | <kbd>, <samp>
245 | --nc-tx-1: Heading text color
246 | --nc-tx-2: Body text color
247 | --nc-bg-1: Base background color
248 | --nc-bg-2: Slightly darker background color
249 | --nc-bg-3: Even slightly darker background color
250 | --nc-lk-1: Action color for links and buttons
251 | --nc-lk-2: Link and buttons on mouse hover and active
252 | --nc-ac-1: Accent color for <mark> and
253 | text selection background
254 |
255 |
256 | Usage
257 |
258 |
259 | Create a stylesheet including some or all of the above variables in the :root. An example theme file is available here: boilerplate.css
260 |
261 | If you'd like to import custom fonts, put the @import tag before the :root element. Many open-source fonts are available on xz/fonts .
262 |
263 | Reference your new stylesheet after new.css in your <head>. Here's an example <head>:
264 |
265 | <head>
266 | <meta charset="UTF-8">
267 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
268 | <title>Document</title>
269 | <link rel="stylesheet" href="https://newcss.net/lite.css">
270 | <link rel="stylesheet" href="https://example.com/MY-CUSTOM-THEME.css">
271 | </head>
272 |
273 |
274 |
275 |
276 |
277 | Pre-Made Themes
278 |
279 | Here are two extra themes with CDN links. Feel free to use or edit them!
280 |
281 | Night
282 |
283 | Night theme is enabled by default if your browser is set to prefer dark themes. Using the theme link below makes it use night theme regardless.
284 |
285 | <link rel="stylesheet" href="https://newcss.net/theme/night.css">
286 |
287 | Preview at newcss.net/theme/night/
288 |
289 |
290 |
291 | Terminal
292 |
293 | <link rel="stylesheet" href="https://newcss.net/theme/terminal.css">
294 |
295 | Preview at newcss.net/theme/terminal/
296 |
297 |
298 |
299 |
300 |
301 | Sponsors
302 |
303 |
307 |
308 | Special Thanks
309 |
310 |
311 | sakura by oxal for introducing me to classless CSS
312 | mydarkstar for priceless advice
313 | Vercel for sponsoring xz and for their amazing color palettes
314 |
315 |
316 |
317 |
318 |
319 |
320 | We collect totally anonymous basic analytics using Simple Analytics. View live analytics at simpleanalytics.com/newcss.net .
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
--------------------------------------------------------------------------------
/all.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | All HTML Elements
6 |
28 |
29 |
30 |
31 |
32 |
36 |
37 |
41 |
42 |
43 |
address
44 |
45 | Infinite Loop,
46 | Cupertino, CA
47 | 95014, USA
48 |
49 |
50 |
51 |
52 |
area, map
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
article
66 |
67 |
70 |
71 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.
72 |
73 |
74 |
75 | Posted on Apr 29 in Code
76 |
77 |
78 |
79 |
80 |
81 |
82 |
aside
83 |
84 | About the author
85 | Lorem ipsum dolor sit, amet consectetur adipisicing elit.
86 |
87 |
88 |
89 |
93 |
94 |
95 | b
96 | Lorem ipsum dolor sit amet
97 |
98 |
99 |
100 | bdi
101 | The word مرحبا means "Hello" in Arabic.
102 |
103 |
104 |
105 | bdo
106 | The word Hello is "Hello" spelled backwards.
107 |
108 |
109 |
110 |
blockquote
111 |
112 | If you think privacy is unimportant for you because you have nothing to hide, you might as well say free speech is unimportant for you because you have nothing useful to say. – Edward Snowden
113 |
114 |
115 |
116 |
117 | br
118 | Lorem ipsum dolor sit amet
119 |
120 |
121 |
122 | button
123 | Button
124 |
125 |
126 |
127 | cite
128 | Please visit example.com .
129 |
130 |
131 |
132 | code
133 | Lorem ipsum dolor sit amet
134 |
135 |
136 |
137 | datalist
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | Demo
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | del, ins
157 | To write abbreviations, use the acronym abbr HTML element.
158 |
159 |
160 |
161 |
details, summary
162 |
163 | Read more
164 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.
165 |
166 |
167 |
168 |
169 | dfn
170 | The World Wide Web is the part of the Internet that uses the HTTP protocol.
171 |
172 |
173 |
177 |
178 |
179 |
dl, dt, dd
180 |
181 | Web
182 | The part of the Internet that contains websites and web pages
183 | HTML
184 | A markup language for creating web pages
185 | CSS
186 | A technology to make HTML look better
187 |
188 |
189 |
190 |
191 | em
192 | Lorem ipsum dolor sit amet.
193 |
194 |
195 |
196 | fieldset, legend, input, button
197 |
198 | Subscribe to the Newsletter
199 |
200 | Ok
201 |
202 |
203 |
204 |
205 |
figure, figcaption
206 |
207 |
208 | Photo by Daniel Hehn on Unsplash
209 |
210 |
211 |
212 |
273 |
274 |
275 | h1
276 |
Lorem ipsum dolor sit amet
277 |
278 |
279 |
280 | h2
281 |
Lorem ipsum dolor sit amet
282 |
283 |
284 |
285 | h3
286 |
Lorem ipsum dolor sit amet
287 |
288 |
289 |
290 | h4
291 |
Lorem ipsum dolor sit amet
292 |
293 |
294 |
295 | h5
296 |
Lorem ipsum dolor sit amet
297 |
298 |
299 |
300 | h6
301 |
Lorem ipsum dolor sit amet
302 |
303 |
304 |
305 |
header
306 |
Note: the header tag should only be used at the top of the document-that's why it looks messed up here.
307 |
308 |
316 |
317 |
318 |
319 | hr
320 |
321 |
322 |
323 |
324 | i
325 | Lorem ipsum dolor sit amet
326 |
327 |
328 |
329 | iframe
330 |
333 |
334 |
335 |
336 |
img
337 |
338 |
339 |
340 |
341 | kbd
342 | To save, press Ctrl + S .
343 |
344 |
345 |
346 |
main
347 |
348 | My blog post
349 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.
350 |
351 |
352 |
353 |
354 | mark
355 | Lorem ipsum dolor sit amet.
356 |
357 |
358 |
359 | meter
360 | Progress
361 |
362 |
363 |
371 |
372 |
373 |
ol
374 |
375 | Step one
376 | Step two
377 | ????
378 | PROFIT!!!
379 |
380 |
381 |
382 |
383 | optgroup
384 |
385 |
386 | December
387 | January
388 | February
389 | March
390 |
391 |
392 | April
393 | May
394 | June
395 | July
396 | August
397 | September
398 | October
399 | November
400 |
401 |
402 |
403 |
404 |
405 | option
406 |
407 | Argentina
408 | Bolivia
409 | Brazil
410 | Chile
411 | Colombia
412 | Ecuador
413 | Guyana
414 | Paraguay
415 | Peru
416 | Suriname
417 | Uruguay
418 | Venezuela
419 |
420 |
421 |
422 |
423 | output
424 |
425 |
426 | +
427 |
428 | =
429 | 6
430 |
431 |
432 |
433 |
434 |
p
435 |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum non consectetur pariatur velit cum mollitia vero provident tempora nemo, similique blanditiis facere alias quae ut sit voluptas! Repudiandae, eius amet?
436 |
437 |
438 |
439 |
pre
440 |
441 | <!DOCTYPE html>
442 | <html>
443 | <head>
444 | <title>Hello World</title>
445 | </head>
446 | <body>
447 | <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
448 | </body>
449 | </html>
450 |
451 |
452 |
453 |
progress
454 |
Progress
455 |
456 |
457 |
458 | q
459 | He looks around and says I'll be back .
460 |
461 |
462 |
463 | ruby
464 |
465 | 漢 ( Kan )
466 | 字 ( ji )
467 |
468 |
469 |
470 |
471 | s
472 | Lorem ipsum color dolor sit amet.
473 |
474 |
475 |
476 | samp
477 | The output read Unknown command .
478 |
479 |
480 |
481 |
section
482 |
483 | Section title
484 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.
485 |
486 |
487 |
488 |
489 | small
490 | Lorem ipsum dolor sit amet.
491 |
492 |
493 |
494 | span
495 | Lorem ipsum dolor sit amet.
496 |
497 |
498 |
499 | strong
500 | Lorem ipsum dolor sit amet.
501 |
502 |
503 |
504 | sub
505 | Lorem ipsum dolor[2] sit amet.
506 |
507 |
508 |
509 | sup
510 | 212 = 4096
511 |
512 |
513 |
514 |
table
515 |
516 | Ho-kago Tea Time
517 |
518 |
519 | Name
520 | Instrument
521 |
522 |
523 |
524 |
525 | Name
526 | Instrument
527 |
528 |
529 |
530 |
531 | Yui Hirasawa
532 | Lead Guitar
533 |
534 |
535 | Mio Akiyama
536 | Bass
537 |
538 |
539 | Ritsu Tainaka
540 | Drums
541 |
542 |
543 | Tsumugi Kotobuki
544 | Keyboard
545 |
546 |
547 | Azusa Nakano
548 | Rhythm Guitar
549 |
550 |
551 |
552 |
553 |
554 |
555 | textarea
556 |
557 |
558 |
559 |
560 | time
561 | Unix time began Jan. 1, 1970 .
562 |
563 |
564 |
565 | u
566 | Lorem ipsum dolor sit amet.
567 |
568 |
569 |
570 |
ul
571 |
My shopping list:
572 |
573 | Milk
574 | Bread
575 | Chocolate
576 | Flour
577 |
578 |
579 |
580 |
581 | var
582 | x + 26 = 68x = 42
583 |
584 |
585 |
586 | video
587 |
588 |
589 |
590 |
591 |
--------------------------------------------------------------------------------