Search code examples
csswebkit

How to cancel specific one element at external CSS?


enter image description here

It use from external CSS file.(google MDL)

And I want to cancel just -webkit-flex element.
How can I cancel only that line?


Solution

  • Removing A Style

    If you want to remove a single specific style that is being applied to an element, you can simply set that style to an empty string :

    // This would remove your specific style (i.e. -webkit-flex-wrap)
    $('{selector}').css('{style}','');
    

    This should remove the style entirely as mentioned in the documentation :

    Setting the value of a style property to an empty string — e.g. $('#mydiv').css('color', '') — removes that property from an element if it has already been directly applied,

    Setting Its Default

    If you simply want to set it to it's default value, you could setting its value to initial (i.e. display: initial) or you should consider what value you want it to have and use that.

    Consider Overriding

    If you are already using these styles, then it may simply be easier to just override them to define the values you want to use :

    .mdl-navigation {
         display: {your-preferred-value}!important;
    }