Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
Fixed math round problem in the new paddings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayack committed Jan 6, 2016
1 parent 7187fc9 commit 4f7642d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 54 deletions.
91 changes: 46 additions & 45 deletions framework/less/components.less
Original file line number Diff line number Diff line change
Expand Up @@ -648,131 +648,131 @@ ul[class*=atk-menu] {

// All
.atk-padding-xsmall {
padding: @margin/3;
padding: round(@margin/3, 1);
}
.atk-padding-small {
padding: @margin/2;
padding: round(@margin/2, 1);
}
.atk-padding {
padding: @margin;
padding: round(@margin, 1);
}
.atk-padding-large {
padding: @margin*2;
padding: round(@margin*2, 1);
}
.atk-padding-xlarge {
padding: @margin*3;
padding: round(@margin*3, 1);
}

// Horizontal
.atk-padding-horizontal-xsmall {
padding-left: @margin/3;
padding-right: @margin/3;
padding-left: round(@margin/3, 1);
padding-right: round(@margin/3, 1);
}
.atk-padding-horizontal-small {
padding-left: @margin/2;
padding-right: @margin/2;
padding-left: round(@margin/2, 1);
padding-right: round(@margin/2, 1);
}
.atk-padding-horizontal {
padding-left: @margin;
padding-right: @margin;
padding-left: round(@margin, 1);
padding-right: round(@margin, 1);
}
.atk-padding-horizontal-large {
padding-left: @margin*2;
padding-right: @margin*2;
padding-left: round(@margin*2, 1);
padding-right: round(@margin*2, 1);
}
.atk-padding-horizontal-xlarge {
padding-left: @margin*3;
padding-right: @margin*3;
padding-left: round(@margin*3, 1);
padding-right: round(@margin*3, 1);
}

// Vertical
.atk-padding-vertical-xsmall {
padding-bottom: @margin/3;
padding-top: @margin/3;
padding-bottom: round(@margin/3, 1);
padding-top: round(@margin/3, 1);
}
.atk-padding-vertical-small {
padding-bottom: @margin/2;
padding-top: @margin/2;
padding-bottom: round(@margin/2, 1);
padding-top: round(@margin/2, 1);
}
.atk-padding-vertical {
padding-bottom: @margin;
padding-top: @margin;
padding-bottom: round(@margin, 1);
padding-top: round(@margin, 1);
}
.atk-padding-vertical-large {
padding-bottom: @margin*2;
padding-top: @margin*2;
padding-bottom: round(@margin*2, 1);
padding-top: round(@margin*2, 1);
}
.atk-padding-vertical-xlarge {
padding-bottom: @margin*3;
padding-top: @margin*3;
padding-bottom: round(@margin*3, 1);
padding-top: round(@margin*3, 1);
}

// Left
.atk-padding-left-xsmall {
padding-left: @margin/3;
padding-left: round(@margin/3, 1);
}
.atk-padding-left-small {
padding-left: @margin/2;
padding-left: round(@margin/2, 1);
}
.atk-padding-left {
padding-left: @margin;
padding-left: round(@margin, 1);
}
.atk-padding-left-large {
padding-left: @margin*2;
padding-left: round(@margin*2, 1);
}
.atk-padding-left-xlarge {
padding-left: @margin*3;
padding-left: round(@margin*3, 1);
}

// Right
.atk-padding-right-xsmall {
padding-right: @margin/3;
padding-right: round(@margin/3, 1);
}
.atk-padding-right-small {
padding-right: @margin/2;
padding-right: round(@margin/2, 1);
}
.atk-padding-right {
padding-right: @margin;
padding-right: round(@margin, 1);
}
.atk-padding-right-large {
padding-right: @margin*2;
padding-right: round(@margin*2, 1);
}
.atk-padding-right-xlarge {
padding-right: @margin*3;
padding-right: round(@margin*3, 1);
}

// Top
.atk-padding-top-xsmall {
padding-top: @margin/3;
padding-top: round(@margin/3, 1);
}
.atk-padding-top-small {
padding-top: @margin/2;
padding-top: round(@margin/2, 1);
}
.atk-padding-top {
padding-top: @margin;
padding-top: round(@margin, 1);
}
.atk-padding-top-large {
padding-top: @margin*2;
padding-top: round(@margin*2, 1);
}
.atk-padding-top-xlarge {
padding-top: @margin*3;
padding-top: round(@margin*3, 1);
}

// Bottom
.atk-padding-bottom-xsmall {
padding-bottom: @margin/3;
padding-bottom: round(@margin/3, 1);
}
.atk-padding-bottom-small {
padding-bottom: @margin/2;
padding-bottom: round(@margin/2, 1);
}
.atk-padding-bottom {
padding-bottom: @margin;
padding-bottom: round(@margin, 1);
}
.atk-padding-bottom-large {
padding-bottom: @margin*2;
padding-bottom: round(@margin*2, 1);
}
.atk-padding-bottom-xlarge {
padding-bottom: @margin*3;
padding-bottom: round(@margin*3, 1);
}

// Reset
Expand Down Expand Up @@ -861,6 +861,7 @@ ul[class*=atk-menu] {
}
}
.atk-shape-circle {
display: inline-block;
&, img&, a&[class*='atk-button'], button&[class*='atk-button'], input&[class*='atk-button'], a&.ui-button, button&.ui-button, input&.ui-button {
.border-radius(50%);
}
Expand Down
21 changes: 12 additions & 9 deletions playground/css/playground-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -3855,7 +3855,7 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding: 0.5rem;
}
.atk-padding-small {
padding: 0.75rem;
padding: 0.8rem;
}
.atk-padding {
padding: 1.5rem;
Expand All @@ -3871,8 +3871,8 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-right: 0.5rem;
}
.atk-padding-horizontal-small {
padding-left: 0.75rem;
padding-right: 0.75rem;
padding-left: 0.8rem;
padding-right: 0.8rem;
}
.atk-padding-horizontal {
padding-left: 1.5rem;
Expand All @@ -3891,8 +3891,8 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-top: 0.5rem;
}
.atk-padding-vertical-small {
padding-bottom: 0.75rem;
padding-top: 0.75rem;
padding-bottom: 0.8rem;
padding-top: 0.8rem;
}
.atk-padding-vertical {
padding-bottom: 1.5rem;
Expand All @@ -3910,7 +3910,7 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-left: 0.5rem;
}
.atk-padding-left-small {
padding-left: 0.75rem;
padding-left: 0.8rem;
}
.atk-padding-left {
padding-left: 1.5rem;
Expand All @@ -3925,7 +3925,7 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-right: 0.5rem;
}
.atk-padding-right-small {
padding-right: 0.75rem;
padding-right: 0.8rem;
}
.atk-padding-right {
padding-right: 1.5rem;
Expand All @@ -3940,7 +3940,7 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-top: 0.5rem;
}
.atk-padding-top-small {
padding-top: 0.75rem;
padding-top: 0.8rem;
}
.atk-padding-top {
padding-top: 1.5rem;
Expand All @@ -3955,7 +3955,7 @@ ul[class*=atk-menu].atk-menu-vertical > li *[class*=atk-menu]:not(.atk-menu-sepa
padding-bottom: 0.5rem;
}
.atk-padding-bottom-small {
padding-bottom: 0.75rem;
padding-bottom: 0.8rem;
}
.atk-padding-bottom {
padding-bottom: 1.5rem;
Expand Down Expand Up @@ -4092,6 +4092,9 @@ input.atk-shape-rounded-bottom-right {
-moz-border-bottom-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.atk-shape-circle {
display: inline-block;
}
.atk-shape-circle,
img.atk-shape-circle,
a.atk-shape-circle[class*='atk-button'],
Expand Down

0 comments on commit 4f7642d

Please sign in to comment.