From 08ed9542f4d31bff08fc9d04d37ec3ce6698f8e1 Mon Sep 17 00:00:00 2001 From: Albin Berglund Date: Tue, 22 Aug 2023 08:44:20 +0200 Subject: [PATCH] do not create empty css variables (#36) --- libs/angular/package.json | 2 +- libs/core/package.json | 2 +- libs/core/src/lib/styles/_core.scss | 2 +- libs/core/src/lib/styles/util/_theme.scss | 44 ++++++++++++++++++----- libs/react/package.json | 2 +- 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/libs/angular/package.json b/libs/angular/package.json index 4e8f8a0..79b5f8a 100644 --- a/libs/angular/package.json +++ b/libs/angular/package.json @@ -1,6 +1,6 @@ { "name": "@berg-layout/angular", - "version": "5.3.2", + "version": "5.3.3", "license": "MIT", "repository": { "url": "https://github.com/blidblid/berg-layout" diff --git a/libs/core/package.json b/libs/core/package.json index 6aeb05a..b9c42ed 100644 --- a/libs/core/package.json +++ b/libs/core/package.json @@ -1,6 +1,6 @@ { "name": "@berg-layout/core", - "version": "5.3.2", + "version": "5.3.3", "license": "MIT", "repository": { "url": "https://github.com/blidblid/berg-layout" diff --git a/libs/core/src/lib/styles/_core.scss b/libs/core/src/lib/styles/_core.scss index bd42505..a5bf765 100644 --- a/libs/core/src/lib/styles/_core.scss +++ b/libs/core/src/lib/styles/_core.scss @@ -459,7 +459,7 @@ $transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); .berg-panel-resize-toggle-right, .berg-panel-resize-toggle-bottom, .berg-panel-resize-toggle-left { - background: var(--berg-panel-resize-indicator-color); + background: var(--berg-panel-resizing-indicator-color); } } } diff --git a/libs/core/src/lib/styles/util/_theme.scss b/libs/core/src/lib/styles/util/_theme.scss index f33bb4c..2937724 100644 --- a/libs/core/src/lib/styles/util/_theme.scss +++ b/libs/core/src/lib/styles/util/_theme.scss @@ -41,13 +41,39 @@ $previewing-indicator-color: map-get($colors, 'previewing-indicator-color') or $resizing-indicator-color; - --berg-layout-content-background: #{$background-center}; - --berg-panel-backdrop-background: #{$background-backdrop}; - --berg-panel-border-color: #{$border-color}; - --berg-panel-top-background: #{$background-top}; - --berg-panel-right-background: #{$background-right}; - --berg-panel-bottom-background: #{$background-bottom}; - --berg-panel-left-background: #{$background-left}; - --berg-panel-resize-indicator-color: #{$resizing-indicator-color}; - --berg-panel-previewing-indicator-color: #{$previewing-indicator-color}; + @if $background-center { + --berg-layout-content-background: #{$background-center}; + } + + @if $background-backdrop { + --berg-panel-backdrop-background: #{$background-backdrop}; + } + + @if $border-color { + --berg-panel-border-color: #{$border-color}; + } + + @if $background-top { + --berg-panel-top-background: #{$background-top}; + } + + @if $background-right { + --berg-panel-right-background: #{$background-right}; + } + + @if $background-bottom { + --berg-panel-bottom-background: #{$background-bottom}; + } + + @if $background-left { + --berg-panel-left-background: #{$background-left}; + } + + @if $resizing-indicator-color { + --berg-panel-resizing-indicator-color: #{$resizing-indicator-color}; + } + + @if $previewing-indicator-color { + --berg-panel-previewing-indicator-color: #{$previewing-indicator-color}; + } } diff --git a/libs/react/package.json b/libs/react/package.json index ee28529..2fe0ce8 100644 --- a/libs/react/package.json +++ b/libs/react/package.json @@ -1,6 +1,6 @@ { "name": "@berg-layout/react", - "version": "5.3.2", + "version": "5.3.3", "license": "MIT", "repository": { "url": "https://github.com/blidblid/berg-layout"