]> git.ardis.lu - css-loaders/commitdiff
Add icon-button
authorArdis Lu <ardisglu@gmail.com>
Sun, 6 Feb 2022 01:14:07 +0000 (17:14 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sun, 6 Feb 2022 01:14:07 +0000 (17:14 -0800)
index.html

index cc6c76f701386098c64efcea1488ab89eef08219..41cede69f57832a53e0f124c0462f75e5de7a3a0 100644 (file)
       animation: spin 1s infinite;
     }
 
+    .icon-button {
+      display: inline;
+      height: 24px;
+      width: 24px;
+      margin: 0;
+      padding: 0;
+      border: 0;
+      background: none;
+    }
+
+    .icon-button:hover,
+    .icon-button:focus {
+      cursor: pointer;
+      animation: spin 0.2s linear 1;
+    }
+
     /* Dividers */
 
     @keyframes shiftRight {
       <p>Some p text next to an inline-spinner:
         <span class="inline-spinner"></span>
       </p>
+
+      <p>Inline refresh icon button with rotation on hover or focus:
+        <button aria-label="Refresh" class="icon-button">
+          <svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="#000">
+            <path d="M0 0h24v24H0V0z" fill="none" />
+            <path
+              d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" />
+          </svg>
+        </button>
+      </p>
     </section>
 
     <section>
This page took 0.047625 seconds and 4 git commands to generate.