Hello, I have a block with a width of 327 pixels and a height of 486 pixels and, with adaptability, I am looking for this block to read the data value, perhaps there is some property that allows you to inherit the default value of the block in all places where it is written? For example, how is inheritance using inherit from the parent, and I need from the block itself the same Example

block width: 327px это дефолтное значение height: 486px это дефолтное значение @media only screen and (max-width : 992px) .block width: сюда хочу получить дефолтное значение height: сюда хочу получить дефолтное значение @media only screen and (max-width : 768px) .block width: сюда хочу получить дефолтное значение height: сюда хочу получить дефолтное значение 
  • 2
    add an example of your markup and code, it's not entirely clear what you want to end up with - Grundy
  • @Grundy Added an example, I hope that is already more than understandable - LiEm
  • Assign nothing and the default value will be - Grundy
  • @Grundy Yes, I know that there will be a default value, you must understand, I need to carry out calculations, and therefore I must always prescribe the default value! - LiEm
  • What is the connection with the calculations? What kind of calculations? If you do not want to change the value of the block - do not change it, and it will remain as it was. - Grundy

1 answer 1

Just specify

 width: auto; 

And you can read about initial and unset , but in this case it is not required.

  • Unfortunately, it’s impossible to write width: auto * 0.8. Can it be somehow different, so that I could reduce this property by 20%? - LiEm
  • @LiEm, 80% , not? - Qwertiy