barecss-power
Version:
A classless CSS framework (power) http://barecss.com
1,296 lines (1,043 loc) • 40.7 kB
HTML
<html lang="en">
<head>
<title>BareCSS</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="description" content="A classless CSS framework (power)">
<meta name="keywords" content="barecss,bare,css,power,classless,framework,merferry">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- js -->
<script src="http://barecss.com/min/jquery.min.js"></script>
<script src="http://barecss.com/min/prism.min.js"></script>
<script src="http://barecss.com/min/master.min.js"></script>
<!-- favicon -->
<link rel="shortcut icon" href="http://www.barecss.com/favicon.ico" />
<!-- css -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Righteous&display=swap">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="http://barecss.com/css/prism.min.css">
<link rel="stylesheet" href="http://barecss.com/css/style.min.css">
</head>
<body id="home">
<!-- nav -->
<nav class="fixed">
<label>
<input type="checkbox">
<header>
<a href="http://www.barecss.com">
<img src="http://www.barecss.com/img/bareCSS-small.svg"><b>Bare</b>CSS
</a>
</header>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#change-log">Change log</a></li>
<li><a href="#install">Install</a></li>
<li>
<a>Components</a>
<menu>
<menuitem><a href="#navigation">Navigation</a></menuitem>
<menuitem><a href="#sections">Sections</a></menuitem>
<menuitem><a href="#typography">Typography</a></menuitem>
<menuitem><a href="#buttons">Buttons</a></menuitem>
<menuitem><a href="#tooltips">Tooltips</a></menuitem>
<menuitem><a href="#forms">Forms</a></menuitem>
<menuitem><a href="#code">Code</a></menuitem>
<menuitem><a href="#blockquote">Blockquote</a></menuitem>
<menuitem><a href="#lists">Lists</a></menuitem>
<menuitem><a href="#tables">Tables</a></menuitem>
<menuitem><a href="#grid">Grid</a></menuitem>
<menuitem><a href="#cards">Cards</a></menuitem>
<menuitem><a href="#utility-attributes">Utility Attributes</a></menuitem>
<menuitem><a href="#footer">Footer</a></menuitem>
</menu>
</li>
</ul>
</label>
</nav>
<!-- banner -->
<section wide class="banner">
<canvas class="stars one"></canvas>
<canvas class="stars two"></canvas>
<section>
<div class="logo" tabindex="0">
<img src="http://barecss.com/img/bareCSS.svg" alt="boobs">
<img src="http://barecss.com/img/bareCSS.svg" alt="boobs">
</div>
<div class="title">
<h1><b>BARE</b>CSS</h1>
<p>A classless CSS framework.</p>
</div>
</section>
</section>
<!-- about -->
<section xx class="about" id="about">
<div class="sub-heading">
<h2>About BareCSS</h2>
</div>
<row>
<!-- what is it -->
<cell class="c3">
<h3>What is it?</h3>
</cell>
<cell class="c9">
<p>BareCSS is a CSS only framework that styles frequently used HTML tags without the need for classes. It also
provides a few utilities such as a responsive grid and CSS only tooltips.</p>
<p>BareCSS can be used stand-alone or as a foundation to build upon. This site you're viewing now uses BareCSS
and a custom style sheet that's less than 3kb (<kbd>n</kbd><kbd>o</kbd>).</p>
<p>Compatible with all modern browsers and IE9+.</p>
<p><a att download
href="https://github.com/longsien/BareCSS/releases/download/v1.1.0/BareCSS-v1.1.0.zip">Download latest
release</a>.</p>
</cell>
<hr>
<!-- why does it exist? -->
<cell class="c3">
<h3>Why does it exist?</h3>
</cell>
<cell class="c9">
<p>Sometimes you want to quickly set up a simple site or application. You don't want it to look like a
Word™ doc but you also don't want/need a massive framework such as <a att href="http://getbootstrap.com"
target="_blank">Bootstrap</a> or <a att href="http://foundation.zurb.com" target="_blank">Foundation</a> or
<a att href="http://materializecss.com" target="_blank">Materialize</a>.</p>
<p>So in a similar vein as <a att href="http://purecss.io" target="_blank">Pure</a> and <a att
href="http://getskeleton.com" target="_blank">Skeleton</a>, BareCSS aims to provide a minimal CSS framework
that requires minimal setup.</p>
<p>BareCSS takes this minimal approach one step further by making it completely classless. Not only that, but
the default styles are <em>only</em> applied to elements without classes. Why only bare tags? For custom
components and modules, you may not want the standard stylings to apply, so by giving them a class you're
removing all Bare styling. If you want to add a class and want the Bare styling applied, just add the
<code>xx</code> attribute to that element.</p>
</cell>
<hr>
<!-- how does it work? -->
<cell class="c3">
<h3>How does it work?</h3>
</cell>
<cell class="c9">
<p>BareCSS effectively changes the default browser styles. Any commonly used tags such as <code xx
class="esc">input</code> or <code xx class="esc">button</code> are styled <em>only</em> if they don't have
any classes.</p>
<p>What if you want to add a class to a tag but still want to retain the Bare style? Just add the attribute
<code>xx</code> to the tag and the Bare styles will be applied.</p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- want to style a button? -->
<button>Button</button>
<!-- adding a class will remove the Bare styling and use the default browser style -->
<button class="your-btn-class">Button</button>
<!-- adding the attribute xx to a tag with a class will apply the Bare styling -->
<button xx class="your-btn-class">Button</button></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- change log -->
<section id="change-log">
<div class="sub-heading">
<h2>Change log</h2>
</div>
<row>
<cell class="c6">
<h3>v1.1.0</h3>
</cell>
<cell class="c6">
<ul>
<li>
Removed all classes <b>(note: this is a breaking change)</b>
<ul>
<li>Grids no longer use classes</li>
<li>Buttons no longer use classes</li>
<li>Cards no longer use classes</li>
<li>The <code>xx</code> default class has now been made an attribute</li>
<li>Changed utility classes to attributes</li>
</ul>
</li>
<li>Introduced tags</li>
<li>Introduced rounded buttons</li>
<li>
Changed tooltip behaviour and attribute
<ul>
<li>Instead of <code>data-tt</code> it's now just <code>tt</code></li>
<li>Anchor link tooltips now require the <code>att</code> attribute</li>
</ul>
</li>
<li>Introduced footer</li>
<li>Includes a template HTML file</li>
</ul>
</cell>
<hr>
<cell class="c6">
<h3>v1.0.1</h3>
</cell>
<cell class="c6">
<ul>
<li>Added navigation</li>
<li>Separated LESS files into components</li>
<li>Included SVG icons</li>
</ul>
</cell>
</section>
<!-- install -->
<section id="install">
<div class="sub-heading">
<h2>How to install</h2>
</div>
<row>
<cell class="c6">
<p><a att download
href="https://github.com/longsien/BareCSS/releases/download/v1.1.0/BareCSS-v1.1.0.zip">Download</a> the
package from <a att href="https://github.com/longsien/BareCSS" target="_blank">Github</a>.</p>
<p>Included are SVG icon files from <a att href="https://design.google.com/icons" target="_blank">Google</a>,
the compiled and minified CSS file, and the LESS components.</p>
<p>If there are any components you don't need, just comment the line out from <code>bare.less</code> and compile
yourself.</p>
<p>A <code>template.html</code> file is included to help you get started with the basic structure of the
<code>nav</code> and <code>grid</code>.</p>
</cell>
<cell class="c6">
<p>What's included:</p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc">BareCSS/
├── template.html
├── css/
│ └── bare.min.css
├── icons/
│ ├── chevron-down.svg
│ ├── close.svg
│ ├── done.svg
│ └── hamburger.svg
└── less/
├── _anchor-link.less
├── _blockquote.less
├── _button.less
├── _card.less
├── _code.less
├── _footer.less
├── _grid.less
├── _input.less
├── _layout.less
├── _list.less
├── _navigation.less
├── _reset.less
├── _table.less
├── _tooltip.less
├── _transition.less
├── _typography.less
├── _utility-attributes.less
├── _variables.less
└── bare.less
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- navigation -->
<section id="navigation">
<div class="sub-heading">
<h2>Navigation</h2>
</div>
<p>Getting a responsive nav bar with a hamburger menu for mobile without using any Javascript requires a bit of a
hack. You need to follow the exact structure listed below for it to work properly.</p>
<p>This site uses the BareCSS nav so you can resize your browser window to see how it looks on desktop/mobile. This
site uses the fixed nav bar so it's using the <code>fx</code> attribute to keep it fixed. Mobile nav is fixed by
default.</p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- add the fx attribute to the nav if you want it fixed to the top -->
<nav>
<!-- this label allows the checkbox to be activated by clicking anywhere in the nav -->
<label>
<!-- checkbox required for responsiven menu -->
<input type="checkbox">
<!-- bareCSS will use the header to contain the hamburger menu -->
<header>
<!-- you can leave this empty if you don't want a title -->
<a><img src="http://barecss.com/img/bareCSS.svg"> Title</a>
</header>
<!-- the main navigation items are anchor links within an unordered list -->
<ul>
<li><a href="http://barecss.com/index.html">Home</a></li>
<li><a href="http://barecss.com/about.html">About</a></li>
<li>
<a>Dropdown</a>
<!-- use <menu> and <menuitem> within an <li> for dropdowns -->
<menu>
<menuitem><a href="#">Item one</a></menuitem>
<menuitem><a href="#">Item two</a></menuitem>
</menu>
</li>
</ul>
</label>
</nav></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- sections -->
<section id="sections">
<div class="sub-heading">
<h2>Sections</h2>
</div>
<p>This site that you're viewing right now is built on <code>section</code> elements. The sections are horizontally
centred, have a <code>max-width</code> equal to the <code>@width</code> variable in the
<code>_variables.less</code> file (default is 90rem), and will shrink with smaller screens. Useful for containing
content quickly.</p>
<p><b>Note</b>: Because of CSS specificity, overwriting the default style with a class will require specifying that
the class applies to a <code>section</code> element. <em>Eg: Your CSS property should look like
<code>section.custom-section</code> rather than just <code>.custom-section</code>.</em></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- use sections to quickly and easily contian content -->
<section>
Your code here.
</section></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- typography -->
<section id="typography">
<div class="sub-heading">
<h2>Typography</h2>
</div>
<row>
<cell class="c6">
<p>Font sizes in BareCSS are based in <code>rem</code>s. You can set the initial font size in the
<code>html</code> element to change the scale. The default is <code>10px</code> so that 1rem is 10px and 2rem
is 20px etc.</p>
<p>The font family defaults are just the standard browser defaults, so <code>serif</code>,
<code>sans-serif</code> and <code>monospace</code> fonts are chosen by the browser. You can change this in the
<code>_variables.less</code> file.
<p>The main thing BareCSS does to headings is to standardise the margins and paddings. <code>h1</code> through
to <code>h6</code> are catered for.</p>
</cell>
<cell class="c6">
<h1><code>h1</code> Heading level 1</h1>
<h2><code>h2</code> Heading level 2</h2>
<h3><code>h3</code> Heading level 3</h3>
<h4><code>h4</code> Heading level 4</h4>
<h5><code>h5</code> Heading level 5</h5>
<h6><code>h6</code> Heading level 6</h6>
</cell>
</row>
</section>
<!-- buttons -->
<section id="buttons">
<div class="sub-heading">
<h2>Buttons</h2>
</div>
<p>Buttons default to the normal button style below. The primary button style uses the <code>primary</code>
attribute. Disabled buttons are automatically styled if they have the <code>disabled</code> attribute.</p>
<p><button primary>Primary button</button><button>Default button</button><button disabled>Disabled button</button>
</p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- primary button -->
<button primary>Primary button</button>
<!-- default button -->
<button>Default button</button>
<!-- disabled button -->
<button disabled>Disabled button</button></code></pre>
<!-- /code -----------------------------------------------------// -->
<hr>
<row>
<!-- anchor and submit buttons -->
<cell class="c4">
<h3>Anchor and submit buttons</h3>
<p>You can style anchor links by adding the <code>btn</code> attribute and <code>input type=submit</code> will
automatically be styled like a button.</p>
</cell>
<cell class="c8">
<p><a btn primary>Anchor link</a><input type="submit" value="Submit"></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- anchor link button -->
<a btn primary>Anchor link</a>
<!-- input submit button -->
<input type="submit" value="Submit"></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
<hr>
<!-- full width buttons -->
<cell class="c4">
<h3>Full width buttons</h3>
<p>If you want your buttons to be 100% width on mobile screens you can add the <code>m-full</code> attribute.
</p>
</cell>
<cell class="c8">
<p>These buttons will be full width on mobile screens.</p>
<p><button primary m-full>Primary button</button><button m-full>Default button</button><button disabled
m-full>Disabled button</button></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- primary button -->
<button primary m-full>Primary button</button>
<!-- default button -->
<button m-full>Default button</button>
<!-- disabled button -->
<button m-full disabled>Disabled button</button></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
<hr>
<!-- rounded buttons -->
<cell class="c4">
<h3>Rounded buttons</h3>
<p>If you want your buttons to be rounded, use the <code>round</code> attribute.</p>
</cell>
<cell class="c8">
<p><button round primary>Primary button</button><button round>Default button</button><button disabled
round>Disabled button</button></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- primary button -->
<button primary round>Primary button</button>
<!-- default button -->
<button round>Default button</button>
<!-- disabled button -->
<button round disabled>Disabled button</button></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- tags -->
<section id="tags">
<div class="sub-heading">
<h2>Tags</h2>
</div>
<row>
<cell class="c6">
<p>Tags use the <code>tag</code> element.</p>
</cell>
<cell class="c6">
<tag class="pri">One</tag>
<tag>Two</tag>
<tag>Three</tag>
<tag>Four</tag>
<tag>Five</tag>
<tag>Six</tag>
<tag>Seven</tag>
<tag>Eight</tag>
<tag>Nine</tag>
<tag>Ten</tag>
<tag>Eleven</tag>
<tag>Twelve</tag>
</cell>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- tags are inline block elements with margins -->
<tag>One</tag><tag>Two</tag><tag>Three</tag></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- tooltips -->
<section id="tooltips">
<div class="sub-heading">
<h2>Tooltips</h2>
</div>
<p>Tooltips are handy and BareCSS provides you with classless, no javascript tooltips. Tooltips can be applied to
most tags, as long as they accept the <code>::before</code> and <code>::after</code> pseudo elements. Just use
<code>tt="Your tooltip here"</code> in the tag.</p>
<p>Hover over <b tt="Tooltip on a <b> tag">this</b> for a tooltip on a <code>b</code> tag. Hover over <code
tt="Tooltip on a <code> tag">this</code>, or <a href="" tt="Tooltip on an anchor tag">this</a> or even <sup
tt="Tooltip on a <sup> tag">this</sup> to see tooltips in action.</p>
<p><em>Note: These tooltips aren't clever so they will spill offscreen. You'll need some Javascript if you want
dynamic positioning.</em></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- inline element -->
<b tt="Tooltip">Tooltip</b>
<!-- buttons -->
<button class="primary" tt="Primary button with a tooltip">Primary button</button>
<button tooltip="Normal button with a tooltip">Normal button</button></code></pre>
<!-- /code -----------------------------------------------------// -->
<hr>
<row>
<cell class="c6">
<h3>Disabled button tooltips</h3>
<p>If you want to tell your user why a button is disabled then you can use the <code>dtt</code> attribute to
show a tooltip when a button is disabled. This is handy for things such as invalid or incomplete forms.</p>
<p>You can use both <code>tt</code> and <code>dtt</code> on the same element and the button
<code>disabled</code> state will determine the tooltip shown.</p>
</cell>
<cell class="c6">
<p>Use the primary button to toggle the normal/disabled button.</p>
<p>
<button primary m-full xx class="ripple js-toggle-right-btn" tt="Click to toggle right button">Toggle next
button</button>
<button primary m-full xx class="js-right-btn" disabled="true" tt="Not disabled"
dtt="Disabled button tooltip">Disabled button</button>
</p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- disabled buttons -->
<!-- note that you can have tooltips for enabled and disabled states -->
<button disabled="true" tt="Not disabled" dtt="Disabled">Disabled button</button>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
<hr>
<row>
<cell class="c6">
<h3>Anchor link tooltip</h3>
<p>You can easily set a tooltip for an <a att href="https://github.com/longsien/BareCSS">anchor link</a> that
shows the <code>href</code> on hover just by adding the <code>att</code> attribute.</p>
</cell>
<cell class="c6">
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- anchor link tooltips with the att attribute -->
<a att href="https://barecss.com">BareCSS</a>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- forms -->
<section id="forms">
<div class="sub-heading">
<h2>Forms</h2>
</div>
<p>Nothing special here, replacing the often ugly browser defaults with some BareCSS style. Just note that you need
to place the <code>label</code> tag directly after the <code>radio</code> and <code>checkbox</code> inputs. Text
inputs and select boxes are default to 100% width as you'll most likely use them in a grid.</p>
<label>Username</label>
<input type="text" placeholder="username">
<label>Password</label>
<input type="password" placeholder="password">
<label>Comment</label>
<textarea placeholder="comment"></textarea>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><label>Username</label>
<input type="text" placeholder="username">
<label>Password</label>
<input type="password" placeholder="password">
<label>Comment</label>
<textarea placeholder="comment"></textarea></code></pre>
<!-- /code -----------------------------------------------------// -->
<select>
<option disabled selected>Select an option</option>
<option>Option One</option>
<option>Option Two</option>
<option>Option Three</option>
</select>
<row>
<div col="1/2" fx>
<p><input type="checkbox" id="checkbox-1"> <label for="checkbox-1">Checkbox 1</label><br><input type="checkbox"
id="checkbox-2"> <label for="checkbox-2">Checkbox 2</label></p>
</div>
<div col="1/2" fx>
<p><input type="radio" name="radio" id="radio-1"> <label for="radio-1">Radio 1</label><br><input type="radio"
name="radio" id="radio-2"> <label for="radio-2">Radio 2</label></p>
</div>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- select and option -->
<select>
<option disabled selected>Select an option</option>
<option>Option One</option>
</select>
<!-- checkbox -->
<input type="checkbox" id="checkbox-1"> <label for="checkbox-1">Checkbox 1</label>
<!-- radio -->
<input type="radio" name="radio" id="radio-1"> <label for="radio-1">Radio 1</label><br><input type="radio" name="radio" id="radio-2"> <label for="radio-2">Radio 2</label>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- code -->
<section id="code">
<div class="sub-heading">
<h2>Code</h2>
</div>
<p>The <code>code</code> tag functionality has been kept basic as you'll most likely be using something like <a
href="http://prismjs.com">PrismJS</a> for syntax highlighting and code escaping.</p>
<p>Here is some <code>inline</code> code.</p>
<pre><code>if ( to_be || !to_be ) {
that = theQuestion;
}</code></pre>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- inline code -->
<code>code</code>
<!-- pre code -->
<pre><code>Code line 1
Code line 2
Code line 3</code></pre>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- blockquote -->
<section id="blockquote">
<div class="sub-heading">
<h2>Blockquote</h2>
</div>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui
sagittis. In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod
semper, magna diam porttitor mauris.</p>
<p txt="r"><i>- Lorem Ipsum</i></p>
</blockquote>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><blockquote>
<p>Quote goes here.</p>
<p txt="r">
<i>- Said Someone</i>
</p>
</blockquote></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- lists -->
<section id="lists">
<div class="sub-heading">
<h2>Lists</h2>
</div>
<p>As long as the <code>ul</code> or <code>ol</code> tag is classless or has the <code>xx</code> attribute the
styles should apply to the child <code>li</code> elements too.</p>
<row>
<cell class="c6">
<ul>
<li>Unordered list item one</li>
<li>Unordered list item two</li>
<li>Unordered list item three with nest list:
<ul>
<li>Nested item one</li>
<li>Nested item two</li>
</ul>
</li>
<li>Unordered list item four</li>
</ul>
</cell>
<cell class="c6">
<ol>
<li>Ordered list item one</li>
<li>Ordered list item two</li>
<li>Ordered list item three with nest list:
<ol>
<li>Nested item one</li>
<li>Nested item two</li>
</ol>
</li>
<li>Ordered list item four</li>
</ol>
</cell>
</row>
</section>
<!-- table -->
<section id="tables">
<div class="sub-heading">
<h2>Tables</h2>
</div>
<p>The tables are just your standard <code>table</code> element with <code>thead</code>, <code>tbody</code>,
<code>tr</code>, <code>th</code> and <code>td</code> elements within. As long as the <code>table</code> tag is
classless or with the <code>xx</code> attribute, the styles should apply to the child elements.</p>
<p>When the user hovers over the head row, the relevant column will be highlighted. Any other row and the entire row
will be highlighted.</p>
<table>
<thead>
<tr>
<th>Title one</th>
<th>Title two</th>
<th>Title three</th>
<th>Title four</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1 col 1</td>
<td>Row 1 col 2</td>
<td>Row 1 col 3</td>
<td>Row 1 col 4</td>
</tr>
<tr>
<td>Row 2 col 1</td>
<td>Row 2 col 2</td>
<td>Row 2 col 3</td>
<td>Row 2 col 4</td>
</tr>
<tr>
<td>Row 3 col 1</td>
<td>Row 3 col 2</td>
<td>Row 3 col 3</td>
<td>Row 3 col 4</td>
</tr>
<tr>
<td>Row 4 col 1</td>
<td>Row 4 col 2</td>
<td>Row 4 col 3</td>
<td>Row 4 col 4</td>
</tr>
</tbody>
</table>
</section>
<!-- Address -->
<section id="address">
<div class="sub-heading">
<h2>Address</h2>
</div>
<p>These are 2 addresses:</p>
<row>
<cell class="c6">
<address>
A-01, Somewhere in jungle,
Jumanji Land,
Hollywood
</address>
</cell>
<cell class="c6">
<address>
A-01, Somewhere in jungle,
Jumanji Land,
Hollywood
</address>
</cell>
</row>
</section>
<!-- the grid -->
<section id="grid">
<div class="sub-heading">
<h2>The grid</h2>
</div>
<p>Getting a classless grid system means using the <em>very</em> non-standards compliant but totally working
<code>grid</code> element. Actually supported in IE9+.</p>
<p>The BareCSS grid is simple and succinct. It's also fully responsive so that's nice. Just use the
<code>grid</code> element and throw some <code>div</code>s with <code>col</code> attributed children in there and
you're good. No need for <code>row</code> as the <code>col</code>s will wrap around.</p>
<p>Since there are no rows, column widths are expressed in fractions which should make identifying rows easier. Eg:
<code>1/3</code> and <code>2/3</code> make a row.
<p><em>Note that each column in this grid will be 100% width on a mobile device.</em></p>
<row>
<cell class="c2">
<div class="grid-example"><b>.c2</b></div>
</cell>
<cell class="c10">
<div class="grid-example"><b>.c10</b></div>
</cell>
<cell class="c3">
<div class="grid-example"><b>.c3</b></div>
</cell>
<cell class="c9">
<div class="grid-example"><b>.c9</b></div>
</cell>
<cell class="c4">
<div class="grid-example"><b>.c4</b></div>
</cell>
<cell class="c8">
<div class="grid-example"><b>.c8</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>.c6</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>.c6</b></div>
</cell>
<cell class="c12">
<div class="grid-example"><b>.c12</b></div>
</cell>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- no need for rows, grid will act as both row and container -->
<row>
<cell class="c4"></cell>
<cell class="c8"></cell>
<!-- new row -->
<cell class="c6"></cell>
<cell class="c6"></cell>
</row>
</code></pre>
<!-- /code -----------------------------------------------------// -->
<hr><!-- fixed grids -->
<row>
<cell class="c4">
<h4>Fixed grids for mobile</h4>
<p>The grid columns will automatically expand to 100% width when the viewport reaches the <code>@mobile</code>
width. To prevent this, add the <code>fx</code> attribute to the column.</p>
</cell>
<cell class="c8">
<row>
<cell class="c4">
<div class="grid-example"><b>.c4</b></div>
</cell>
<cell class="c8">
<div class="grid-example"><b>.c8</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>.c6</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>.c6</b></div>
</cell>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- adding fx to the col will retain width on mobile -->
<row>
<cell class="c4"></cell>
<cell class="c8"></cell>
</row>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
<hr><!-- nested grids -->
<row>
<cell class="c4">
<h4>Nested grids</h4>
<p>You can place a <code>grid</code> inside of <code>col</code> to nest grids. You can do this as many times
as you like.</p>
</cell>
<cell class="c8">
<row>
<cell class="c6">
<div class="grid-example"><b>1/2</b></div>
</cell>
<cell class="c6">
<row>
<cell class="c12">
<div class="grid-example"><b>1/1</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>1/2</b></div>
</cell>
<cell class="c6">
<div class="grid-example"><b>1/2</b></div>
</cell>
</row>
</cell>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- you can nest a grid inside a col -->
<row>
<cell class="c6"></cell>
<cell class="c6">
<!-- nested grid -->
<row>
<cell col="c12"></cell>
<cell col="c6"></cell>
<cell col="c6"></cell>
</row>
</cell>
</row>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
<hr><!-- grids with horizontal rule -->
<row>
<cell class="c4">
<h4>Grids with horizontal rule</h4>
<p>The examples you are looking at now are all <code>col</code>s within a <code>grid</code> separated by
<code>hr</code>s.</p>
</cell>
<cell class="c8">
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- you can use a hr to separate cols -->
<row>
<cell class="c6"></cell>
<cell class="c6"></cell>
<hr>
<cell class="c6"></cell>
<cell class="c6"></cell>
</row>
</code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- cards -->
<section id="cards">
<div class="sub-heading">
<h2>Cards</h2>
</div>
<p>Cards use the also totally non-compliant <code>card</code> element but works fine in IE9+. These cards are meant
to be used within a grid.</p>
<row>
<cell class="c4">
<card>
<h5>Card one</h5>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</card>
</cell>
<cell class="c4">
<card>
<h5>Card two</h5>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore.</p>
</card>
</cell>
<cell class="c4">
<card>
<h5>Card three</h5>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam.</p>
</card>
</cell>
</row>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- card element -->
<card>
<p>Your content</p>
</card>
<!-- card within a grid -->
<row>
<cell class="c6">
<card>
<h5>Card title</h5>
<hr>
<p>Your content here</p>
</card>
</cell>
<cell class="c6">
<card>
<h5>Card title</h5>
<hr>
<p>Your content here</p>
</card>
</cell>
</row></code></pre>
<!-- /code -----------------------------------------------------// -->
<hr>
<h3>Cards with images</h3>
<row>
<cell class="c4">
<card>
<img src="http://barecss.com/img/sign.jpg">
<h5>Top image</h5>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
</card>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- image at the top -->
<card>
<img src="http://barecss.com/img/sign.jpg" alt="sign">
<h5>Title</h5>
<p>Content goes here</p>
</card></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
<cell class="c4">
<card>
<h5>Middle image</h5>
<img src="http://barecss.com/img/wing.jpg">
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
</card>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- image in the middle -->
<card>
<h5>Title</h5>
<img src="http://barecss.com/img/sign.jpg" alt="sign">
<p>Content goes here</p>
</card></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
<cell class="c4">
<card>
<h5>Bottom image</h5>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
<img src="http://barecss.com/img/sign.jpg">
</card>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- image at the bottom -->
<card>
<h5>Title</h5>
<p>Content goes here</p>
<img src="http://barecss.com/img/sign.jpg" alt="sign">
</card></code></pre>
<!-- /code -----------------------------------------------------// -->
</cell>
</row>
</section>
<!-- utility attributes -->
<section id="utility-attributes">
<div class="sub-heading">
<h2>Utility attributes</h2>
</div>
<p>BareCSS has a few utility attributes to make laying out a site a little faster. Sometimes you don't need to give
an element a unique class to make it's text align right. Use these attributes to apply quick styles such as
paddings or margins.</p>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Values</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>full</code></td>
<td>null</td>
<td>Width 100%</td>
</tr>
<tr>
<td><code>hide</code></td>
<td>null</td>
<td>Display none</td>
</tr>
<tr>
<td><code>fs</code></td>
<td><code>xs</code> <code>s</code> <code>m</code> <code>l</code> <code>xl</code></td>
<td>Sets font sizes from 1.1rem to 2.4rem</td>
</tr>
<tr>
<td><code>mt</code></td>
<td><code>0</code> <code>2</code> <code>4</code> <code>8</code></td>
<td>Sets margin-top from 0 to 8rem</td>
</tr>
<tr>
<td><code>mb</code></td>
<td><code>0</code> <code>2</code> <code>4</code> <code>8</code></td>
<td>Sets margin-bottom from 0 to 8rem</td>
</tr>
<tr>
<td><code>pt</code></td>
<td><code>0</code> <code>2</code> <code>4</code> <code>8</code></td>
<td>Sets padding-top from 0 to 8rem</td>
</tr>
<tr>
<td><code>pb</code></td>
<td><code>0</code> <code>2</code> <code>4</code> <code>8</code></td>
<td>Sets padding-bottom from 0 to 8rem</td>
</tr>
<tr>
<td><code>pa</code></td>
<td><code>0</code> <code>2</code></td>
<td>Either removes all padding or sets padding for all sides to 2rem</td>
</tr>
<tr>
<td><code>txt</code></td>
<td><code>l</code> <code>c</code> <code>r</code> <code>j</code></td>
<td>Set's text alignment to left, centre, right or justify</td>
</tr>
</tbody>
</table>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- margin top 2rem + margin bottom 4rem -->
<div mt="2" mb="4"></div>
<!-- padding all 2rem -->
<p pa="2"></p>
<!-- text align right + font size small -->
<p txt="r" fs="s"></p></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<!-- footer -->
<section id="footer">
<div class="sub-heading">
<h2>Footer</h2>
</div>
<p>If you need a footer, just use the <code>footer</code> element. No need to place it inside a <code>section</code>
as the contents will already be contained by default.</p>
<p><em>Note: footer is not sticky, if you want a sticky footer, you'll need to implement it yourself.</em></p>
<!-- code -------------------------------------------------------- -->
<pre class="language-markup"><code class="esc"><!-- the footer background will expand to 100% of viewport but contents will be contained to standard width -->
<footer>
<row>
<cell class="c6">
<p>Created by <a att href="http://www.longsien.com" target="_blank">Long Sien</a></p>
</cell>
<cell class="c6 right">
<a att href="https://github.com/longsien/BareCSS" target="_blank">
<img class="github-icon" src="http://barecss.com/img/github.svg">
</a>
</cell>
</row>
</footer></code></pre>
<!-- /code -----------------------------------------------------// -->
</section>
<footer>
<row>
<cell class="c9">
<p>Created by <a att href="http://www.longsien.com" target="_blank">Long Sien</a></p>
</cell>
<cell class="c3 right">
<a att href="https://github.com/longsien/BareCSS" target="_blank">
<img class="github-icon" src="http://barecss.com/img/github.svg"></a>
</cell>
</row>
</footer>
</body>
</html>