1
When placing a side navigation icon, I noticed that a piece of it "leaked" out of the expected, which made it behave visually strange in the animation. I put a background-color: red for easy viewing:
But when inspecting the page element, I realized that if I removed a CSS property from the tag <i> he behaves in the way desired:
but if I put height: 0 in my CSS animation occurs in another strange way, besides the element apparently having no more "background":
How can I override the behavior of a single property inherited from tags and higher classes in CSS without losing the others, who can be useful?
Structure of the DOM:
<body>
    <header class="navbar-fixed">
        <nav class="nav-wrapper">
            <div class="row">
                <div class="left col 2s">
                    <i class="fas fa-bars"></i>
                </div>
            </div>
        </nav>
    </header>
    <!-- conteúdo da página -->
</body>




You can put an example, with code?
– Jorge B.
I put the structure of DOM, but I don’t know what else I could put to help
– Arthur Siqueira
basically, the
materialize-csshas a CSS ready for all elements<i>located within a tag<nav>, but I want to remove one of the defined properties and use the full page pattern– Arthur Siqueira
Maybe overwrite the CSS class. Suppose there is a class called
.a { height: 100px; }, declare in another CSS file the same class by changing its properties, e.g..:.a { heigth: unset }. The important thing is that your change is loaded after the original class.– Marcelo Vismari
@Marcelovismari was just that. Put in an answer so I can close the topic ;)
– Arthur Siqueira
@Arthursiqueira also puts the code of that css in the question. In order to create an executable code snippet.
– Jorge B.