JSFiddle - React, Tailwind, and code Playground
by cahnory
HTML
<header role="banner">
<h1 class="brand">
<a href="#homeUri" title="A11y : HTML Boilerplate for Accessibility"><!-- Set title to match targeted document's title -->
<strong class="trademark">A11y</strong>
<span class="baseline">HTML Boilerplate for Accessibility</span>
<img class="logo" src="img/logo.gif" alt="A11y's logo" width="148" height="105">
</a>
</h1>
<!-- Primary navigation -->
<nav role="navigation" id="navigation">
<input id="navigation-state" type="checkbox" aria-hidden="true">
<label for="navigation-state" aria-hidden="true" class="toggle"></label>
<ul class="menu">
<li class="skip"><a href="#main">Page content</a></li>
<li><a href="#">Home</a></li>
<li><a href="#">Section</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<section role="main" id="main">
<h1>Content primary heading</h1>
<p>
Some introduction text…
</p>
<h2>Secondary heading</h2>
<p>
Some content…
</p>
</section>
<a href="#navigation">Navigation</a>
<footer>
<section role="contentinfo">
© 2012 A11y
</section>
</footer>
CSS
html, body {
margin: 0;
padding: 0;
}
html {
font-size: 62.5%;
}
body {
font: 16px/1.5 Arial, sans-serif;
font-size: 1.6rem;
}
/**
* !Brand
*
* Image (logo) as a replacement for trademark & baseline
*
* @see .trademark, .baseline -> !Hidden for eyes
*/
.brand, .logo { position: relative }
/**
* !Hidden for eyes
*
* Hide the content for eyes but still
* but visible for text browsers & crawlers
*/
.trademark, .baseline,
.skip {
height: 1px;
overflow: hidden;
position: absolute;
width: 1px;
}
/**
* Navigation
*
* For small screen
*
*/
#navigation-state, nav .toggle { display: none }
@media (max-width: 1024px) {
body {
margin-left: 57px;
}
.menu, nav .toggle {
bottom: 0;
display: block;
left: 0;
overflow: hidden;
margin: 0;
padding: 0;
position: absolute; position: fixed; /* Fixed if possible */
top: 0;
width: 0;
}
.menu {
background: #FFF;
background: rgba(255,255,255,.9);
padding-right: 57px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
:checked ~ .menu {
width: 100%;
}
nav .toggle {
background: rgba(127,127,127,.2);
line-height: 57px;
text-align: center;
width: 57px;
z-index: 1;
}
:checked ~ .toggle {
left: 100%;
margin-left: -57px;
}
nav .toggle:after {
content: '▶';
}
:checked ~ .toggle:after {
content: '◀';
}
.menu a {
border-bottom: 1px solid rgba(127,127,127,.2);
display: block;
padding: 9px 19px 10px;
line-height: 38px;
}
/* deco */
.menu {
-webkit-transition: all .4s;
-moz-transition: all .4s;
transition: all .4s;
}
:checked ~ .menu {
-webkit-filter: brightness(0);
filter: brightness(0);
}
.menu, .toggle:active ~ .menu {
-webkit-filter: brightness(-.4);
filter: brightness(-.4);
}
nav .toggle {
background-image:...