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

Add function percentage #527

Merged
merged 1 commit into from
Dec 17, 2011
Merged

Add function percentage #527

merged 1 commit into from
Dec 17, 2011

Conversation

hokaccha
Copy link
Contributor

Before, percentage calculated by self.

@page: 960px;
@column: 300px;

.responsive(@count:1){
  @percent: (@column / @page * @count) * 100;
  width: ~'@{percent}%';
}

[role="main"] {
  .responsive(2);
}
[role="navigation"] {
  .responsive(1);
}

so added percetage function.

@page: 960px;
@column: 300px;

.responsive(@count:1){
  width: percentage(@column / @page * @count);
}

[role="main"] {
  .responsive(2);
}
[role="navigation"] {
  .responsive(1);
}

Like as Sass percentage.
http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#percentage-instance_method

cloudhead pushed a commit that referenced this pull request Dec 17, 2011
@cloudhead cloudhead merged commit 6c6cdcb into less:master Dec 17, 2011
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

Successfully merging this pull request may close these issues.

2 participants