Skip to content

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