Skip to content

Commit

Permalink
[datetime] merge overrides into component styles
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed May 2, 2022
1 parent 8c8aec5 commit 5ccd615
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 53 deletions.
10 changes: 9 additions & 1 deletion packages/datetime/src/_datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ $header-margin: ($header-height - $pt-input-height) * 0.5 !default;
&:hover {
background-color: $blue2;
}

&:active {
background-color: $blue1;
}
}

// putting it last so it overrides equally specific selectors above.
Expand Down Expand Up @@ -231,7 +235,11 @@ $header-margin: ($header-height - $pt-input-height) * 0.5 !default;
background-color: $blue3;

&:hover {
background-color: $blue4;
background-color: $blue2;
}

&:active {
background-color: $blue1;
}
}

Expand Down
6 changes: 5 additions & 1 deletion packages/datetime/src/_daterangepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
}

&--hovered-range {
color: $blue2;
border-radius: 0;

// need to disable hover styles for all variants of selected dates
Expand All @@ -50,9 +51,11 @@
&--selected-range {
background-color: $daterangepicker-range-background-color-selected;
border-radius: 0;
color: $blue2;

&:hover {
background-color: $daterangepicker-range-background-color-selected-hover;
color: $blue2;
}
}

Expand Down Expand Up @@ -84,7 +87,7 @@
.#{$ns}-dark & {
.DayPicker-Day {
&--hovered-range {
// same for dark theme
color: $light-gray5;

/* stylelint-disable max-line-length */
&:not(.DayPicker-Day--selected):not(.DayPicker-Day--selected-range):not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--selected-range-end) {
Expand All @@ -95,6 +98,7 @@

&--selected-range {
background-color: $dark-daterangepicker-range-background-color-selected;
color: $light-gray5;

&:hover {
background-color: $dark-daterangepicker-range-background-color-selected-hover;
Expand Down
52 changes: 1 addition & 51 deletions packages/datetime/src/blueprint-datetime.scss
Original file line number Diff line number Diff line change
@@ -1,58 +1,8 @@
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0.

@import "~@blueprintjs/colors/lib/scss/colors";

@import "datepicker";
@import "daterangepicker";
@import "timepicker";
@import "datetimepicker";
@import "dateinput";

/* stylelint-disable selector-class-pattern */

.#{$ns}-datepicker, .#{$ns}-daterangepicker {
.DayPicker-Day {
&.DayPicker-Day--selected {
&:active {
background-color: $blue1;
}

.#{$ns}-dark & {
&:hover {
background-color: $blue2;
}

&:active {
background-color: $blue1;
}
}
}
}
}

.#{$ns}-daterangepicker {
.DayPicker-Day {
&--hovered-range {
color: $blue2;
}

&--selected-range {
color: $blue2;

&:hover {
color: $blue2;
}
}

.#{$ns}-dark & {
&--hovered-range {
color: $light-gray5;
}

&--selected-range {
color: $light-gray5;
}
}
}
}

1 comment on commit 5ccd615

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[datetime] merge overrides into component styles

Previews: documentation | landing | table | demo

Please sign in to comment.