Here’s my CSS:
div {
border: 0;
display: block;
width: 100%;
height: width * 1.26411765;
}
I’d like “width” to be the current pixel width of the element. Does that make sense? Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use something like
See: http://lesscss.org/#-operations
EDIT: Having just read your question properly (oops) you can access javascript from less to get values. See the link above and scroll further down the page. I’ve never actually tried it though.