cleanup new buttons

This commit is contained in:
Yann Esposito (Yogsototh) 2022-09-25 14:08:15 +02:00
parent e84e639183
commit d94faa8543
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
17 changed files with 119 additions and 91 deletions

2
blunt.min.css vendored
View file

@ -1 +1 @@
/* Copyright 2022 Yann Esposito; MIT licensed */html{font-size:12px}body,textarea,input,select{background:0;border-radius:0;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:1rem;margin:0}*{box-sizing:border-box}.btn,h1,h2,h3,h4,h5,h6{font-size:1rem}h1{border-bottom:double 5px}h2{border-bottom:solid 2px}h3{border-bottom:dashed 1px}h4{border-bottom:dotted 1px}.addon,.btn-sm,.nav,textarea,input,select{outline:0;font-size:10px}.btn,.nav a{text-decoration:none}.container{margin:0 20px;width:auto}.block{padding:6px;margin:6px}.card{padding:5px;margin:5px;border:solid 2px}.hero{background:#ddd;padding:20px;border-radius:10px;margin-top:1em}@media(min-width:1310px){.container{margin:auto;width:1270px}}pre{background:#eee;padding:10px}code{background:rgba(0,0,0,.1);border:solid 1px rgba(0,0,0,.1);padding:1px}.btn{background:#999;border:solid 2px #000;color:#fff;font-weight:700;cursor:pointer;display:inline-block;margin:2px 0;padding:12px 30px 14px;box-shadow:4px 4px rgba(0,0,0,.75)}.btn:hover{background:#888}.btn:active,.btn:focus{background:#777;box-shadow:1px 1px #000;position:relative;top:3px;left:3px}.btn-a{background:#0ae}.btn-a:hover{background:#09d}.btn-a:active,.btn-a:focus{background:#08b}.btn-b{background:#494}.btn-b:hover{background:#383}.btn-b:active,.btn-b:focus{background:#272}.btn-c{background:#d33}.btn-c:hover{background:#c22}.btn-c:active,.btn-c:focus{background:#b22}.btn-sm{padding:10px 14px 11px}.row{display:flex;justify-content:space-evenly}.col{float:left}.table,.c12{width:100%}.c11{width:91.66%}.c10{width:83.33%}.c9{width:75%}.c8{width:66.66%}.c7{width:58.33%}.c6{width:50%}.c5{width:41.66%}.c4{width:33.33%}.c3{width:25%}.c2{width:16.66%}.c1{width:8.33%}@media(max-width:870px){.row .col{width:100%}}h1,h2,h3,h4,h5,h6{display:table;padding:.25rem}h1{border:double 5px #000;padding:1rem}h2{border-bottom:double 5px #000}h3{border-bottom:solid 2px #000}h4{border-bottom:solid 2px #ccc}h5{border-bottom:solid 1px #ccc}h6{border-bottom:dashed 1px #ccc}.big{font-size:2em}.huge{font-size:3em}.ico{font:20px Arial Unicode MS,Lucida Sans Unicode;line-height:10px;vertical-align:top}label>*{display:inline}form>*{display:block;margin-bottom:10px}textarea,input,select{border:2px solid #ccc;padding:8px}textarea:focus,input:focus,select:focus{border-color:#5ab}textarea,input[type=text]{-webkit-appearance:none;width:13em;outline:0;border:2px solid #888}.addon{padding:8px 12px;border-width:2px;border-color:#888;border-style:solid none solid solid}.nav,.nav .current,.nav a:hover{background:#000;color:#fff}.nav{height:50px;padding:11px 0 15px}.nav a{color:#aaa;padding-right:1em;position:relative;top:-1px}.nav .pagename{font-size:22px;top:1px}.btn.btn-close{background:#000;float:right;font-size:25px;margin:-54px 7px;display:none}@media(max-width:500px){.btn.btn-close{display:block}.nav{overflow:hidden}.pagename{margin-top:-11px}.nav:active,.nav:focus{height:auto}.nav div:before{background:#000;border-bottom:10px double;border-top:3px solid;content:'';float:right;height:4px;position:relative;right:3px;top:14px;width:20px}.nav a{display:block;padding:.5em 0;width:50%}}.table th,.table td{padding:.5em;text-align:left}.table tbody>:nth-child(2n-1){background:#ddd}.msg{background:#def;border-left:5px solid #59d;padding:1.5em}.info{background:#def;border-color:#59d}.ok{background:#c8fac8;border-color:#73cf73}.warn{background:#ffd9b4;border-color:#fa6}.err{background:#fed3d3;border-color:#e75d5d}.black,.black *{background:#000;border-color:#444;color:#fff}.fatal,.fatal *{background:#bf2aee;border-color:#9311bb;color:#fff}
/* Copyright 2022 Yann Esposito; MIT licensed */html{font-size:12px}body,textarea,input,select{background:0;border-radius:0;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:1rem;margin:0}*{box-sizing:border-box}.addon,.btn-sm,.nav,textarea,input,select{outline:0;font-size:10px}.btn,.nav a{text-decoration:none}.container{margin:0 20px;width:auto}.block{padding:6px;margin:6px}.card{padding:5px;margin:5px;border:solid 2px}.hero{background:#ddd;padding:2rem;border:double 1rem;margin-top:1rem}.hero *{font-size:2rem;margin:2rem auto;text-align:center}@media(min-width:1310px){.container{margin:auto;width:1270px}}pre{background:#eee;padding:10px}code{background:rgba(0,0,0,.1);border:solid 1px rgba(0,0,0,.1);padding:1px}.big{font-size:2em}.huge{font-size:3em}.tb{font-weight:700;cursor:pointer;padding:2px}.tb:before,.tb:after{opacity:.3}.tb:before{content:"〈"}.tb:after{content:"〉"}.tb:hover:before,.tb:hover:after{opacity:1}.tb:hover:before{content:"《"}.tb:hover:after{content:"》"}.tb:active:before{content:"【"}.tb:active:after{content:"】"}.tb-a{color:#08b}.tb-b{color:#272}.tb-c{color:#c22}.btn{background:#999;border:solid 2px #000;color:#fff;font-weight:700;cursor:pointer;display:inline-block;margin:2px 0;padding:1rem 2rem;box-shadow:4px 4px rgba(0,0,0,.75)}.btn:hover{background:#888}.btn:active,.btn:focus{background:#777;box-shadow:1px 1px #000;position:relative;top:3px;left:3px}.btn-a{background:#0ae}.btn-a:hover{background:#09d}.btn-a:active,.btn-a:focus{background:#08b}.btn-b{background:#494}.btn-b:hover{background:#383}.btn-b:active,.btn-b:focus{background:#272}.btn-c{background:#d33}.btn-c:hover{background:#c22}.btn-c:active,.btn-c:focus{background:#b22}.btn-sm{padding:.5rem 1rem}.btn-std{width:12rem}.row{display:flex;justify-content:space-evenly}.col{float:left}.table,.c12{width:100%}.c11{width:91.66%}.c10{width:83.33%}.c9{width:75%}.c8{width:66.66%}.c7{width:58.33%}.c6{width:50%}.c5{width:41.66%}.c4{width:33.33%}.c3{width:25%}.c2{width:16.66%}.c1{width:8.33%}@media(max-width:870px){.row .col{width:100%}}h1,h2,h3,h4,h5,h6{display:table;padding:.25rem;font-size:1rem}h1{font-size:2rem}h1:before,h2:before,h3:before,h4:before,h5:before,h6:before{opacity:.3;font-size:1rem}h1:before{content:"# "}h2:before{content:"## "}h3:before{content:"### "}h4:before{content:"#### "}h5:before{content:"##### "}h6:before{content:"###### "}.ico{font:20px Arial Unicode MS,Lucida Sans Unicode;line-height:10px;vertical-align:top}label>*{display:inline}form>*{display:block;margin-bottom:10px}textarea,input,select{border:2px solid #ccc;padding:8px}textarea:focus,input:focus,select:focus{border-color:#5ab}textarea,input[type=text]{-webkit-appearance:none;width:13em;outline:0;border:2px solid #888}.addon{padding:8px 12px;border-width:2px;border-color:#888;border-style:solid none solid solid}.nav,.nav .current,.nav a:hover{background:#000;color:#fff}.nav{height:50px;padding:11px 0 15px}.nav a{color:#aaa;padding-right:1em;position:relative;top:-1px}.nav .pagename{font-size:22px;top:1px}.btn.btn-close{background:#000;float:right;font-size:25px;margin:-54px 7px;display:none}@media(max-width:500px){.btn.btn-close{display:block}.nav{overflow:hidden}.pagename{margin-top:-11px}.nav:active,.nav:focus{height:auto}.nav div:before{background:#000;border-bottom:10px double;border-top:3px solid;content:'';float:right;height:4px;position:relative;right:3px;top:14px;width:20px}.nav a{display:block;padding:.5em 0;width:50%}}.table th,.table td{padding:.5em;text-align:left}.table tbody>:nth-child(2n-1){background:#ddd}.msg{background:#def;border-left:5px solid #59d;padding:1.5em}.info{background:#def;border-color:#59d}.ok{background:#c8fac8;border-color:#73cf73}.warn{background:#ffd9b4;border-color:#fa6}.err{background:#fed3d3;border-color:#e75d5d}.black,.black *{background:#000;border-color:#444;color:#fff}.fatal,.fatal *{background:#bf2aee;border-color:#9311bb;color:#fff}

View file

@ -13,7 +13,7 @@ echo -n "/* Copyright $YEAR Yann Esposito; MIT licensed */" >> $TMPCSS
for item in "${subtypes[@]}"; do
echo "building: $item"
lessc "less/$item.less" > "$DIST/$item.css"
lessc "src/$item.less" > "$DIST/$item.css"
minify "$DIST/$item.css" -o "$DIST/$item.min.css"
cat "$DIST/$item.min.css" >> $TMPCSS
done

View file

@ -5,16 +5,16 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<title>YOLO - docs</title>
<link href="entireframework.min.css" rel="stylesheet" type="text/css" />
<link href="../blunt.min.css" rel="stylesheet" type="text/css" />
<style>
.dark { background: #ddd; }
.light { background: #eee; }
</style>
</head>
<body>
<nav class="nav" tabindex="-1" onclick="this.focus()">
<nav class="nav">
<div class="container">
<a class="pagename current" href="index.html">BLUNT</a>
<a class="pagename current" href="../index.html">BLUNT</a>
<a class="current" href="#">Docs</a>
<!--
<a href="bootstrapconverter.html">Bootstrap Converter</a>
@ -25,29 +25,39 @@
<a href="https://github.com/owenversteeg/min">Github</a>
</div>
</nav>
<button class="btn btn-sm btn-close">×</button>
<div class="container">
<div>
<h1>Basics & Browser Support</h1>
<p>
BLUNT's minimalism has several advantages.
</p>
</div>
<div class="buttons">
<h1>Buttons</h1>
<h2>Text Buttons</h2>
<a class="tb">tb</a>
<a class="tb tb-a">tb tb-a</a>
<a class="tb tb-b">tb tb-b</a>
<a class="tb tb-c">tb tb-c</a>
<h2>Classic</h2>
<a class="btn btn-a">btn-a</a>
<a class="btn-b btn">btn-b</a>
<a class="btn-c btn">btn-c</a>
<a class="btn">classless</a>
<br><br><pre>&lt;a class="btn btn-b smooth"&gt;btn-b&lt;/a&gt;</pre>
<br>
<pre class="block">&lt;a class="btn btn-b"&gt;btn-b&lt;/a&gt;</pre>
<h2>Small <code>btn-sm</code></h2>
<a class="btn btn-a btn-sm">btn-sm btn-a</a>
<a class="btn btn-b btn-sm">btn-sm btn-b</a>
<a class="btn btn-c btn-sm">btn-sm btn-c</a>
<a class="btn btn-sm">btn-sm classless</a>
<br><br><pre>&lt;a class="btn btn-b btn-sm smooth"&gt;btn-sm&lt;/a&gt;</pre>
<pre class="block">&lt;a class="btn btn-b btn-sm"&gt;btn-sm&lt;/a&gt;</pre>
<h2>Standardized Width <code>btn-std</code></h2>
<a class="btn btn-a btn-std">btn-std btn-a With a bit too much text</a>
<a class="btn btn-b btn-std">btn-std btn-b</a>
<a class="btn btn-c btn-std">btn-std btn-c</a>
<a class="btn btn-std">btn-sm classless</a>
<pre class="block">&lt;a class="btn btn-b btn-sm"&gt;btn-sm&lt;/a&gt;</pre>
</div>
<div>
@ -59,11 +69,11 @@
<textarea rows="3" placeholder="textarea"></textarea>
</div>
<div class="block">
<span class="addon">$</span><input type="text" class="smooth" placeholder="span class=&quot;addon&quot;">
<span class="addon">$</span><input type="text" placeholder="span class=&quot;addon&quot;">
</div>
<pre>&lt;input type="text" class="smooth"&gt;
<br>&lt;textarea rows="3" class="smooth"&gt;
<br>&lt;span class="addon"&gt;$&lt;/span&gt;&lt;input type="text" class="smooth"&gt;</pre>
<pre>&lt;input type="text"&gt;
<br>&lt;textarea rows="3"&gt;
<br>&lt;span class="addon"&gt;$&lt;/span&gt;&lt;input type="text"&gt;</pre>
<div class="msg"><strong>Be careful with addons!</strong> If you do not want a space between the addon and the input make sure that there is no space between the <code>&lt;/span&gt;</code> and <code>&lt;input&gt;</code> tags. Example: <pre>... &lt;/span&gt; &lt;input ...</pre><span class="addon">$</span> <input type="text" class="smooth"> <pre>... &lt;/span&gt;&lt;input ...</pre><span class="addon">$</span><input type="text" class="smooth"></div>
</div>

View file

@ -3,15 +3,15 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../blunt.min.css" rel="stylesheet" type="text/css">
<title>Your Page Title</title>
<link href="//mincss.com/entireframework.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<nav class="nav" tabindex="-1" onclick="this.focus()">
<div class="container">
<a class="pagename current" href="#">Your Site Name</a>
<a class="pagename current" href="../index.html">Your Site Name</a>
<a href="#">One</a>
<a href="#">Two</a>
<a href="#">Three</a>

View file

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<link href="entireframework.min.css" rel="stylesheet" type="text/css" />
<title>Blunt</title>
<style>
.hero { text-align: center; }
</style>
</head>
<body>
<div class="block">
<div class="hero">
<h1 class="title">BLUNT</h1>
<h4 class="mobileonly">The world's <em>fastest</em> CSS framework</h4>
</div>
</div>
<div class="block">
<div class="row">
<div class="col card c3">
<h3>Documentation</h3>
<div class="block">
<p>Don't worry it will be quick and straightforward.<p>
</div>
<a href="docs.html" class="btn btn-a">Docs</a>
</div>
<div class="col card c3">
<h3>Examples</h3>
<div class="block">
<p>To give you an idea.<p>
</div>
<a href="examples.html" class="btn smooth">Examples</a>
</div>
</div>
</div>
</body>
</html>

38
index.html Normal file
View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<link href="blunt.min.css" rel="stylesheet" type="text/css" />
<title>Blunt</title>
<style type="text/css">
.hero { text-align: center; }
</style>
</head>
<body>
<div class="block">
<div class="hero">
<h1 class="title">BLUNT</h1>
<h4 class="mobileonly">The world's <em>fastest</em> CSS framework</h4>
</div>
</div>
<div class="block">
<div class="row">
<div class="col card c3">
<h3>Documentation</h3>
<div class="block">
<p>Don't worry it will be quick and straightforward.</p>
</div>
<a href="h/docs.html" class="btn btn-a">Docs</a>
</div>
<div class="col card c3">
<h3>Examples</h3>
<div class="block">
<p>To give you an idea.</p>
</div>
<a href="h/examples.html" class="btn smooth">Examples</a>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,12 +0,0 @@
/* Make the default heading style larger */
h1, h2, h3, h4, h5, h6 { display: table; padding: 0.25rem; }
h1 { border: double 5px #000; padding: 1rem;}
h2 { border-bottom: double 5px #000; }
h3 { border-bottom: solid 2px #000; }
h4 { border-bottom: solid 2px #ccc; }
h5 { border-bottom: solid 1px #ccc; }
h6 { border-bottom: dashed 1px #ccc; }
.big { font-size: 2em; }
.huge { font-size: 3em; }

View file

@ -1 +0,0 @@
/* There aren't any IE hacks needed as of now */

View file

@ -1,13 +1,31 @@
.tb {
font-weight: bold;
cursor: pointer;
padding: 2px;
}
.tb:before,.tb:after { opacity: 0.3; }
.tb:before { content: "〈"; }
.tb:after { content: "〉"; }
.tb:hover:before,.tb:hover:after { opacity: 1; }
.tb:hover:before { content: "《"; }
.tb:hover:after { content: "》"; }
.tb:active:before { content: "【"; }
.tb:active:after { content: "】"; }
.tb-a { color: #08b; }
.tb-b { color: #272; }
.tb-c { color: #c22; }
.btn {
background: #999;
border: solid 2px #000;
color: #fff;
font-weight: bold;
font-weight: bold;
cursor: pointer;
display: inline-block; /* Enables non-inline-block elements like <div>s to be buttons */
margin: 2px 0;
padding: 12px 30px 14px;
box-shadow: 4px 4px rgba(0,0,0,0.75);
padding: 1rem 2rem;
box-shadow: 4px 4px rgba(0,0,0,0.75);
}
.btn:hover {
@ -54,5 +72,9 @@
}
.btn-sm {
padding: 10px 14px 11px;
padding: 0.5rem 1rem;
}
.btn-std {
width: 12rem;
}

View file

@ -9,23 +9,11 @@ body, textarea, input, select {
* { box-sizing: border-box; }
.btn, h1, h2, h3, h4, h5, h6 {
font-size: 1rem;
}
h1 { border-bottom: double 5px; }
h2 { border-bottom: solid 2px; }
h3 { border-bottom: dashed 1px; }
h4 { border-bottom: dotted 1px; }
.addon, .btn-sm, .nav, textarea, input, select {
outline: 0;
font-size: 10px;
}
.smooth {
}
.btn, .nav a {
text-decoration: none;
}
@ -49,9 +37,15 @@ h4 { border-bottom: dotted 1px; }
.hero {
background: #ddd;
padding: 20px;
border-radius: 10px;
margin-top: 1em;
padding: 2rem;
border: double 1rem;
margin-top: 1rem;
}
.hero * {
font-size: 2rem;
margin: 2rem auto;
text-align: center;
}
@media(min-width:1310px) {
@ -68,3 +62,6 @@ code { background: rgba(0,0,0,0.1);
border: solid 1px rgba(0,0,0,0.1);
padding: 1px;
}
.big { font-size: 2em; }
.huge { font-size: 3em; }

12
src/headings.less Normal file
View file

@ -0,0 +1,12 @@
/* Make the default heading style larger */
h1, h2, h3, h4, h5, h6 { display: table; padding: 0.25rem; font-size: 1rem; }
h1 { font-size: 2rem; }
h1:before, h2:before, h3:before, h4:before, h5:before, h6:before
{ opacity: 0.3; font-size: 1rem; }
h1:before {content:"# "; }
h2:before { content: "## "; }
h3:before { content: "### "; }
h4:before { content: "#### "; }
h5:before { content: "##### "; }
h6:before { content: "###### "; }