There is a layout on which in the navigation of the list items are different indents to the left of each other. I set the general class to all elements and through :nth-child for each set the value.

Question: how to get these values ​​of indents for the calc() function in order to rebuild them later through a media query?

  • one
    It is not clear what to get these values ​​for ... Write down those styles in the media that are needed ... Something is not intelligible ... Or the author has no idea what @media and what it is eaten with .. - The Air

1 answer 1

Through js it is possible, or through preprocessors like SASS / LESS .

Example via js :

 document.querySelector('#elem').style.margin 
  • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - From the queue of checks - Air
  • I agree that it is not, but on the native css it is not done. I just gave a tip in which direction to look - Zicrael
  • And js do with it ....? Everything is done clean css ... Well, or I did not understand the question or you ... - Air
  • Yes, maybe someone of us did not understand the question, but I understood this: the author wants to get the margin value of a particular block. Therefore, I wrote the line above, if the author had entered another, I will definitely delete the answer. - Zicrael