discourse/app/assets/stylesheets/vendor/pikaday.scss

Failed to ignore revisions in .git-blame-ignore-revs.

245 lines
5.4 KiB
SCSS
Raw Normal View History

@import "common/foundation/variables";
2015-08-10 06:50:38 -04:00
/*!
* Pikaday
* Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
*/
// Variables
// Declare any of these variables before importing this SCSS file to easily override defaults
// Variables are namespaced with the pd (pikaday) prefix
// Colours
$pd-text-color: $primary !default;
$pd-title-color: $primary !default;
$pd-title-bg: $secondary !default;
$pd-picker-bg: $secondary !default;
2017-06-11 22:20:14 -04:00
$pd-picker-border: $primary-low !default;
$pd-picker-border-bottom: $primary-low !default;
$pd-picker-shadow: rgba(0,0,0,.5) !default;
2017-06-11 22:20:14 -04:00
$pd-th-color: $primary !default;
$pd-day-color: $primary !default;
$pd-day-bg: $secondary !default;
$pd-day-hover-color: $primary !default;
$pd-day-hover-bg: $tertiary-low !default;
$pd-day-today-color: $tertiary !default;
$pd-day-selected-color: $secondary !default;
$pd-day-selected-bg: $tertiary !default;
2017-06-11 22:20:14 -04:00
$pd-day-selected-shadow: $tertiary-low !default;
$pd-day-disabled-color: $primary !default;
$pd-week-color: $primary !default;
// Font
$pd-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
2015-08-10 06:50:38 -04:00
.pika-single {
z-index: 9999;
display: block;
position: relative;
color: $pd-text-color;
background: $pd-picker-bg;
border: 1px solid $pd-picker-border;
border-bottom-color: $pd-picker-border-bottom;
font-family: $pd-font-family;
2015-08-10 06:50:38 -04:00
&.is-hidden {
display: none;
}
&.is-bound {
position: absolute;
box-shadow: 0 5px 15px -5px $pd-picker-shadow;
2015-08-10 06:50:38 -04:00
}
}
// clear child float (pika-lendar), using the famous micro clearfix hack
// http://nicolasgallagher.com/micro-clearfix-hack/
.pika-single {
&:before,
&:after {
content: " ";
display: table;
}
&:after { clear: both }
}
.pika-lendar {
float: left;
width: 240px;
margin: 8px;
}
.pika-title {
position: relative;
text-align: center;
select {
cursor: pointer;
position: absolute;
z-index: 9998;
margin: 0;
left: 0;
top: 5px;
filter: alpha(opacity=0);
opacity: 0;
}
}
.pika-label {
display: inline-block;
position: relative;
z-index: 9999;
overflow: hidden;
margin: 0;
padding: 5px 3px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
color: $pd-title-color;
background-color: $pd-title-bg;
2015-08-10 06:50:38 -04:00
}
.pika-prev,
.pika-next {
display: block;
cursor: pointer;
position: relative;
outline: none;
border: 0;
padding: 0;
width: 20px;
height: 30px;
text-indent: 20px; // hide text using text-indent trick, using width value (it's enough)
white-space: nowrap;
overflow: hidden;
background-color: transparent;
background-position: center center;
background-repeat: no-repeat;
2015-08-10 06:50:38 -04:00
background-size: 75% 75%;
opacity: .5;
2019-01-21 13:47:46 -05:00
@if (lightness($secondary) < 50) { // invert the black png if the background is dark
filter: invert(1);
}
2015-08-10 06:50:38 -04:00
&:hover {
opacity: 1;
}
&.is-disabled {
cursor: default;
opacity: .2;
}
}
.pika-prev,
.is-rtl .pika-next {
float: left;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==');
}
.pika-next,
.is-rtl .pika-prev {
float: right;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=');
}
.pika-select {
display: inline-block;
}
.pika-table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
border: 0;
th,
td {
width: 14.285714285714286%;
padding: 0;
}
th {
color: $pd-th-color;
2015-08-10 06:50:38 -04:00
font-size: 12px;
line-height: 25px;
font-weight: bold;
text-align: center;
}
abbr {
border-bottom: none;
cursor: help;
}
}
.pika-button {
cursor: pointer;
display: block;
-moz-box-sizing: border-box;
box-sizing: border-box;
outline: none;
border: 0;
margin: 0;
width: 100%;
padding: 5px;
color: $pd-day-color;
2015-08-10 06:50:38 -04:00
font-size: 12px;
line-height: 15px;
text-align: right;
background: $pd-day-bg;
2015-08-10 06:50:38 -04:00
.is-today & {
color: $pd-day-today-color;
2015-08-10 06:50:38 -04:00
font-weight: bold;
}
.is-selected & {
color: $pd-day-selected-color;
2015-08-10 06:50:38 -04:00
font-weight: bold;
background: $pd-day-selected-bg;
box-shadow: inset 0 1px 3px $pd-day-selected-shadow;
2015-08-10 06:50:38 -04:00
border-radius: 3px;
}
.is-disabled &,
.is-outside-current-month & {
2015-08-10 06:50:38 -04:00
pointer-events: none;
cursor: default;
color: $pd-day-disabled-color;
2015-08-10 06:50:38 -04:00
opacity: .3;
}
&:hover {
color: $pd-day-hover-color;
background: $pd-day-hover-bg;
2015-08-10 06:50:38 -04:00
box-shadow: none;
border-radius: 3px;
}
}
.pika-week {
font-size: 11px;
color: $pd-week-color;
2015-08-10 06:50:38 -04:00
}
.is-inrange .pika-button {
background: #D5E9F7;
}
.is-startrange .pika-button {
color: $secondary;
2015-08-10 06:50:38 -04:00
background: #6CB31D;
box-shadow: none;
border-radius: 3px;
}
.is-endrange .pika-button {
color: $secondary;
background: $tertiary;
2015-08-10 06:50:38 -04:00
box-shadow: none;
border-radius: 3px;
}