cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <!-- http://adrianroselli.com/2017/05/under-engineered-custom-radio-buttons-and-checkboxen.html -->

<main>
  <h1>Emoji Forms!</h1>
  <form action="#" autocomplete="off">
    <h2>Please fill out the things.</h2>
     <fieldset>
      <legend>Send Me Spam </legend>
      <div>
        <input type="radio" name="spam" id="spamY" checked> <label for="spamY">Please send me all the spam.</label>
      </div>
      <div>
        <input type="radio" name="spam" id="spamN"> <label for="spamN">Please send it to my neighbor.</label>
      </div>
    </fieldset>
    <div>
      <input type="checkbox" name="terms" id="terms"> <label for="terms">I have read your terms and they make no sense.</label>
    </div>
    <div>
      <input type="reset" value="Break all my effort.">
      <input type="submit" value="Post this thing">
    </div>
  </form>
</main>

            
          
!
            
              /* http://adrianroselli.com/2017/05/under-engineered-custom-radio-buttons-and-checkboxen.html */

@import url(https://fonts.googleapis.com/css?family=Lato:400,700);

body {
  background-color: #6D695C;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAACVBMVEUAAAAAAAAAAACDY+nAAAAAA3RSTlMmDQBzGIDBAAAAG0lEQVR42uXIIQEAAADCMHj/0NdkQMws0HEeAqvwAUGJthrXAAAAAElFTkSuQmCC);
  font-size: 100%;
  color: #333;
  font-family: Lato, Arial, sans-serif;
  padding: 0;
  margin: 0;
}

main {
  display: block;
  box-sizing: border-box;
  width: 90%;
  margin: 1em auto;
  padding: 1em 2em;
  color: #000;
  background-color: rgba(204,204,204,.7);
  border: .07em solid rgba(0,0,0,.5);
  border-radius: .5em;
}

/*-- forms --*/

form {
  background-color: #fff;
  padding: 1em 2em;
}

form div {
  box-sizing: border-box;
  position: relative;
}

form > div,
form fieldset > div {
  margin: 1.5em 0;
}

form fieldset > div:first-of-type {
  margin-top: 1em;
}

form fieldset > div:last-of-type {
  margin-bottom: 1em;
}

fieldset {
  border: .1em solid rgba(0, 0, 0, .15);
}

input,
textarea,
select {
  font-size: 100%;
  color: #333;
  font-family: Lato, Arial, sans-serif;
}

input[disabled] + label::after,
input[disabled] + datalist + label::after,
textarea[disabled] + label::after,
select[disabled] + label::after {
  content: " (disabled)";
}

/* Buttons */

input:not([type=radio]):not([type=checkbox])[type=reset] {
  display: none;
}

input:not([type=radio]):not([type=checkbox])[type=submit],
button {
  color: #fff;
  background-color: #00f;
  border: .1em solid #00f;
  border-radius: .2em;
  font-weight: bold;
  padding: .5em;
  text-align: center;
  width: 100%;
  box-shadow: .25em .25em .5em rgba(0, 0, 0, .5);
}

input:not([type=radio]):not([type=checkbox])[type=submit]:focus,
button:focus,
input:not([type=radio]):not([type=checkbox])[type=submit]:hover,
button:hover {
  color: #00f;
  background-color: #fff;
  outline: 0;
}

input:not([type=radio]):not([type=checkbox])[type=submit]:active,
button:active {
  box-shadow: 0 0 .5em rgba(0, 0, 0, .5);
}

/* Radios and checkboxen */

input[type=radio],
input[type=checkbox] {
  position: absolute;
  top: auto;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE 6/7 */
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  white-space: nowrap; /* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */
}

input[type=radio] + label,
input[type=checkbox] + label {
  display: block;
  padding: .5em;
  padding-left: 2em;
  /* text-indent: 0em; */
  max-width: calc(100% - 2em);
  /*margin: -1em 0;*/
}

fieldset > div input[type=radio] + label {
  margin: -1em 0;
}

input[type=radio]:focus + label,
input[type=checkbox]:focus + label {
  color: #00f;
  outline: 1px dotted #00f;
}

input[type=radio] + label:before,
input[type=checkbox] + label:before {
  content: '';
  background: #fff;
  border: .1em solid rgba(0, 0, 0, .75);
  background-color: rgba(255, 255, 255, .8);
  display: block;
  float: left;
  width: .9em;
  height: .9em;
  margin-left: -1.5em;
  margin-top: .1em;
  vertical-align: top;
  cursor: pointer;
  text-align: center;
  -webkit-transition: all .1s ease-out;
  transition: all .1s ease-out;
}

input[type=radio] + label:before {
  border-radius: 100%;
}

input[type=radio]:disabled + label:before,
input[type=checkbox]:disabled + label:before {
  border: .1em solid rgba(0, 0, 0, .1);
  background-color: rgba(0, 0, 0, .1);
}

input[type=radio]:disabled + label,
input[type=checkbox]:disabled + label {
  color: #ccc;
}

input[type=checkbox] + label:before,
input[type=radio] + label:before {
  /*content: '\00d7';*/
  /*content: '\002718';*/
  /*content: '\002715';*/
  /*content: '\0025a0';*/
  content: '๐Ÿ†';
  text-align: center;
  line-height: 1.15;
  color: rgba(0, 0, 255, 0);
}

input[type=radio] + label:before {
  content: '๐Ÿ‘';
}

input[type=checkbox]:checked + label:before,
input[type=radio]:checked + label:before {
  color: rgba(0, 0, 255, 1);
  line-height: .85;
  border-color: rgba(0, 0, 0, .15);
}

            
          
!
999px
Loading ..................

Console