Rensselaer Center for Open Source Software

Tabs based off radiobuttons to utilize similar native functionality

6 files changed, 13 lines added, 9 lines removed

Changes

--- static/elements.css 8340d77aa61f4c3497368786ffa2f19f452299f3
+++ static/elements.css 4d68c7e9850cf9c3d26b533381becc81970efca0
@@ -56,17 +56,17 @@
-.tab > button {
+.tab > label {
-.tab > button.current {
-}
-
-.tab > button:hover {
+.tab > label.current {
+}
+
+.tab > label:hover {
--- static/index.html 8340d77aa61f4c3497368786ffa2f19f452299f3
+++ static/index.html 4d68c7e9850cf9c3d26b533381becc81970efca0
@@ -87,7 +87,11 @@
-            <div class='tab'><button class='current'>name</button><button>placement</button><button>colors</button></div>
+            <div class='tab'>
+              <label><input type='radio' name='tab'>name</label>
+              <label><input type='radio' name='tab'>placement</label>
+              <label><input type='radio' name='tab'>colors</label>
+            </div>
--- static/themes/basic.css 8340d77aa61f4c3497368786ffa2f19f452299f3
+++ static/themes/basic.css 4d68c7e9850cf9c3d26b533381becc81970efca0
@@ -31,19 +31,19 @@
-.tab > button {
+.tab > label {
-.tab > button.current {
+.tab > label.current {
-.tab > button:hover {
+.tab > label:hover {
Koala • 68 weeks ago