From 4f7642d0aeb13ca52e2fe6c95fd5d19fecac5dcc Mon Sep 17 00:00:00 2001 From: Mayack Date: Wed, 6 Jan 2016 09:29:03 +0200 Subject: [PATCH] Fixed math round problem in the new paddings. --- framework/less/components.less | 91 +++++++++++++++-------------- playground/css/playground-theme.css | 21 ++++--- 2 files changed, 58 insertions(+), 54 deletions(-) diff --git a/framework/less/components.less b/framework/less/components.less index c8458e6..7c0523b 100755 --- a/framework/less/components.less +++ b/framework/less/components.less @@ -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 @@ -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%); } diff --git a/playground/css/playground-theme.css b/playground/css/playground-theme.css index e6eb32f..2f6c7a7 100644 --- a/playground/css/playground-theme.css +++ b/playground/css/playground-theme.css @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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'],