Skip to content

Instantly share code, notes, and snippets.

@radmar
Created December 1, 2012 17:58
Show Gist options
  • Select an option

  • Save radmar/4183603 to your computer and use it in GitHub Desktop.

Select an option

Save radmar/4183603 to your computer and use it in GitHub Desktop.

Revisions

  1. radmar revised this gist Dec 2, 2012. 2 changed files with 10 additions and 14 deletions.
    15 changes: 6 additions & 9 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    visibility: hidden;
    }

    .switch, switch-content {
    .switch-content {

    /*-webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    @@ -16,7 +16,7 @@
    transition: all 500ms ease-in-out;
    }

    .switch-viewport {
    .switch {
    display: inline-block;
    height: 30px;
    overflow: hidden;
    @@ -27,18 +27,15 @@
    line-height: 30px;
    }

    .switch {
    .switch-content {
    height: 200%;
    position: relative;
    width: auto;
    display: inline-block;
    color: white
    }

    .switch-button {
    }

    .switch-content {
    .switch-content-checked, .switch-content-unchecked {
    /*background: rgba(157, 38, 29, 0.5);*/
    cursor: pointer;
    display: block;
    @@ -49,5 +46,5 @@
    }


    .switch-toggle:checked + .switch-viewport > .switch { top: 0; background-color: green;}
    .switch-toggle + .switch-viewport > .switch { top: -100%; background-color: red;}
    .switch-toggle:checked + .switch > .switch-content { top: 0; background-color: green;}
    .switch-toggle + .switch > .switch-content { top: -100%; background-color: red;}
    9 changes: 4 additions & 5 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,9 @@
    <!-- content to be placed inside <body>…</body> -->

    <input type="checkbox" id="check1" class="switch-toggle" />
    <label class="switch-viewport" for="check1">
    <div class="switch">
    <div class="switch-button"><!-- --></div>
    <div class="switch-content switch-content-checked">Enabled</div>
    <div class="switch-content switch-content-unchecked">Disabled</div>
    <label class="switch" for="check1">
    <div class="switch-content">
    <div class="switch-content-checked">Enabled</div>
    <div class="switch-content-unchecked">Disabled</div>
    </div>
    </label>
  2. radmar revised this gist Dec 2, 2012. 2 changed files with 16 additions and 13 deletions.
    17 changes: 10 additions & 7 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -2,12 +2,12 @@
    * Checkbox alternative UI
    */

    .slider-toggle {
    .switch-toggle {
    display: none;
    visibility: hidden;
    }

    .slider, slider-content {
    .switch, switch-content {

    /*-webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    @@ -16,7 +16,7 @@
    transition: all 500ms ease-in-out;
    }

    .slider-viewport {
    .switch-viewport {
    display: inline-block;
    height: 30px;
    overflow: hidden;
    @@ -27,15 +27,18 @@
    line-height: 30px;
    }

    .slider {
    .switch {
    height: 200%;
    position: relative;
    width: auto;
    display: inline-block;
    color: white
    }

    .slider-content-checked, .slider-content-unchecked {
    .switch-button {
    }

    .switch-content {
    /*background: rgba(157, 38, 29, 0.5);*/
    cursor: pointer;
    display: block;
    @@ -46,5 +49,5 @@
    }


    .slider-toggle:checked + .slider-viewport > .slider { top: 0; background-color: green;}
    .slider-toggle + .slider-viewport > .slider { top: -100%; background-color: red;}
    .switch-toggle:checked + .switch-viewport > .switch { top: 0; background-color: green;}
    .switch-toggle + .switch-viewport > .switch { top: -100%; background-color: red;}
    12 changes: 6 additions & 6 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    <!-- content to be placed inside <body>…</body> -->

    <input type="checkbox" id="check1" class="slider-toggle" />
    <label class="slider-viewport" for="check1">
    <div class="slider">
    <div class="slider-button"></div>
    <div class="slider-content-checked">Enabled</div>
    <div class="slider-content-unchecked">Disabled</div>
    <input type="checkbox" id="check1" class="switch-toggle" />
    <label class="switch-viewport" for="check1">
    <div class="switch">
    <div class="switch-button"><!-- --></div>
    <div class="switch-content switch-content-checked">Enabled</div>
    <div class="switch-content switch-content-unchecked">Disabled</div>
    </div>
    </label>
  3. radmar revised this gist Dec 2, 2012. 2 changed files with 5 additions and 4 deletions.
    2 changes: 1 addition & 1 deletion dabblet.css
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@
    color: white
    }

    .slider-content {
    .slider-content-checked, .slider-content-unchecked {
    /*background: rgba(157, 38, 29, 0.5);*/
    cursor: pointer;
    display: block;
    7 changes: 4 additions & 3 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,9 @@

    <input type="checkbox" id="check1" class="slider-toggle" />
    <label class="slider-viewport" for="check1">
    <div class="slider">
    <div class="slider-content">Enabled</div>
    <div class="slider-content">Disabled</div>
    <div class="slider">
    <div class="slider-button"></div>
    <div class="slider-content-checked">Enabled</div>
    <div class="slider-content-unchecked">Disabled</div>
    </div>
    </label>
  4. radmar revised this gist Dec 2, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dabblet.css
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@
    height: 50%;
    width: auto;
    text-align: center;
    padding: 0 5%;
    padding: 0 5px;
    }


  5. radmar revised this gist Dec 2, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    <!-- content to be placed inside <body>…</body> -->

    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <input type="checkbox" id="check1" class="slider-toggle" />
    <label class="slider-viewport" for="check1">
    <div class="slider">
    <div class="slider-content">Enabled</div>
    <div class="slider-content">Disabled</div>
  6. radmar revised this gist Dec 2, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    */

    .slider-toggle {
    /*display: none;
    visibility: hidden;*/
    display: none;
    visibility: hidden;
    }

    .slider, slider-content {
  7. radmar revised this gist Dec 2, 2012. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    */

    .slider-toggle {
    display: none;
    visibility: hidden;
    /*display: none;
    visibility: hidden;*/
    }

    .slider, slider-content {
    @@ -16,8 +16,7 @@
    transition: all 500ms ease-in-out;
    }

    .slider-viewport {

    .slider-viewport {
    display: inline-block;
    height: 30px;
    overflow: hidden;
    @@ -33,6 +32,7 @@
    position: relative;
    width: auto;
    display: inline-block;
    color: white
    }

    .slider-content {
    @@ -46,5 +46,5 @@
    }


    .slider-toggle + .slider-viewport > .slider { top: 0; background-color: green; color: white}
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; background-color: red;}
    .slider-toggle:checked + .slider-viewport > .slider { top: 0; background-color: green;}
    .slider-toggle + .slider-viewport > .slider { top: -100%; background-color: red;}
  8. radmar revised this gist Dec 2, 2012. 2 changed files with 4 additions and 4 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,10 @@

    .slider, slider-content {

    -webkit-transition: all 500ms ease-in-out;
    /*-webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;*/
    transition: all 500ms ease-in-out;
    }

    4 changes: 2 additions & 2 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <div class="slider">
    <div class="slider-content checked"><span>Enabled</span></div>
    <div class="slider-content"><span>Disabled</span></div>
    <div class="slider-content">Enabled</div>
    <div class="slider-content">Disabled</div>
    </div>
    </label>
  9. radmar revised this gist Dec 2, 2012. 1 changed file with 6 additions and 11 deletions.
    17 changes: 6 additions & 11 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    visibility: hidden;
    }

    .slider {
    .slider, slider-content {

    -webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    @@ -17,25 +17,20 @@
    }

    .slider-viewport {
    /* Uncomment the border-radius and border declaration to see the webkit bug in Chrome or Safari */
    /*border-radius: 10px; border: 1px solid black;*/
    /*-moz-border-radius: 50px;*/

    display: inline-block;
    height: 30px;
    line-height: 30px;
    height: 30px;
    overflow: hidden;
    /*width: 300px*/
    width: auto;
    position: relative;
    margin: 0;
    cursor: pointer;
    cursor: pointer;
    line-height: 30px;
    }

    .slider {
    /*height: 100%;*/
    .slider {
    height: 200%;
    position: relative;
    /*width: 200%; */
    width: auto;
    display: inline-block;
    }
  10. radmar revised this gist Dec 2, 2012. 2 changed files with 10 additions and 10 deletions.
    16 changes: 8 additions & 8 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -7,13 +7,13 @@
    visibility: hidden;
    }

    .slider-content {
    .slider {

    -webkit-transition: all 1500ms ease-in-out;
    -moz-transition: all 1500ms ease-in-out;
    -ms-transition: all 1500ms ease-in-out;
    -o-transition: all 1500ms ease-in-out;
    transition: all 1500ms ease-in-out;
    -webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out;
    }

    .slider-viewport {
    @@ -51,5 +51,5 @@
    }


    .slider-toggle + .slider-viewport > .slider { top: 0; background-color: #59ffbd;}
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; background-color: #ff4f51;}
    .slider-toggle + .slider-viewport > .slider { top: 0; background-color: green; color: white}
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; background-color: red;}
    4 changes: 2 additions & 2 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@

    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <div class="slider">
    <div class="slider-content"><span>Disabled</span></div>
    <div class="slider">
    <div class="slider-content checked"><span>Enabled</span></div>
    <div class="slider-content"><span>Disabled</span></div>
    </div>
    </label>
  11. radmar revised this gist Dec 2, 2012. 2 changed files with 8 additions and 10 deletions.
    16 changes: 7 additions & 9 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -9,11 +9,11 @@

    .slider-content {

    -webkit-transition: background-color 1500ms ease-in-out;
    -moz-transition: background-color 1500ms ease-in-out;
    -ms-transition: background-color 1500ms ease-in-out;
    -o-transition: background-color 1500ms ease-in-out;
    transition: background-color 1500ms ease-in-out;
    -webkit-transition: all 1500ms ease-in-out;
    -moz-transition: all 1500ms ease-in-out;
    -ms-transition: all 1500ms ease-in-out;
    -o-transition: all 1500ms ease-in-out;
    transition: all 1500ms ease-in-out;
    }

    .slider-viewport {
    @@ -51,7 +51,5 @@
    }


    .slider-toggle + .slider-viewport > .slider { top: 0; }
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; }
    .slider-toggle + .slider-viewport > .slider .slider-content { background-color: #ff4f51; }
    .slider-toggle:checked + .slider-viewport > .slider .slider-content.checked { background-color: #59ffbd; }
    .slider-toggle + .slider-viewport > .slider { top: 0; background-color: #59ffbd;}
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; background-color: #ff4f51;}
    2 changes: 1 addition & 1 deletion settings.json
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
    {"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
  12. radmar revised this gist Dec 2, 2012. 1 changed file with 9 additions and 10 deletions.
    19 changes: 9 additions & 10 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -7,14 +7,13 @@
    visibility: hidden;
    }

    .slider-content,
    .slider {
    .slider-content {

    -webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out;
    -webkit-transition: background-color 1500ms ease-in-out;
    -moz-transition: background-color 1500ms ease-in-out;
    -ms-transition: background-color 1500ms ease-in-out;
    -o-transition: background-color 1500ms ease-in-out;
    transition: background-color 1500ms ease-in-out;
    }

    .slider-viewport {
    @@ -43,8 +42,6 @@

    .slider-content {
    /*background: rgba(157, 38, 29, 0.5);*/

    background-color: #ff4f51;
    cursor: pointer;
    display: block;
    height: 50%;
    @@ -53,6 +50,8 @@
    padding: 0 5%;
    }

    .checked { background-color: #59ffbd; }

    .slider-toggle + .slider-viewport > .slider { top: 0; }
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; }
    .slider-toggle + .slider-viewport > .slider .slider-content { background-color: #ff4f51; }
    .slider-toggle:checked + .slider-viewport > .slider .slider-content.checked { background-color: #59ffbd; }
  13. radmar revised this gist Dec 1, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    */

    .slider-toggle {
    /*display: none;
    visibility: hidden;*/
    display: none;
    visibility: hidden;
    }

    .slider-content,
  14. radmar revised this gist Dec 1, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dabblet.css
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    /**
    * Checkbox alternative
    * Checkbox alternative UI
    */

    .slider-toggle {
  15. radmar revised this gist Dec 1, 2012. 2 changed files with 3 additions and 3 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    */

    .slider-toggle {
    display: none;
    visibility: hidden;
    /*display: none;
    visibility: hidden;*/
    }

    .slider-content,
    2 changes: 1 addition & 1 deletion dabblet.html
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <div class="slider">
    <div class="slider-content checked"><span>Enabled</span></div>
    <div class="slider-content"><span>Disabled</span></div>
    <div class="slider-content checked"><span>Enabled</span></div>
    </div>
    </label>
  16. radmar revised this gist Dec 1, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@

    .slider-viewport {
    /* Uncomment the border-radius and border declaration to see the webkit bug in Chrome or Safari */
    border-radius: 10px; border: 1px solid black;
    /*border-radius: 10px; border: 1px solid black;*/
    /*-moz-border-radius: 50px;*/
    display: inline-block;
    height: 30px;
    @@ -43,7 +43,7 @@

    .slider-content {
    /*background: rgba(157, 38, 29, 0.5);*/
    border-radius: 7px;

    background-color: #ff4f51;
    cursor: pointer;
    display: block;
  17. radmar revised this gist Dec 1, 2012. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -9,16 +9,17 @@

    .slider-content,
    .slider {
    /*
    -webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out; */}
    transition: all 500ms ease-in-out;
    }

    .slider-viewport {
    /* Uncomment the border-radius and border declaration to see the webkit bug in Chrome or Safari */
    /* border-radius: 50px; border: 5px solid green; */
    border-radius: 10px; border: 1px solid black;
    /*-moz-border-radius: 50px;*/
    display: inline-block;
    height: 30px;
    @@ -42,6 +43,7 @@

    .slider-content {
    /*background: rgba(157, 38, 29, 0.5);*/
    border-radius: 7px;
    background-color: #ff4f51;
    cursor: pointer;
    display: block;
    @@ -51,6 +53,6 @@
    padding: 0 5%;
    }

    .checked { background-color: #59bdff; }
    .checked { background-color: #59ffbd; }
    .slider-toggle + .slider-viewport > .slider { top: 0; }
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; }
  18. radmar revised this gist Dec 1, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <div class="slider">
    <div class="slider-content checked"><span>Aktywny</span></div>
    <div class="slider-content"><span>Nieaktywny</span></div>
    <div class="slider-content checked"><span>Enabled</span></div>
    <div class="slider-content"><span>Disabled</span></div>
    </div>
    </label>
  19. radmar created this gist Dec 1, 2012.
    56 changes: 56 additions & 0 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    /**
    * Checkbox alternative
    */

    .slider-toggle {
    display: none;
    visibility: hidden;
    }

    .slider-content,
    .slider {
    /*
    -webkit-transition: all 500ms ease-in-out;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out; */}

    .slider-viewport {
    /* Uncomment the border-radius and border declaration to see the webkit bug in Chrome or Safari */
    /* border-radius: 50px; border: 5px solid green; */
    /*-moz-border-radius: 50px;*/
    display: inline-block;
    height: 30px;
    line-height: 30px;
    overflow: hidden;
    /*width: 300px*/
    width: auto;
    position: relative;
    margin: 0;
    cursor: pointer;
    }

    .slider {
    /*height: 100%;*/
    height: 200%;
    position: relative;
    /*width: 200%; */
    width: auto;
    display: inline-block;
    }

    .slider-content {
    /*background: rgba(157, 38, 29, 0.5);*/
    background-color: #ff4f51;
    cursor: pointer;
    display: block;
    height: 50%;
    width: auto;
    text-align: center;
    padding: 0 5%;
    }

    .checked { background-color: #59bdff; }
    .slider-toggle + .slider-viewport > .slider { top: 0; }
    .slider-toggle:checked + .slider-viewport > .slider { top: -100%; }
    9 changes: 9 additions & 0 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <!-- content to be placed inside <body>…</body> -->

    <input type="checkbox" id="1" class="slider-toggle" />
    <label class="slider-viewport" for="1">
    <div class="slider">
    <div class="slider-content checked"><span>Aktywny</span></div>
    <div class="slider-content"><span>Nieaktywny</span></div>
    </div>
    </label>
    1 change: 1 addition & 0 deletions dabblet.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    // alert('Hello world!');
    1 change: 1 addition & 0 deletions settings.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}