From e75066532f798f800a17007e468308d3e01af904 Mon Sep 17 00:00:00 2001 From: asvvvad <36175183+asvvvad@users.noreply.github.com> Date: Wed, 20 May 2020 00:33:22 +0100 Subject: [PATCH] Initial commit --- color.css | 274 +++++++++++++++++++++++++++++ color.min.css | 1 + index.html | 467 ++++++++++++++++++++++++++++++++++++++++++++++++++ mono.css | 177 +++++++++++++++++++ mono.min.css | 1 + 5 files changed, 920 insertions(+) create mode 100644 color.css create mode 100644 color.min.css create mode 100644 index.html create mode 100644 mono.css create mode 100644 mono.min.css diff --git a/color.css b/color.css new file mode 100644 index 0000000..5eae491 --- /dev/null +++ b/color.css @@ -0,0 +1,274 @@ +:root { + --gray: #CCC; + --accent: #fa0; + --warning: #ffd600; + --error: #d50000; + --success: #00c853; + --info: #2962ff; +} + +.card { + padding: 1em; + margin-top: 1rem; + background: var(--def); + color: var(--fg) +} + + +/* Grid */ + +@media(min-width:45em) { + .col { + display: table-cell; + } + .\31 { + width: 5%; + } + .\33 { + width: 22%; + } + .\34 { + width: 30%; + } + .\35 { + width: 40%; + } + .\32 { + width: 15%; + } + .row { + display: table; + border-spacing: 1em 0; + } +} + +.w-100, +.row { + width: 100%; +} + +.w-50 { + width: 50% +} + + +/*Colors*/ + +.white { + color: #FFF; +} + +.bg-white { + background: #FFF; +} + +.b-white { + border: #FFF; +} + +.gray { + color: var(--gray); +} + +.bg-gray { + background: var(--gray); +} + +.b-gray { + border: var(--gray); +} + +.black { + color: #000; +} + +.bg-black { + background: #000; +} + +.b-black { + border: #000; +} + +.b-primary { + border: var(--p); +} + +.b-default { + border: var(--b); +} + +.accent { + color: var(--accent); +} + +.bg-accent { + background: var(--accent); +} + +.b-accent { + border: var(--accent); +} + +.warning { + color: var(--warning); +} + +.bg-warning { + background: var(--warning); +} + +.b-warning { + border: var(--warning); +} + +.error { + color: var(--error); +} + +.bg-error { + background: var(--error); +} + +.b-error { + border: var(--error); +} + +.success { + color: var(--success); +} + +.bg-success { + background: var(--success); +} + +.b-success { + border: var(--success); +} + +.info { + color: var(--info); +} + +.bg-info { + background: var(--info); +} + +.b-info { + border: var(--info); +} + +.inline { + display: inline-block; + margin: .5rem 0 +} + +.tacenter { + text-align: center +} + +.taleft { + text-align: left +} + +.taright { + text-align: right +} + +.pill { + border-radius: 2rem +} + +.rounded { + border-radius: 1rem +} + +.mega { + font-size: 4rem +} + +.large { + font-size: 2rem +} + +.small { + font-size: 1.4rem +} + +.nano { + font-size: 1.2rem +} + +.normal { + font-size: 1.8rem; +} + +.vh-100 { + height: 100vh; + font-size: 1.8rem +} + +.vc { + position: relative; + top: 40%; + transform: perspective(.1rem) translateY(-45%) +} + +.vc h1 { + margin: 0 +} + +.p { + padding: 1rem +} + +.p04 { + padding: .4rem +} + +.ph { + padding-left: 1rem; + padding-right: 1rem +} + +.ph04 { + padding-left: .4rem; + padding-right: .4rem +} + +.pv { + padding: 1rem; + padding-bottom: 1rem +} + +.pv04 { + padding-top: .4rem; + padding-bottom: .4rem +} + +.m0 { + margin: 0 +} + +.m { + margin: 1rem +} + +.mh { + margin-left: 1rem; + margin-right: 1rem +} + +.mv { + margin-top: 1rem; + margin-bottom: 1rem +} + +.border { + border-style: solid; + border-width: 0.1rem +} + +.o50 { + opacity: 50% +} \ No newline at end of file diff --git a/color.min.css b/color.min.css new file mode 100644 index 0000000..10c1118 --- /dev/null +++ b/color.min.css @@ -0,0 +1 @@ +:root{--gray:#CCC;--accent:#fa0;--warning:#ffd600;--error:#d50000;--success:#00c853;--info:#2962ff}.card{padding:1em;margin-top:1rem;background:var(--def);color:var(--fg)}@media(min-width:45em){.col{display:table-cell}.\31{width:5%}.\33{width:22%}.\34{width:30%}.\35{width:40%}.\32{width:15%}.row{display:table;border-spacing:1em 0}}.w-100,.row{width:100%}.w-50{width:50%}.white{color:#FFF}.bg-white{background:#FFF}.b-white{border:#FFF}.gray{color:var(--gray)}.bg-gray{background:var(--gray)}.b-gray{border:var(--gray)}.black{color:#000}.bg-black{background:#000}.b-black{border:#000}.b-primary{border:var(--p)}.b-default{border:var(--b)}.accent{color:var(--accent)}.bg-accent{background:var(--accent)}.b-accent{border:var(--accent)}.warning{color:var(--warning)}.bg-warning{background:var(--warning)}.b-warning{border:var(--warning)}.error{color:var(--error)}.bg-error{background:var(--error)}.b-error{border:var(--error)}.success{color:var(--success)}.bg-success{background:var(--success)}.b-success{border:var(--success)}.info{color:var(--info)}.bg-info{background:var(--info)}.b-info{border:var(--info)}.inline{display:inline-block;margin:.5rem 0}.tacenter{text-align:center}.taleft{text-align:left}.taright{text-align:right}.pill{border-radius:2rem}.rounded{border-radius:1rem}.mega{font-size:4rem}.large{font-size:2rem}.small{font-size:1.4rem}.nano{font-size:1.2rem}.normal{font-size:1.8rem}.vh-100{height:100vh;font-size:1.8rem}.vc{position:relative;top:40%;transform:perspective(.1rem)translateY(-45%)}.vc h1{margin:0}.p{padding:1rem}.p04{padding:.4rem}.ph{padding-left:1rem;padding-right:1rem}.ph04{padding-left:.4rem;padding-right:.4rem}.pv{padding:1rem;padding-bottom:1rem}.pv04{padding-top:.4rem;padding-bottom:.4rem}.m0{margin:0}.m{margin:1rem}.mh{margin-left:1rem;margin-right:1rem}.mv{margin-top:1rem;margin-bottom:1rem}.border{border-style:solid;border-width:.1rem}.o50{opacity:50%} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..8a3690a --- /dev/null +++ b/index.html @@ -0,0 +1,467 @@ + + + + + + + mono/color + + + + + + + + +
+
+

mono/color

+

Small, beautiful, dual-themed CSS framework

+ Discover + Download +
+
+
+
+

mono/color

+

mono/color is a small, simple and beautiful CSS framework built with responsivity, readability, and a dual-theme in mind.

+

It's perfect for a blog or a documentation site and can be used for anything else aswell.
It's very responsive and looks neat on any resolution.
Based on Starveling and lit, + providing only necessary elements while still looking great and being customizable.

+
+
+ The theme changes depending on the viewer's system theme by using CSS' prefers-color-scheme +
+

mono/color is split into two:

+
+
+

mono <1.7kb

+

Includes dark & light theme with no colors. Only default html elements with a basic button. More. +

+
+
+

color =1.9kb

+

Adds grids, cards, colors, utilities and badges

+
+
+
+

mono

+
+

Container

+

Containers add margin to the sides of your content and center it. This website has one main container and content wrapper that wraps everything.

+
+
+

Header

+ +
+
+
+

+ This is the content which is in the content wrapper of the container. It's meant for main content like an article. It's more indented than the container. On smaller screens, the container's margin will be removed so the horizontal line will touch the + sides. +

+
+
+
+
<div class="container">
+    <header>
+        <h1>Header</h1>
+        <nav class="">
+            <a href="#">Home</a>
+            <a href="#">Docs</a>
+            <a href="#">About</a>
+        </nav>
+    </header>
+    <hr>
+    <div class="content">
+        <p>
+            This is the content which is in the content wrapper of the container. It's meant for main content like an
+            article.
+            It's more indented than the container. On smaller screens, the container's margin will be removed so the
+            horizontal line will touch the sides.
+        </p>
+        <hr>
+    </div>
+</div>
+

Typography

+

Heading 1

+

Heading 2

+

Heading 3

+

Heading 4

+
Heading 5
+
Heading 6
+

This is a paragraph. The font family is Courier New/monospace. For the headings 1 to 3 it's Serif. + Some bold text. Italics also looks nice. You can underline things you feel are important. has styles that override the default heading styles, including margin.

+
<h1>Heading</h1>
+<h2>Heading</h2>
+<h3>Heading</h3>
+<h2>Heading</h2>
+<h5>Heading</h5>
+<h6>Heading</h6>
+<p>This is a paragraph. The font family is Courier New/monospace.
+<b>Some bold text.</b> <i>Italics also looks nice.</i>
+You can <u>underline</u> things you feel are important.
+mono has styles that override the default heading styles, including margin.</p>
+

Code Block

+

inline code; inline samp; and kbd: CTRL+C

+

Code blocks are code tags wrapped with pre tags. They automatically overflow to become scrollable on smaller displays

+
<pre><code>
+<h2>Code Block Example</h2>
+</code></pre>
+

Samp blocks are similar but intended for output moslty so mono/color sets the line-height tighter to show it better (for example, ascii art)

+
                /\  (hi i'm v dude)
+   __  ____  __/\/\__  __   ___
+  /  \/ __ \ \ _  _ / /  \ |   \
+ / /\ \__ \ \/\'  '/\/ /\ \|    | 
+/_/  \____/\__/\__/\__/  \_____/
+

Blockquote

+
You're not a fucking moron if you use default browser styles you can do what ever the fuck you want who cares +
— Eleanor Roosevelt +
This is a nested quote +
— Me +
This is a nested quote inside a nested quote +
— Also me
+
+
+
+

Lists

+

Lists are default HTML lists. I tried a few things but figured the defaults are all that's needed (imo). +

+ +

Tables

+

Tables looks nice too:

+ + + + + + + + + + + + + + + + + + + + + +
NameUsernameemailsecondary email
Lorem Ipsumlorememail@example.comemail@example.org
Lorem Ipsumlorememail@example.comemail@example.org
+

Forms

+

Just like the code blocks the form is also scrollable when the elements take too much horizontal space +
There is also an option to use grids and the card class if you prefer.
color have w-100 and w-50 classes to set the inputs to full and half width respectively. +
To get the connected inputs look use the inline class on the inputs just as in here.

+

This is a regular HTML form:

+
+
+
+ +
+

Buttons

+

Buttons are created with either a button or an anchor that have btn class.

+
+ Link button + +

Primary buttons are made with the primary class

+ +
+

Horizontal Rules

+

Horizontal Rules are useful for dividing up content. Their color is the same as same default border color which change with theme.

+
+

Extra

+

Since mono support light and dark themes it also provide these two helper classes:

+

primary class can be used on anything from buttons, inputs, divs, code ect. It's meant to be a reverse color.

+
primary
+

default class can be used on anything from buttons, inputs, divs, code ect. It's meant to be the default color.

+
default
+

Blockquotes with background can be made by adding primary or default or other + background colors in color

+
This is a blockquote with a background

+
This is a blockquote with a background
+

color

+
+

Grid

+

Grids are defined on a 12 column scale. Each col will take up equal width if no width number is specified. They automatically collapse on mobile to take up the full viewport. Go ahead, try it!

+
+
+
1 col
+
11 col
+
+
+
2 col
+
10 col
+
+
+
3 col
+
9 col
+
+
+
4 col
+
8 col
+
+
+
5 col
+
7 col
+
+
+
6 col
+
6 col
+
+
+

Utilities

+

Size classes:

+ mega + large + normal + small + nano +

Spacing and alignment:

+
tacenter
+
taleft
+
taright
+

The above classes set the alignment of text within an element

+
.m0
+ m0 Removes margins on all sides +
.m
+ m Adds 1rem(10px) margin on all sides +
.mh.mh
+ mh Adds 1rem margin on the left and right sides
+
.mv
+ mv Adds 1rem margin on the top and bottom sides
+
.p
+ p Adds 1rem padding on all sides +
.p04
+ p04 Adds .04rem padding on all sides
+
.ph
+ p Adds 1rem padding on the left and right sides
+
.ph04
+ p04 Adds .04rem padding on the left and right sides
+
.pv
+ p Adds 1rem padding on the top and bottom sides
+
.pv04
+ p04 Adds .04rem padding on the top and bottom sides
+
+ inline makes elements inline (stick to each other) by removing margins on both side +
w-100
+
w-50
+
w-50

+ w-100 and w-50 sets the width to 100% and 50% respecitively +
vh-100 takes the full width of it's container and the full height of it's screen. To use for full-page landing place it outside any + container div. +
vc class centers a div vertically in the full-page div
+
+
+

Colors

+

Text Colors

+ accent + info + success + warning + error + black + white + gray +

Background Colors

+
bg-accent
+
bg-info
+
bg-success
+
bg-warning
+
bg-error
+
bg-black
+
bg-white
+
bg-gray
+

Border Colors

+

Since mono/color is borderless by default a add a border use border and a b-color like in these:

+
border b-accent
+
border b-info
+
border b-success
+
border b-warning
+
border b-error
+
border b-black
+
border b-white
+
border b-gray
+
border b-primary
+
border b-default
+
Horizontal Rules
+

border colors can be used for horizontal rules as well

+
+
+
+
+
+
+
+
+
+

Colorful Buttons

+

These are made using the background colors classes above. The ghost ones for example uses accent instead of bg-accent.
A primary button can have be a ghost button as well just + by adding the color tag

+ + + + + +

Ghost Buttons

+ + + + + +

Ghost Primary Buttons

+ + + + + +

Rounded Buttons

+ + + + + +
+ + + + + +
+ + + + + +

Pill Buttons

+ + + + + +
+ + + + + +
+ + + + + +

Cards

+

Cards can be used to display info in a concise and consistent manner.

+
+

Simple Card

+

Here is some text that generally describes the card, or something about it.

+ + +
+

Cards are usually nested within grids to create powerful display systems, like below.

+
+
+

Card Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

+ +
+
+

Card Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

+ +
+
+

Card Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

+ +
+
+ +
+

Alerts

+

These are easily created using a div that have a text & background color class, + small class to set the text size right (default is bigger and meant for increasing readability on content) and an extra rounded class if you wish.

+
+ Oh no!
This is an example of an error alert +

+
+ Success!
This is an example of a success alert +
+
<div class="bg-error white p rounded small">
+    <span class="large">Oh no!</span><br>This is an example of an error alert
+</div>
+
+ This is an example of a warning alert +
+
<div class="bg-warning primary p rounded small black">
+    This is an example of a warning alert
+</div>
+

Using blockquote

+

As mentioned above in mono, blockquotes can be used along with other background colors.

+
This is an example of an info alert
+
<blockquote class="bg-info border b-primary white">This is an example of an info alert</blockquote>
+
+
+

Badges

+

Another small and helpful elements are badges.
As with alerts, they are made by combining a couple classes:

+

Heading Badge New!

+
<h4>Heading Badge <span class="bg-warning white p04 rounded small"> New!</span></h4>
+ +
<button class="pill btn bg-info white">Button Badge <span class="bg-white info p04 rounded small"><b>500</b></span></button>
+
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/mono.css b/mono.css new file mode 100644 index 0000000..f0e9f5d --- /dev/null +++ b/mono.css @@ -0,0 +1,177 @@ +* { + box-sizing: border-box; +} + +@media (prefers-color-scheme: light) { + :root { + font-size: 62.5%; + --fg: #aaa; + --h: #efefef; + --bg: #000; + --b: #333; + --p: #eee; + --def: #121212; + } +} + +@media (prefers-color-scheme: dark) { + :root { + font-size: 62.5%; + --fg: #555; + --h: #444; + --bg: #fefefe; + --b: #ccc; + --p: #000; + --def: #eee; + } +} + +.container { + position: relative; + width: 100%; + max-width: 70.0rem; + margin: 0 auto; + font-size: 1.8rem +} + +.content { + width: calc(100% - 5rem); + margin: auto; + overflow: hidden +} + +@media (min-width: 420px) { + .container { + width: 90%; + padding: 0 + } +} + +body { + margin: 0; + line-height: 1.6; + font-family: monospace; + color: var(--fg); + background-color: var(--bg) +} + +h1, +h2, +h3 { + line-height: 1.2; + font-family: sans-serif; + color: var(--h) +} + +a { + color: var(--p) +} + +a:hover, +.btn:hover, +input[type=submit]:hover { + opacity: .6; + cursor: pointer +} + +code, +samp, +kbd { + padding: .5rem; + font-style: italic; + font-size: 80%; + color: var(--fg); + background-color: var(--def); +} + +input, +textarea, +select, +pre>*, +.btn { + border: 0 solid; + white-space: nowrap; + font-style: normal; + font-size: 83%; + font-family: monospace; + display: inline; + padding: 1rem; + margin: .5rem; + max-width: 100%; + color: var(--fg); + background-color: var(--def); + text-decoration: none; +} + +textarea { + height: 15rem; + width: 70%; + white-space: pre-wrap +} + +select { + padding: 0.9rem +} + +pre>*, +table { + display: block; + white-space: pre +} + +pre>samp { + line-height: 1.1; +} + +textarea, +pre>*, +table { + margin: .5rem 0 +} + +pre>*, +table, +form { + overflow: auto +} + +table { + white-space: normal; + padding: 0; + font-size: 90% +} + +blockquote { + white-space: normal; + padding: 1rem; + margin: 0; + border-left: .4rem solid var(--b); +} + +form { + white-space: nowrap; + display: block +} + +th, +td { + padding: 1rem 1.1rem; + text-align: justify; + border-bottom: 0.1rem solid var(--b) +} + +.primary { + background-color: var(--p); + color: var(--def) +} + +.default { + background-color: var(--def); + color: var(--fg); +} + +hr { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + border: 0.1rem solid var(--b) +} \ No newline at end of file diff --git a/mono.min.css b/mono.min.css new file mode 100644 index 0000000..5d444a4 --- /dev/null +++ b/mono.min.css @@ -0,0 +1 @@ +*{box-sizing:border-box}@media(prefers-color-scheme:light){:root{font-size:62.5%;--fg:#aaa;--h:#efefef;--bg:#000;--b:#333;--p:#eee;--def:#121212}}@media(prefers-color-scheme:dark){:root{font-size:62.5%;--fg:#555;--h:#444;--bg:#fefefe;--b:#ccc;--p:#000;--def:#eee}}.container{position:relative;width:100%;max-width:7.0;margin:0 auto;font-size:1.8rem}.content{width:calc(100% - 5rem);margin:auto;overflow:hidden}@media(min-width:420px){.container{width:90%;padding:0}}body{margin:0;line-height:1.6;font-family:monospace;color:var(--fg);background-color:var(--bg)}h1,h2,h3{line-height:1.2;font-family:sans-serif;color:var(--h)}a{color:var(--p)}a:hover,.btn:hover,input[type=submit]:hover{opacity:.6;cursor:pointer}code,samp,kbd{padding:.5rem;font-style:italic;font-size:80%;color:var(--fg);background-color:var(--def)}input,textarea,select,pre>*,.btn{border:0 solid;white-space:nowrap;font-style:normal;font-size:83%;font-family:monospace;display:inline;padding:1rem;margin:.5rem;max-width:100%;color:var(--fg);background-color:var(--def);text-decoration:none}textarea{height:15rem;width:70%;white-space:pre-wrap}select{padding:.9rem}pre>*,table{display:block;white-space:pre}pre>samp{line-height:1.1}textarea,pre>*,table{margin:.5rem 0}pre>*,table,form{overflow:auto}table{white-space:normal;padding:0;font-size:90%}blockquote{white-space:normal;padding:1rem;margin:0;border-left:.4rem solid var(--b)}form{white-space:nowrap;display:block}th,td{padding:1rem 1.1rem;text-align:justify;border-bottom:.1rem solid var(--b)}.primary{background-color:var(--p);color:var(--def)}.default{background-color:var(--def);color:var(--fg)}hr{margin-top:1.5rem;margin-bottom:1.5rem;border:.1rem solid var(--b)} \ No newline at end of file