JSFiddle - React, Tailwind, and code Playground

by J. Albert Bowden

HTML

<article>

    <input type="checkbox" id="read_more" role="button">
    <label for="read_more" onclick="">
        <span>Read More</span>
        <span>Hide This Shit!</span>
    </label>     
      
    <figure>
        <img src="http://genelocklin.com/examples/shared-images/owl-1.jpg" alt="I'm an owl mother fucker!" />
    </figure>

    <section>
    <p>Owls are a group of birds that belong to the order Strigiformes, constituting 200 extant bird of prey species. Most are solitary and nocturnal, with some exceptions (e.g. the Northern Hawk Owl). </p>
    </section>    

    <section>
        <p>Owls hunt mostly small mammals, insects, and other birds, although a few species specialize in hunting fish. They are found in all regions of the Earth except Antarctica, most of Greenland and some remote islands. Though owls are typically solitary, the literary collective noun for a group of owls is a parliament. Owls are characterized by their small beaks and wide faces, and are divided into two families: the typical owls, Strigidae; and the barn-owls, Tytonidae.</p>
        <p>Owls have large forward-facing eyes and ear-holes; a hawk-like beak; a flat face; and usually a conspicuous circle of feathers, a facial disc, around each eye. The feathers making up this disc can be adjusted in order to sharply focus sounds that come from varying distances onto the owls' asymmetrically placed ear cavities. Most birds of prey sport eyes on the sides of their heads, but the stereoscopic nature of the owl's forward-facing eyes permits the greater sense of depth perception necessary for low-light hunting. Although owls have binocular vision, their large eyes are fixed in their sockets — as are those of other birds — so they must turn their entire head to change views. Owls can rotate their heads and necks as much as 270 degrees in either direction. As owls are farsighted, they are unable to see clearly anything within a few centimeters of their eyes. Caught prey can be felt by owls...

SCSS

/*-----------------------------------------------------------------*/
@mixin hidden         { display: none; visibility: hidden; }  
@mixin visible        { display: block; visibility: visible; }  

@mixin visuallyhidden { border: 0; 
                        clip: rect(0 0 0 0); 
                        height: 1px; width: 1px; 
                        margin: -1px; 
                        overflow: hidden; 
                        padding: 0; 
                        position: absolute; }

@mixin cf             { *zoom:1; &:before, &:after {
                        content: ""; display: table; }
                        &:after { clear: both; } }

 @mixin transition    { -webkit-transition: .125s linear;
                           -moz-transition: .125s linear;
                            -ms-transition: .125s linear;
                             -o-transition: .125s linear;
                                transition: .125s linear; }
/*-----------------------------------------------------------------*/

html { 
    background: #fff url(http://genelocklin.com/examples/shared-images/texture/generated.png) 0 0 repeat;
}

* { 
  margin: 0; padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box; }
    
figure{ 
    margin: 0 0 1.3rem 0; 
    @include transition;
    & img {
      max-width: 100%;
      height: auto; } 
}

body { 
    max-width: 480px;
    width: 90%;
    margin: 3em auto; 
    font-size: 75%;
    line-height: 1.3rem;
    font-family: sans-serif;
    position: relative;
    @include cf;
}

p { 
    margin-bottom: 1.3rem;
    &:last-of-type { 
        @include cf;
        & .twitter-share-button { 
            display: block;
            float: left; }
        & .twitter-follow-button { 
            display: block;
            float: right; }
    }
}

section { 
    @include transition;
}

article {
    margin-bottom: 3rem;
    position: relative;
    @include cf;
    & figure...

JavaScript

/* 

css only implementation of "show/hide" using the checkbox hack. 
more info on the hack: http://css-tricks.com/the-checkbox-hack

github repo: https://github.com/GeneLocklin/CSS-Only-Show-Hide
css only version: http://dabblet.com/gist/1822413

More checkbox hotness:
css only toggle: http://jsfiddle.net/genelocklin/LXx5v/
css only slide down panel: http://genelocklin.github.com/css-only-slide-down-panel/

follow: @genelocklin for more awesome shit!

*/





































































//  twitter script
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");