I know you’re able to do some simple math in Sass/Scss. But is there a way to subtract pixels from percentages? For example:
$image-size: 200px;
.bio {
width: 100% - $image-size;
}
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.
I don’t see how that would even work, fact is SASS can’t magically know the size your box will have.
Now if I get what you’re trying to do, best solution would be to wrap .box’s parent width into a variable and then substract your image width to that variable – considering 100% width means it will get 100% of a certain width.