I am using Materialize in a project but I don't want it on this particular select element:
<select>
<option value="Male">m</option>
<option value="Female">f</option>
</select>
I think the only way to solve it is to make my own style and apply it to the element but as Materialize is new maybe there is an easier solution.
By the way I am using Symfony3 and every component added in the type.php file is rendered excellent with Materialize, except a ChoiceType. So that's why I want to exclude the Materialize style of the select element. This is the code:
$opcionesLibreDeTalco = array(
'label' => 'Libre de talco',
'choices' => array(
'm' => 'Male',
'f' => 'Female'
)
);
You can now add browser-default
class to sort of undo the effects of Materializecss.
Because we override many of the default browser styles and elements, we provide the
.browser-default
class to revert these elements to their original state.
https://materializecss.com/helpers.html#browser-default
As of Materialize 0.97.7, there's no way to exclude an element because their CSS selectors are very broad with no exclusions.
For example, their scss looks like:
select { background-color: $select-background; width: 100%; padding: $select-padding; border: $select-border; border-radius: $select-radius; height: $input-height; }
You just have to manually override Materialize's styles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With