add padding to datepicker container

This commit is contained in:
t1m0n 2015-11-13 11:47:06 +03:00
parent ea67e8a2c6
commit e0ddfbe56b
5 changed files with 25 additions and 11 deletions

View File

@ -17,6 +17,9 @@
box-sizing: content-box; box-sizing: content-box;
width: 224px; } width: 224px; }
.datepicker--content {
padding: 2px; }
.datepicker--body { .datepicker--body {
display: none; } display: none; }
.datepicker--body.active { .datepicker--body.active {
@ -30,6 +33,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex: 1;
width: 32px; width: 32px;
height: 32px; height: 32px;
text-align: center; } text-align: center; }
@ -51,6 +55,7 @@
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 2px;
height: 32px; } height: 32px; }
.datepicker--nav-title, .datepicker--nav-title,
@ -61,16 +66,16 @@
justify-content: center; } justify-content: center; }
.datepicker--nav-action { .datepicker--nav-action {
width: 32px; } width: 32px;
border-radius: 2px; }
.datepicker--nav-action:hover { .datepicker--nav-action:hover {
background: #eee; } background: #eee; }
.datepicker--nav-action.-disabled- { .datepicker--nav-action.-disabled- {
visibility: hidden; } visibility: hidden; }
.datepicker--nav-title { .datepicker--nav-title {
align-self: center; border-radius: 2px;
padding: 4px; padding: 0 8px; }
border-radius: 2px; }
.datepicker--nav-title:hover { .datepicker--nav-title:hover {
background: #eee; } background: #eee; }
.datepicker--nav-title.-disabled- { .datepicker--nav-title.-disabled- {
@ -79,13 +84,13 @@
.datepicker--buttons { .datepicker--buttons {
display: flex; display: flex;
margin: 4px 2px; } margin: 0 1px 2px; }
.datepicker--button { .datepicker--button {
background: #f2f2f2; background: #f2f2f2;
cursor: pointer; cursor: pointer;
border-radius: 2px; border-radius: 2px;
margin: 0 2px; margin: 0 1px;
flex: 1; flex: 1;
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
@ -140,7 +145,8 @@
background: skyblue; } background: skyblue; }
.datepicker--cell-day { .datepicker--cell-day {
border-radius: 50%; } border-radius: 50%;
width: 14.28571%; }
.datepicker--cell-month { .datepicker--cell-month {
width: 33.33%; width: 33.33%;

View File

@ -55,6 +55,7 @@
.datepicker--cell-day { .datepicker--cell-day {
border-radius: 50%; border-radius: 50%;
width: (100/7)#{'%'};
&.-other-month- { &.-other-month- {
@extend %otherMonth; @extend %otherMonth;

View File

@ -11,6 +11,10 @@
width: $datepickerWidth; width: $datepickerWidth;
} }
.datepicker--content {
padding: $datepickerPadding;
}
// Body // Body
// ------------------------------------------------- // -------------------------------------------------
@ -30,10 +34,12 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.datepicker--day-name { .datepicker--day-name {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex: 1;
width: $dayCellSize; width: $dayCellSize;
height: $dayCellSize; height: $dayCellSize;
text-align: center; text-align: center;

View File

@ -8,6 +8,7 @@
border-bottom: 1px solid $colorGrey; border-bottom: 1px solid $colorGrey;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: $datepickerPadding;
height: $navigationHeight; height: $navigationHeight;
} }
@ -21,6 +22,7 @@
.datepicker--nav-action { .datepicker--nav-action {
width: $dayCellSize; width: $dayCellSize;
border-radius: $datepickerBorderRadius;
&:hover { &:hover {
background: $colorCellHover; background: $colorCellHover;
@ -32,9 +34,8 @@
} }
.datepicker--nav-title { .datepicker--nav-title {
align-self: center;
padding: 4px;
border-radius: $datepickerBorderRadius; border-radius: $datepickerBorderRadius;
padding: 0 8px;
&:hover { &:hover {
background: $colorCellHover; background: $colorCellHover;
@ -51,7 +52,7 @@
.datepicker--buttons { .datepicker--buttons {
display: flex; display: flex;
margin: $navigationButtonsOffset*2 $navigationButtonsOffset; margin: 0 $navigationButtonsOffset $datepickerPadding;
} }
.datepicker--button { .datepicker--button {

View File

@ -6,7 +6,7 @@ $yearsPerRow: 4;
$textColor: #333; $textColor: #333;
$navigationHeight: 32px; $navigationHeight: 32px;
$navigationButtonsOffset: 2px; $navigationButtonsOffset: 1px;
// Colors // Colors
$colorGrey: #ddd; $colorGrey: #ddd;