Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how i can divider image size in version 1.5? #502

Open
golestan-melika opened this issue Jan 27, 2019 · 2 comments
Open

how i can divider image size in version 1.5? #502

golestan-melika opened this issue Jan 27, 2019 · 2 comments

Comments

@golestan-melika
Copy link

hello
i have a problem , my teacher says we must have image-width and image-height in less 1.5 version , but we just have image-size in it.
how i can solve it?

@seven-phases-max
Copy link
Member

image-size returns a list of values so you can get each value individually with extract. E.g.:

foo {
    @size: image-size("x.png");
    width:  extract(@size, 1);
    height: extract(@size, 2);
}

@golestan-melika
Copy link
Author

really thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants