<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>Advanced styling: Task 2</title>

  </head>

  <body>
    <form>
      <fieldset>
        <legend>Who is your favorite pony?</legend>
        <ul>
          <li>
            <label for="pinkie">Pinkie Pie</label>
            <input type="radio" id="pinkie" name="pony" value="pinkie">
          </li>
          <li>
            <label for="rainbow">Rainbow Dash</label>
            <input type="radio" id="rainbow" name="pony" value="rainbow">
          </li>
          <li>
            <label for="twilight">Twilight Sparkle</label>
            <input type="radio" id="twilight" name="pony" value="twilight">
          </li>
        </ul>
      </fieldset>
    </form>
  </body>

</html>
body {
  background-color: #fff;
  color: #333;
  font: 1em / 1.4 Helvetica Neue, Helvetica, Arial, sans-serif;
  padding: 1em;
  margin: 0;
}

* {
  box-sizing: border-box;
}

button,
input,
select {
  font-family: inherit;
  font-size: 100%;
  padding: 0; margin: 0;
}

/* My code from here */

li {
  display: flex;
  margin-top: 10px;
}

label {
  width: 8.5rem;
}

input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid rgb(221, 79, 103);
  border-radius: 50%;
  align-self: center;
  margin-left: 10px;
}

input[type="radio"]::before {
  display: block;
  content: " ";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgb(221, 79, 103);
  font-size: 14px;
  transform: translate(2px, 2px) scale(0);
  transform-origin: center;
  transition: all 0.1s ease-in;
}

input[type="radio"]:checked::before {
  transform: translate(2px, 2px) scale(1);
  transition: all 0.1s ease-in;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.