Skip to content

Commit 2c0a606

Browse files
committed
added default variable values for SCSS
1 parent 647cb38 commit 2c0a606

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

src/sass/DatePickerX.scss

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
.date-picker-x {
2-
$background: #444;
3-
$active: #06f;
4-
$daySize: 44px;
5-
$weekdaySize: 24px;
1+
@import "variables";
62

7-
background: $background;
3+
.date-picker-x {
4+
background: $dpxBackgroundColor;
85
box-sizing: content-box;
96
color: #fff;
107
display: none;
@@ -13,11 +10,11 @@
1310
position: absolute;
1411
transform: translateY(15px);
1512
user-select: none;
16-
width: $daySize * 7;
13+
width: $dpxDaySize * 7;
1714
z-index: 1;
1815

1916
&::before {
20-
border-color: $background transparent;
17+
border-color: $dpxBackgroundColor transparent;
2118
border-style: solid;
2219
border-width: 0 10px 10px;
2320
bottom: 100%;
@@ -67,7 +64,7 @@
6764
box-sizing: content-box;
6865
display: flex;
6966
flex-wrap: wrap;
70-
height: $weekdaySize + $daySize * 6;
67+
height: $dpxWeekdaySize + $dpxDaySize * 6;
7168
justify-content: center;
7269
padding-top: 10px;
7370
}
@@ -91,23 +88,23 @@
9188
cursor: pointer;
9289

9390
&:hover {
94-
box-shadow: inset 0 0 0 2px lighten($active, 10%), inset 0 0 0 4px $background;
91+
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 10%), inset 0 0 0 4px $dpxBackgroundColor;
9592
}
9693
}
9794
}
9895
.dpx-weekday {
9996
font-size: 15px;
100-
height: $weekdaySize !important;
97+
height: $dpxWeekdaySize !important;
10198
}
10299
&[data-dpx-type="day"] .dpx-item {
103-
flex-basis: $daySize;
104-
height: $daySize;
100+
flex-basis: $dpxDaySize;
101+
height: $dpxDaySize;
105102
}
106103
.dpx-current {
107-
box-shadow: inset 0 0 0 2px lighten($active, 20%);
104+
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 20%);
108105
}
109106
.dpx-selected {
110-
background: $active;
107+
background: $dpxActiveColor;
111108
}
112109
.dpx-weekend {
113110
color: #f99;
@@ -121,7 +118,7 @@
121118
box-shadow: none !important;
122119

123120
&.dpx-current {
124-
box-shadow: inset 0 0 0 2px lighten($active, 20%) !important;
121+
box-shadow: inset 0 0 0 2px lighten($dpxActiveColor, 20%) !important;
125122
}
126123
}
127124
}

src/sass/_variables.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$dpxBackgroundColor: #444 !default;
2+
$dpxActiveColor: #06f !default;
3+
$dpxDaySize: 44px !default;
4+
$dpxWeekdaySize: 24px !default;

0 commit comments

Comments
 (0)