From d2d772b5ddf61de66226e014ade5865f1b27f911 Mon Sep 17 00:00:00 2001 From: Dima Atkaev Date: Thu, 15 Feb 2018 13:57:17 +0300 Subject: [PATCH] fix (bootstrap): fix alignment styles Closes: #223 --- .../global/bootstrap/_custom-forms.scss | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/framework/theme/styles/global/bootstrap/_custom-forms.scss b/src/framework/theme/styles/global/bootstrap/_custom-forms.scss index eaaca3b867..25a4479e45 100644 --- a/src/framework/theme/styles/global/bootstrap/_custom-forms.scss +++ b/src/framework/theme/styles/global/bootstrap/_custom-forms.scss @@ -17,14 +17,20 @@ margin: 0; min-height: inherit; padding: 0.375rem 1.5rem; + display: flex; + align-items: center; .custom-control-indicator { background-color: nb-theme(checkbox-bg); width: nb-theme(checkbox-size); height: nb-theme(checkbox-size); border: nb-theme(checkbox-border-size) solid nb-theme(checkbox-border-color); - top: 50%; - transform: translateY(-50%); + flex-shrink: 0; + position: absolute; + left: 0; + display: flex; + justify-content: center; + align-items: center; } &.custom-checkbox > .custom-control-input:checked ~ .custom-control-indicator::before { @@ -36,6 +42,16 @@ transform: rotate(45deg); } + .custom-control-label { + &::before { + top: auto; + } + + &::after { + top: 0.35rem; + } + } + &.custom-radio > .custom-control-input:checked ~ .custom-control-indicator::before { content: ''; width: 0.75rem; @@ -43,8 +59,6 @@ background-color: nb-theme(radio-fg); border-radius: 50%; position: absolute; - top: 15%; - left: 2px; } .custom-control-input {