Skip to content

Commit

Permalink
Customized styling - enhancements in scss files (#2892)
Browse files Browse the repository at this point in the history
* Update _variables.scss

Add to all variables !default

* Update _variables.scss

Let configure z-index

* Update tempus-dominus.scss

Configure z-index of widget with a CSS variable
  • Loading branch information
EMaderbacher authored Feb 2, 2024
1 parent 5f79399 commit 0953561
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ $td-widget-background: $td-light !default;
$td-font-color: #000 !default;
$td-timepicker-font-size: 1.2em !default;
$td-active-bg: #0d6efd !default;
$td-range-bg: color.scale($td-active-bg, $lightness: -40%);
$td-range-bg: color.scale($td-active-bg, $lightness: -40%) !default;
$td-active-color: $td-light !default;
$td-active-border-color: $td-light;
$td-active-border-color: $td-light !default;
$td-border-radius: 999px !default;
$td-btn-hover-bg: #e9ecef !default;
$td-disabled-color: #6c757d !default;
Expand All @@ -16,23 +16,25 @@ $td-secondary-border-color: #ccc !default;
$td-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default;
$td-primary-border-color: $td-light !default;
$td-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default;
$td-dow-color: rgba(0, 0, 0, 0.5);
$td-dow-color: rgba(0, 0, 0, 0.5) !default;

$td-dark: #1b1b1b !default;
$td-dark-widget-background: $td-dark !default;
$td-dark-font-color: #e3e3e3;
$td-dark-font-color: #e3e3e3 !default;
$td-dark-active-bg: #4db2ff !default;
$td-dark-range-bg: color.scale($td-dark-active-bg, $lightness: -40%);
$td-dark-range-bg: color.scale($td-dark-active-bg, $lightness: -40%) !default;
$td-dark-active-color: #fff !default;
$td-dark-active-border-color: $td-dark;
$td-dark-active-border-color: $td-dark !default;
$td-dark-btn-hover-bg: rgb(35, 38, 39) !default;
$td-dark-disabled-color: #6c757d !default;
$td-dark-alternate-color: rgba(232, 230, 227, 0.38) !default;
$td-dark-secondary-border-color: #ccc !default;
$td-dark-secondary-border-color-rgba: rgba(232, 230, 227, 0.2) !default;
$td-dark-primary-border-color: $td-dark !default;
$td-dark-text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25) !default;
$td-dark-dow-color: rgba(232, 230, 227, 0.5);
$td-dark-dow-color: rgba(232, 230, 227, 0.5) !default;

$td-widget-z-index: 9999 !default;

:root {
--td-light: #{$td-light};
Expand Down Expand Up @@ -68,4 +70,6 @@ $td-dark-dow-color: rgba(232, 230, 227, 0.5);
--td-dark-primary-border-color: #{$td-dark-primary-border-color};
--td-dark-text-shadow: #{$td-dark-text-shadow};
--td-dark-dow-color: #{$td-dark-dow-color};

--td-widget-z-index: #{$td-widget-z-index};
}
2 changes: 1 addition & 1 deletion src/scss/tempus-dominus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
width: 19rem;
border-radius: 4px;
display: none;
z-index: 9999;
z-index: var(--td-widget-z-index);
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12);

Expand Down

0 comments on commit 0953561

Please sign in to comment.