You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -70,7 +70,7 @@ <h1 class="page-title">404: Page not found</h1>
70
70
<pclass="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <ahref="/">Head back home</a> to try finding it again.</p>
<p>To create a consistent and uniform style with form elements certainly had its limitations in the past and was rather complex to say the least.
111
+
To completely provide styling for the select element is still not possible without using JS. That goes for the file inputs as well. A lot of front-end developers would argue if we should style forms at all as most form elements are not easy to theme. As a result some form UI would not get styled and others would. What you would see most, is styled text inputs and the rest would not get styled.</p>
112
+
113
+
<p>I thought of sharing a style I created for a recent project where I wanted to style radio buttons. A style still close to the orignal UI default style. A outer circle as default and a selected state where the outer circle becomes a small dot in the center and highlighted with a background color. The idea I had was to avoid using any background images and use CSS 3 to create the styles instead.</p>
<p><figure><imgsrc="/assets/images/radios_unstyled.jpg" alt="Radio buttons' default UI look in Firefox"><figcaption>Radio buttons' default UI look in Firefox</figcaption></figure></p>
119
+
120
+
<h2>Styling the radios</h2>
121
+
122
+
<p>Feel free to check the codepen. it relies on transform (scale) and border-radius to create the rounded radio button styles and you need to hide the radio button and style the label instead to make it work. You use the pseudo selector :checked to define the selected style.
123
+
I used sass to compile the CSS but you can view the compiled css as well.</p>
0 commit comments