Skip to content

Commit

Permalink
added default variable values for SCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKrupko committed Jan 14, 2017
1 parent 647cb38 commit 2c0a606
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/sass/DatePickerX.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
.date-picker-x {
$background: #444;
$active: #06f;
$daySize: 44px;
$weekdaySize: 24px;
@import "variables";

background: $background;
.date-picker-x {
background: $dpxBackgroundColor;
box-sizing: content-box;
color: #fff;
display: none;
Expand All @@ -13,11 +10,11 @@
position: absolute;
transform: translateY(15px);
user-select: none;
width: $daySize * 7;
width: $dpxDaySize * 7;
z-index: 1;

&::before {
border-color: $background transparent;
border-color: $dpxBackgroundColor transparent;
border-style: solid;
border-width: 0 10px 10px;
bottom: 100%;
Expand Down Expand Up @@ -67,7 +64,7 @@
box-sizing: content-box;
display: flex;
flex-wrap: wrap;
height: $weekdaySize + $daySize * 6;
height: $dpxWeekdaySize + $dpxDaySize * 6;
justify-content: center;
padding-top: 10px;
}
Expand All @@ -91,23 +88,23 @@
cursor: pointer;

&:hover {
box-shadow: inset 0 0 0 2px lighten($active, 10%), inset 0 0 0 4px $background;
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 10%), inset 0 0 0 4px $dpxBackgroundColor;
}
}
}
.dpx-weekday {
font-size: 15px;
height: $weekdaySize !important;
height: $dpxWeekdaySize !important;
}
&[data-dpx-type="day"] .dpx-item {
flex-basis: $daySize;
height: $daySize;
flex-basis: $dpxDaySize;
height: $dpxDaySize;
}
.dpx-current {
box-shadow: inset 0 0 0 2px lighten($active, 20%);
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 20%);
}
.dpx-selected {
background: $active;
background: $dpxActiveColor;
}
.dpx-weekend {
color: #f99;
Expand All @@ -121,7 +118,7 @@
box-shadow: none !important;

&.dpx-current {
box-shadow: inset 0 0 0 2px lighten($active, 20%) !important;
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 20%) !important;
}
}
}
4 changes: 4 additions & 0 deletions src/sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$dpxBackgroundColor: #444 !default;
$dpxActiveColor: #06f !default;
$dpxDaySize: 44px !default;
$dpxWeekdaySize: 24px !default;

0 comments on commit 2c0a606

Please sign in to comment.