I'm attempting to revert ul and li elements to their default styles using a specific class, but I'm encountering difficulties in doing so. I've experimented with the inherit
and initial
values, but they haven't proven effective.
This is my current approach:
ul, li {
margin: 0;
padding: 0;
}
What I aim to achieve is to create a class named .list-unset
that resets the child DOM elements to browser defaults rather than inheriting margin: 0
and padding: 0
.
I've made an attempt like this:
.list-unset {
ul, li {
margin: unset;
padding: unset;
}
}
Unfortunately, this approach didn't yield the desired results.