1
I wonder if it is possible, in a scenario where the two values were equal. I would do this to advance the writing.
For example, pass HEIGHT
and WIDTH
together: height, width: 50px;
I tried to do this, but it didn’t work... Someone?
1
I wonder if it is possible, in a scenario where the two values were equal. I would do this to advance the writing.
For example, pass HEIGHT
and WIDTH
together: height, width: 50px;
I tried to do this, but it didn’t work... Someone?
3
The most you can do is store the value in a variable:
div {
--size: 30px;
width: var(--size);
height: var(--size);
background: #333;
}
<div></div>
More features will require a pre-processor.
Browser other questions tagged css
You are not signed in. Login or sign up in order to post.
Everything that can be done with these properties is documented here: http://www.w3schools.com/css/css_dimension.asp
– mau humor