What is the best way to change the Paper-radio-button to look like a traditional radio button?

When it comes to paper-input, there is an alternative called iron input for achieving a more traditional design. Is there a similar alternative for radio buttons in order to make them resemble standard radio buttons? If so, I would appreciate any guidance on this matter.

Answer №1

It seems that customizing the <paper-radio-button> component is not straightforward. The element itself is made up of <div> elements, rather than a native radio button, and has limited CSS properties for customization. Unfortunately, these properties do not allow for disabling Material Design styles.

One alternative approach is to use the native radio button in conjunction with iron-input:

<input type="radio" is="iron-input">

HTMLImports.whenReady(() => {
  Polymer({
    is: 'x-foo'
  });
});
<head>
  <base href="https://polygit.org/polymer+1.7.1/components/">
  <script src="webcomponentsjs/webcomponents-lite.min.js"></script>
  <link rel="import" href="polymer/polymer.html">
  <link rel="import" href="iron-input/iron-input.html">
</head>
<body>
  <x-foo></x-foo>

  <dom-module id="x-foo">
    <template>
      <label>
        <input type="radio" is="iron-input">
        option 1
      </label>
    </template>
  </dom-module>
</body>

View example on CodePen

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with Bootstrap dropdown not appearing properly when switching between screen sizes

I am currently working on converting a side navigation in bootstrap to a dropdown when the window is resized. However, I am experiencing an issue between the medium and small screen sizes where for a few pixels, nothing is shown. The side navigation disapp ...

When three floated divs are placed within a container of fixed width, one of the divs will drop down to the next line once all three divs reach

Confusing title, but I couldn't find a better way to explain it. The issue I'm facing is having 3 boxes in a row with only a 1px border on each side, but for some reason, the far right one has a 2px border. How can I fix this? Take a look at the ...

Exploring query options in jQuery for searching text using the :contains selector

Why is the if statement below not giving me the expected results? Every time it just turns the paragraph yellow, even when the word doesn't match the :contains expression. Here's the query I'm using. $(document).ready(function() { if ($ ...

Introduction to Flask with GAE (blank Firefox tab)

Recently, I completed the Getting Started with Flask on App Engine Standard Environment tutorial. If you are interested, you can find the source code here. During my testing using Firefox and Chrome, I noticed that both browsers did not render the HTML te ...

Leveraging Javascript within MVC3, either on a master page or child page

I'm currently developing a web application utilizing MVC3 and I am curious about the best practices for incorporating JavaScript. Specifically, I am uncertain about whether to include JavaScript in the master page as well as in individual child pages. ...

Switch between two PHP files with a toggle feature using jQuery click event

Need help with toggling between two PHP files - cab.php and d3.php. Toggling within the same file works fine, but encountering issues when trying to toggle from one file to another. function botaod2mostraesconde() { $(".wrapd2").toggle(); $( ...

Efficiently utilizing CSS classes

My dilemma involves styling a textfield in two different locations on my website, each with its own parent element. The second location requires an additional margin-top that the first does not. What is a clever way to adjust the original margin-top withou ...

I am looking for a way to create a fixed bottom navbar that evenly spreads out the links across the entire width of the screen. It should also be responsive

:) I'm experimenting with my fixed bottom navbar in bootstrap.. It's working to some extent.. But unfortunately, the links in my navbar won't justify.. I've tried everything I can think of.. I want it to be responsive so the current ...

Tips for combining dvloading and required functionalities on the submit button

My form has 2 fields that must be filled out, and I used the required attribute to enforce this rule. Enter A:<input type="text" name="a" required><br> Enter B:<input type="text" name="b" required><br> <button type="submit" cl ...

Utilizing AngularJS to submit a form with dynamic fields

Challenge: I encounter an issue while trying to submit data in form B. The main obstacle is that all the fields within form B are displayed in a loop, making it difficult to assign specific names to each field. Snippet of HTML Code for form B <form id ...

Redirecting and styling following an HTTP post operation

Implementing Stripe on my Firebase-hosted website. Utilizing a Cloud Function to handle the transaction. I have integrated the Stripe Checkout within a button displayed directly on my single HTML page, which then directs to the /charge function in inde ...

Is there a way to incorporate animation while calculating a number?

I am looking to add some special animation effects to the number in this script, but I am not sure how to achieve that. $('#choose').change(function() { if($(this).val() == '1') { document.getElementById('harga&ap ...

How can we use a :before tag element to create a hovering effect on an image that remains clickable?

My objective is to create an image that is wrapped in a link. The link will have a pseudo element :before that adds a black overlay on hover. I want the image to remain clickable, but no matter what I try, the pseudo element won't position correctly o ...

Difficulty with collapsing and expanding levels in Bootstrap 4 sidebar navigation

Having some trouble with my vertical Nav created using bootstrap 4. I have 2 levels of lists, but when I click on one dropdown, the other dropdown doesn't close. Here is a link to the issue: https://jsfiddle.net/thilanka/cr0Lfmd1 <ul class="na ...

What is the best way to create a Table with a Scroll feature and a fixed Header using CSS code, ensuring it looks sleek and functional across all devices, including smartphones?

I needed a CSS code for my Asp.Net Core Code that would apply to multiple tables. The desired style should include a fixed table header with a scrollable body, ensuring alignment between rows and columns. Despite trying various alternatives, I couldn' ...

Deactivate the attribute in the media query

I made some website with pure html/css. I defined overflow-y: scroll to some element when browser is full screen. But when screen's width is less than 400px, I want to disable that. (like, overflow-y: none. But overflow-y doesn't have none) Is ...

Refreshing Div Element with PHP AJAX POST请求

It's me again. I'm feeling really frustrated with this code, it's starting to get on my nerves. I don't mean to keep bothering you, but I finally figured out where the issue was in the code and now I just need a little help with the fin ...

NodeJS is facing a severe challenge in properly rendering HTML and its accompanying CSS code, causing a major

Once upon a time, I built a beautiful website while practicing HTML, CSS, and JS. It had multiple web pages and used Express for the backend. Unfortunately, I lost all the files associated with it and took a break from web programming for some time. Now, w ...

Is it possible to leverage the flex features of react-native in a manner similar to the row/column system of

Is it a good idea to utilize flex in react native by creating custom components that retrieve flex values? I previously used the bootstrap grid system and now I am exploring react native. Is there a way to implement this example using react-native bootstr ...

The HTML page is failing to call the function in the JavaScript application

I recently started taking a YouTube Javascript course on chapter 34 titled "Make start button work" Javascript tutorial My HTML, CSS, and Javascript files are all located in the same folder. I am using VS Code along with the Live Server extension for codi ...