Friends, can i use css as a nested functions and how to get the current css properties of element like as follow
.button1:active
{
#button2
{
width:width+20px;
}
}
Friends, can i use css as a nested functions and how to get the current css properties of element like as follow
.button1:active
{
#button2
{
width:width+20px;
}
}
Not with standard CSS.
You can do.
.button1:active #button2 {
width:20px;
}
However you can in LESS, SASS or SCSS.
With LESS you could do.
@elementWidth: 20px;
.button1:active {
#button2 {
width: @elementWidth + 20px; //Resulting width would be 40px
}
}
width:width+20px; is invalid CSS declaration.You can write like:
.button1:active #button2{
width:20px;
}