Home › Forums › CSS › Clearing styles applied to IDs/Classes within IDs/Classes sharing the same name › Re: Clearing styles applied to IDs/Classes within IDs/Classes sharing the same name
August 30, 2012 at 3:39 pm
#108729
Member
I just thought of using a mixin in sass/scss which is helpful so far but it assumes you have certain styles applied.
Check this out
@mixin clear($style) {
@if $style == 'clear-all' {
padding:0;
background-image:none;
background-color:transparent;
margin:0;
height:auto;
width:auto;
}
}
#selector
{
.form-item
{
height:470px;
max-width:470px;
width:100%;
float:left;
margin-right:25px;
margin-top:21px;
margin-left:10px;
.form-item
{
@include clear('clear-all');
}
}
}