From 7d654f2fe55928f4a4398310efb5b31420b0b8e6 Mon Sep 17 00:00:00 2001 From: Kyle Durand Date: Wed, 22 Dec 2021 16:08:24 -0500 Subject: [PATCH] Remove root level control height --- src/components/Banner/Banner.scss | 2 +- src/components/Button/Button.scss | 5 ++--- src/styles/shared/_controls.scss | 6 +----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/Banner/Banner.scss b/src/components/Banner/Banner.scss index 6f2c005a40b..fb242d1bfec 100644 --- a/src/components/Banner/Banner.scss +++ b/src/components/Banner/Banner.scss @@ -53,7 +53,7 @@ --pc-banner-rgb-text: 33, 43, 54; --pc-banner-secondary-action-horizontal-padding: var(--p-space-3); --pc-banner-secondary-action-vertical-padding: calc( - 0.5 * (var(--pc-control-height) - var(--p-line-height-2)) + 0.5 * (var(--p-line-height-6) - var(--p-line-height-2)) ); position: relative; display: flex; diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 988594234de..dc643cf24b3 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -1,11 +1,10 @@ @import '../../styles/common'; .Button { - --pc-button-min-height: var(--pc-control-height); --pc-button-slim-min-height: var(--p-line-height-4); --pc-button-large-min-height: var(--p-line-height-7); --pc-button-vertical-padding: calc( - (var(--pc-button-min-height) - var(--p-line-height-2) - 2px) / 2 + (var(--p-line-height-6) - var(--p-line-height-2) - 2px) / 2 ); --pc-button-slim-vertical-padding: calc( (var(--pc-button-slim-min-height) - var(--p-line-height-2) - 2px) / 2 @@ -291,7 +290,7 @@ &.iconOnly { @include recolor-icon(var(--p-icon)); - margin: calc(-0.5 * (var(--pc-button-min-height) - #{icon-size()})); + margin: calc(-0.5 * (var(--p-line-height-6) - #{icon-size()})); &:hover { @include recolor-icon(var(--p-icon-hovered)); diff --git a/src/styles/shared/_controls.scss b/src/styles/shared/_controls.scss index 70d741ec5c8..cf72a74240a 100644 --- a/src/styles/shared/_controls.scss +++ b/src/styles/shared/_controls.scss @@ -2,17 +2,13 @@ @return 36px; } -:root { - --pc-control-height: var(--p-line-height-6); -} - @function control-slim-height() { @return 28px; } @function control-vertical-padding() { @return calc( - (var(--pc-control-height) - var(--p-line-height-3) - var(--p-space-05)) / 2 + (var(--p-line-height-6) - var(--p-line-height-3) - var(--p-space-05)) / 2 ); }