Skip to content

Instantly share code, notes, and snippets.

@bobdobbalina
Last active March 11, 2021 15:23
Show Gist options
  • Save bobdobbalina/b406f3843e37d43f141bc4739dba3df7 to your computer and use it in GitHub Desktop.
Save bobdobbalina/b406f3843e37d43f141bc4739dba3df7 to your computer and use it in GitHub Desktop.
BitttersKitchenSink
// Bitters 2.0.4
// https://github.com/thoughtbot/bitters
// Copyright 2013-2019 thoughtbot, inc.
// MIT License
@import "variables";
@import "buttons";
@import "forms";
@import "layout";
@import "lists";
@import "media";
@import "tables";
@import "typography";
button,
[type="button"],
[type="reset"],
[type="submit"] {
appearance: none;
background-color: $action-color;
border: 0;
border-radius: var(--border-radius);
color: $action-color--contrast;
cursor: pointer;
display: inline-block;
font-family: var(--font-family-base);
font-size: 1rem;
-webkit-font-smoothing: antialiased;
font-weight: 600;
line-height: 1;
padding: var(--spacing--small) var(--spacing);
text-align: center;
text-decoration: none;
transition: background-color var(--duration) var(--timing);
user-select: none;
vertical-align: middle;
white-space: nowrap;
&:hover {
background-color: $action-color--alt;
}
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}
:root {
--form-box-shadow: inset 0 --border-width 0.1875rem rgba(#000, 0.06);
--form-box-shadow-focus: var(--form-box-shadow), 0 0 0.3125rem #{$action-color};
}
fieldset {
background-color: transparent;
border: 0;
margin: 0;
padding: 0;
}
legend {
font-weight: 600;
margin-bottom: var(--spacing--small);
padding: 0;
}
label {
display: block;
font-weight: 600;
margin-bottom: var(--spacing--small);
}
input,
select,
textarea {
display: block;
font-family: var(--font-family);
font-size: 1rem;
}
[type="color"],
[type="date"],
[type="datetime"],
[type="datetime-local"],
[type="email"],
[type="month"],
[type="number"],
[type="password"],
[type="search"],
[type="tel"],
[type="text"],
[type="time"],
[type="url"],
[type="week"],
input:not([type]),
textarea {
appearance: none;
background-color: transparent;
border: var(--border);
border-radius: var(--border-radius);
box-shadow: var(--form-box-shadow);
box-sizing: border-box;
margin-bottom: var(--spacing--small);
padding: calc(var(--spacing) / 3);
transition: border-color var(--duration) var(--timing);
width: 100%;
&:focus {
box-shadow: var(--form-box-shadow-focus);
}
&:disabled {
cursor: not-allowed;
&:hover {
border: var(--border);
}
}
&::placeholder {
color: $font-color--base;
opacity: 0.25;
}
}
[type="search"] {
-webkit-appearance: textfield;
}
textarea {
resize: vertical;
}
[type="checkbox"],
[type="radio"] {
display: inline;
margin-right: var(--spacing--small);
}
[type="file"] {
margin-bottom: var(--spacing--small);
width: 100%;
}
select {
margin-bottom: var(--spacing--small);
width: 100%;
}
[type="checkbox"],
[type="radio"],
[type="file"],
select {
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
}
html {
background-color: $viewport-background-color;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
html,
body {
height: 100%;
}
ul,
ol {
list-style-type: none;
margin: 0;
padding: 0;
}
dl {
margin: 0;
}
dt {
font-weight: 600;
margin: 0;
}
dd {
margin: 0;
}
figure {
margin: 0;
}
img,
picture {
margin: 0;
max-width: 100%;
}
table {
border-collapse: collapse;
margin: var(--spacing) 0;
table-layout: fixed;
text-align: left;
width: 100%;
}
thead {
line-height: var(--line-height--heading);
vertical-align: bottom;
}
tbody {
vertical-align: top;
}
tr {
border-bottom: var(--border);
}
th {
font-weight: 600;
}
th,
td {
padding: var(--spacing--small) var(--spacing--small) var(--spacing--small) 0;
}
html {
color: $font-color--base;
font-family: var(--font-family);
font-size: 100%;
line-height: var(--line-height);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-family--heading);
font-size: 1.25rem;
line-height: var(--line-height--heading);
margin: 0 0 var(--spacing--small);
}
p {
margin: 0 0 var(--spacing--small);
}
a {
color: $action-color;
text-decoration-skip-ink: auto;
transition: color var(--duration) var(--timing);
&:hover {
color: $action-color--alt;
}
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
}
hr {
border-bottom: var(--border);
border-left: 0;
border-right: 0;
border-top: 0;
margin: var(--spacing) 0;
}
// Colors
$blue: #1565c0;
$blue-light: #3b83d5;
$gray: #333;
$white: #fff;
// Font Colors
$font-color--base: $gray;
$action-color: $blue;
$action-color--alt: $blue-light;
$action-color--contrast: $white;
// Background Colors
$viewport-background-color: $white;
:root {
// Typography
--font-family: system-ui, sans-serif;
--font-family--heading: var(--font-family);
--font-weight--thin: 100;
--font-weight--extra-light: 200;
--font-weight--light: 300;
--font-weight--normal: 400;
--font-weight--medium: 500;
--font-weight--semi-bold: 600;
--font-weight--bold: 700;
--font-weight--extra-bold: 800;
--font-weight--black: 900;
// Line heights
--line-height: 1.5;
--line-height--heading: 1.2;
// Other Sizes
--border-radius: 0.1875rem;
--spacing: 1.5rem;
--spacing--small: 0.75rem;
// Borders
--border-width: 0.0625rem;
--border: var(--border-width) solid currentColor;
// Focus
--focus-outline-width: 0.1875rem;
--focus-outline-offset: 0.125rem;
--focus-outline: var(--focus-outline-width) solid #{$action-color};
// Animations
--duration: 150ms;
--timing: ease;
}
{
"scripts": [],
"styles": []
}
<!-- HTML5 Kitchen sink by @dbox -->
<main>
<section>
<hgroup>
<h1>h1 HTML5 Kitchen Sink</h1>
<h2>h2 Back in my quaint <a href='#'>garden</a></h2>
<h3>h3 Jaunty <a href='#'>zinnias</a> vie with flaunting phlox</h3>
<h4>h4 Five or six big jet planes zoomed quickly by the new tower.</h4>
<h5>h5 Expect skilled signwriters to use many jazzy, quaint old alphabets effectively.</h5>
<h6>h6 Pack my box with five dozen liquor jugs.</h6>
</hgroup>
</section>
<hr>
<section>
<header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<article>
<p>This paragraph is nested inside an article. It contains many different, sometimes useful, <a href="https://www.w3schools.com/tags/">HTML5 tags</a>. Of course there are classics like <em>emphasis</em>, <strong>strong</strong>, and
<small>small</small> but there are many others as well. Hover the following text for abbreviation tag: <abbr title="abbreviation">abbr</abbr>. Similarly, you can use acronym tag like this: <acronym title="For The Win">ftw</acronym>.
You can define <del>deleted text</del> which often gets replaced with <ins>inserted</ins> text.
</p>
<p>You can also use <kbd>keyboard text</kbd>, which sometimes is styled similarly to the <code>&lt;code&gt;</code> or <samp>samp</samp> tags. Even more specifically, there is a tag just for <var>variables</var>. Not to be mistaken with
blockquotes
below, the quote tag lets you denote something as <q>quoted text</q>. Lastly don't forget the sub (H<sub>2</sub>O) and sup (E = MC<sup>2</sup>) tags. </p>
</article>
<aside>This is an aside.</aside>
<footer>This is footer for this section</footer>
</section>
<hr>
<section>
<blockquote>
<p>Blockquote: I quickly explained that many big jobs involve few hazards</p>
</blockquote>
<blockquote>
<p>This is a mult-line blockquote with a cite reference. People think focus means saying yes to the thing you’ve got to focus on. But that’s not what it means at all. It means saying no to the hundred other good ideas that there are. You
have to pick
carefully. I’m actually as proud of the things we haven’tdone as the things I have done. Innovation is saying no to 1,000 things.
<cite>Steve Jobs – Apple Worldwide Developers’ Conference, 1997</cite>
</p>
</blockquote>
</section>
<hr>
<section>
<table>
<caption>Tables can have captions now.</caption>
<tbody>
<tr>
<th>Person</th>
<th>Number</th>
<th>Third Column</th>
</tr>
<tr>
<td>Someone Lastname</td>
<td>900</td>
<td>Nullam quis risus eget urna mollis ornare vel eu leo.</td>
</tr>
<tr>
<td><a href="#">Person Name</a></td>
<td>1200</td>
<td>Vestibulum id ligula porta felis euismod semper. Donec ullamcorper nulla non metus auctor fringilla.</td>
</tr>
<tr>
<td>Another Person</td>
<td>1500</td>
<td>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Nullam id dolor id nibh ultricies vehicula ut id elit.</td>
</tr>
<tr>
<td>Last One</td>
<td>2800</td>
<td>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</td>
</tr>
</tbody>
</table>
</section>
<hr>
<section>
<dl>
<dt>Definition List Title</dt>
<dd>Definition list division.</dd>
<dt>Kitchen Sink</dt>
<dd>Used in expressions to describe work in which all conceivable (and some inconceivable) sources have been mined. In this case, a bunch of markup.</dd>
<dt>aside</dt>
<dd>Defines content aside from the page content</dd>
<dt>blockquote</dt>
<dd>Defines a section that is quoted from another source</dd>
</dl>
</section>
<hr>
<section>
<ul>
<li>Unordered List item one
<ul>
<li>Nested list item
<ul>
<li>Level 3, item one</li>
<li>Level 3, item two</li>
<li>Level 3, item three</li>
<li>Level 3, item four</li>
</ul>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ul>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ul>
<hr>
<ol>
<li>List item one
<ol>
<li>List item one
<ol>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
</li>
<li>List item two</li>
<li>List item three</li>
<li>List item four</li>
</ol>
</section>
<hr>
<section>
<address>1 Infinite Loop<br>
Cupertino, CA 95014<br>
United States</address>
</section>
<hr>
<section>
<pre>
pre {
display: block;
padding: 7px;
background-color: #F5F5F5;
border: 1px solid #E1E1E8;
border-radius: 3px;
white-space: pre-wrap;
word-break: break-all;
font-family: Menlo, Monaco;
line-height: 160%;
}</pre>
</section>
<hr />
<figure>
<img src="https://www.fillmurray.com/505/314">
<figcaption>Fig1. A picture of Bill Murray from <a href="https://www.fillmurray.com/">fillmurray.com</a></figcaption>
</figure>
<hr>
<section>
<form>
<p>
<label for="example-input-email">Email address</label>
<input type="email" id="example-input-email" placeholder="Enter email">
</p>
<p>
<label for="example-input-password1">Number</label>
<input type="number" id="example-input-number" placeholder="Number">
</p>
<p>
<label for="example-input-password">Password</label>
<input type="password" id="example-input-password" placeholder="Password">
</p>
<p>
<label for="example-input-search">Search</label>
<input type="search" id="example-input-serach" placeholder="Search ..">
</p>
<p>
<label for="example-input-tel">Telephone number</label>
<input type="tel" id="example-input-tel" placeholder="Telephone number">
</p>
<p>
<label for="example-input-text">Text</label>
<input type="text" id="example-input-text" placeholder="Enter some text here">
</p>
<p>
<label for="example-input-url">Url</label>
<input type="url" id="example-input-url" placeholder="Enter a url here">
</p>
<p>
<label for="example-input-color">Color</label>
<input type="color" id="example-inupt-color" placeholder="#fff">
</p>
<p>
<label for="example-input-date">Date</label>
<input type="date" id="example-input-date" placeholder="date">
</p>
<p>
<label for="example-input-date-time">Date / Time</label>
<input type="datetime" id="example-input-date-time" placeholder="date / time">
</p>
<p>
<label for="example-input-date-time-local">Date / Time local</label>
<input type="datetime-local" id="example-input-date-time-local" placeholder="date / time local">
</p>
<p>
<label for="example-input-month">Month</label>
<input type="month" id="example-input-month" placeholder="Month">
</p>
<p>
<label for="example-input-week">Week</label>
<input type="week" id="example-input-week" placeholder="Week">
</p>
<p>
<label for="example-input-time">Time</label>
<input type="time" id="example-input-time" placeholder="Time">
</p>
<p>
<label for="example-select1">Example select</label>
<select id="example-select1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</p>
<p>
<label for="example-select2">Example multiple select</label>
<select multiple id="example-select2">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</p>
<p>
<label for="example-textarea">Example textarea</label>
<textarea id="example-textarea" rows="3"></textarea>
</p>
<p>
<label for="example-input-file">File input</label>
<input type="file" id="example-input-file">
</p>
<fieldset>
<legend>I am legend</legend>
<div>
<label>
<input type="radio" name="options-radios" id="optionsR-radios1" value="option1" checked> Option one is this and that&mdash;be sure to include why it's great
</label>
</div>
<div>
<label>
<input type="radio" name="options-radios" id="options-radios2" value="option2"> Option two can be something else and selecting it will deselect option one
</label>
</div>
<div>
<label>
<input type="radio" name="optionsRadios" id="options-radios3" value="option3" disabled> Option three is disabled
</label>
</div>
</fieldset>
<fieldset>
<legend>I am also legend</legend>
<input type="checkbox"> Check me out
<input type="checkbox"> Or check me out
</fieldset>
<p>
<button type="button" name="button">Button</button>
<input type="button" name="input" value="Input Button">
<input type="submit" name="submit" value="Submit Button">
<input type="reset" name="reset" value="Reset Button">
</p>
</form>
</section>
</main>
<!-- end kitchen sink -->
</div>
// Colors
$blue: orange;
$blue-light: lightblue;
$gray: gray;
$white: #fff;
// Font Colors
$font-color--base: $gray;
$action-color: $blue;
$action-color--alt: $blue-light;
$action-color--contrast: $white;
// Background Colors
$viewport-background-color: $white;
:root {
// Typography
--font-family: system-ui, sans-serif;
--font-family--heading: var(--font-family);
--font-weight--thin: 100;
--font-weight--extra-light: 200;
--font-weight--light: 300;
--font-weight--normal: 400;
--font-weight--medium: 500;
--font-weight--semi-bold: 600;
--font-weight--bold: 700;
--font-weight--extra-bold: 800;
--font-weight--black: 900;
// Line heights
--line-height: 1.8;
--line-height--heading: 1.4;
// Other Sizes
--border-radius: 2.5rem;
--spacing: 5rem;
--spacing--small: 0.75em;
// Borders
--border-width: 2px;
--border: var(--border-width) solid currentColor;
// Focus
--focus-outline-width: 0.1875rem;
--focus-outline-offset: 0.125rem;
--focus-outline: var(--focus-outline-width) solid #{$action-color};
// Animations
--duration: 150ms;
--timing: ease;
}
// BUTTONS
button,
[type="button"],
[type="reset"],
[type="submit"] {
appearance: none;
background-color: $action-color;
border: 0;
border-radius: var(--border-radius);
color: $action-color--contrast;
cursor: pointer;
display: inline-block;
font-family: var(--font-family-base);
font-size: 1rem;
-webkit-font-smoothing: antialiased;
font-weight: 600;
line-height: 1;
padding: var(--spacing--small) calc( 2 * var(--spacing--small));
text-align: center;
text-decoration: none;
transition: background-color var(--duration) var(--timing);
user-select: none;
vertical-align: middle;
white-space: nowrap;
&:hover {
background-color: $action-color--alt;
}
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}
// FORMS
:root {
--form-box-shadow: inset 0 --border-width 0.1875rem rgba(#000, 0.06);
--form-box-shadow-focus: var(--form-box-shadow), 0 0 0.3125rem #{$action-color};
}
fieldset {
background-color: transparent;
border: 0;
margin: 0;
padding: 0;
}
legend {
font-weight: 600;
margin-bottom: var(--spacing--small);
padding: 0;
}
label {
display: block;
font-weight: 600;
margin-bottom: var(--spacing--small);
}
input,
select,
textarea {
display: block;
font-family: var(--font-family);
font-size: 1rem;
}
[type="color"],
[type="date"],
[type="datetime"],
[type="datetime-local"],
[type="email"],
[type="month"],
[type="number"],
[type="password"],
[type="search"],
[type="tel"],
[type="text"],
[type="time"],
[type="url"],
[type="week"],
input:not([type]),
textarea {
appearance: none;
background-color: transparent;
border: var(--border);
border-radius: var(--border-radius);
box-shadow: var(--form-box-shadow);
box-sizing: border-box;
margin-bottom: var(--spacing--small);
padding: calc(var(--spacing) / 3);
transition: border-color var(--duration) var(--timing);
width: 100%;
&:focus {
box-shadow: var(--form-box-shadow-focus);
}
&:disabled {
cursor: not-allowed;
&:hover {
border: var(--border);
}
}
&::placeholder {
color: $font-color--base;
opacity: 0.25;
}
}
[type="search"] {
-webkit-appearance: textfield;
}
textarea {
resize: vertical;
}
[type="checkbox"],
[type="radio"] {
display: inline;
margin-right: var(--spacing--small);
}
[type="file"] {
margin-bottom: var(--spacing--small);
width: 100%;
}
select {
margin-bottom: var(--spacing--small);
width: 100%;
}
[type="checkbox"],
[type="radio"],
[type="file"],
select {
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
}
// LAYOUT
html {
background-color: $viewport-background-color;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
html,
body {
height: 100%;
}
// LISTS
ul,
ol {
list-style-type: none;
margin: 0;
padding: 0;
}
dl {
margin: 0;
}
dt {
font-weight: 600;
margin: 0;
}
dd {
margin: 0;
}
// MEDIA
figure {
margin: 0;
}
img,
picture {
margin: 0;
max-width: 100%;
}
// TABLES
table {
border-collapse: collapse;
margin: var(--spacing) 0;
table-layout: fixed;
text-align: left;
width: 100%;
}
thead {
line-height: var(--line-height--heading);
vertical-align: bottom;
}
tbody {
vertical-align: top;
}
tr {
border-bottom: var(--border);
}
th {
font-weight: 600;
}
th,
td {
padding: var(--spacing--small) var(--spacing--small) var(--spacing--small) 0;
}
// TYPOGRAHY
html {
color: $font-color--base;
font-family: var(--font-family);
font-size: 100%;
line-height: var(--line-height);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-family--heading);
font-size: 1.25rem;
line-height: var(--line-height--heading);
margin: 0 0 var(--spacing--small);
}
p {
margin: 0 0 var(--spacing--small);
}
a {
color: $action-color;
text-decoration-skip-ink: auto;
transition: color var(--duration) var(--timing);
&:hover {
color: $action-color--alt;
}
&:focus {
outline: var(--focus-outline);
outline-offset: var(--focus-outline-offset);
}
}
hr {
border-bottom: var(--border);
border-left: 0;
border-right: 0;
border-top: 0;
margin: var(--spacing) 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment