epicyon/epicyon-calendar.css

128 lines
2.6 KiB
CSS
Raw Normal View History

2019-10-10 19:19:47 +00:00
:root {
--main-bg-color: #282c37;
2019-10-10 20:43:43 +00:00
--calendar-bg-color: #2f333e;
2019-10-10 19:19:47 +00:00
--lines-color: darkgray;
2019-10-10 20:43:43 +00:00
--day-number: #a4a2a2;
--day-number2: #c9c7c7;
2019-10-10 20:56:23 +00:00
--today-foreground: white;
--today-background: darkgray;
2019-10-10 19:19:47 +00:00
}
2019-10-10 18:25:42 +00:00
body {
2019-10-10 19:19:47 +00:00
background-color: var(--main-bg-color);
2019-10-10 20:43:43 +00:00
color: var(--day-number2);
2019-10-10 19:19:47 +00:00
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-family: 'Montserrat';
font-weight: 700;
min-height: 100vh;
2019-10-10 18:25:42 +00:00
}
main {
2019-10-10 20:43:43 +00:00
background-color: var(--calendar-bg-color);
2019-10-10 19:19:47 +00:00
-ms-flex-preferred-size: 980px;
flex-basis: 980px;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar {
2019-10-10 19:19:47 +00:00
table-display: fixed;
width: 100%;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__header,
.calendar__day__cell {
2019-10-10 19:19:47 +00:00
border: 2px solid var(--lines-color);
text-align: center;
width: 100% / 7;
vertical-align: middle;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__header:first-child,
.calendar__day__cell:first-child {
2019-10-10 19:19:47 +00:00
border-left: none;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__header:last-child,
.calendar__day__cell:last-child {
2019-10-10 19:19:47 +00:00
border-right: none;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__header,
.calendar__day__cell {
2019-10-10 19:19:47 +00:00
padding: .75rem 0 1.5rem;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__banner--month {
2019-10-10 19:19:47 +00:00
text-align: center;
padding: .75rem;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__banner--month h1 {
2019-10-10 19:19:47 +00:00
background-color: #4E4F4A;
color: #F6E9DC;
display: inline-block;
font-size: 3rem;
font-weight: 400;
letter-spacing: 0.1em;
padding: .5rem 2rem;
text-transform: uppercase;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__header {
2019-10-10 19:19:47 +00:00
font-size: 1rem;
letter-spacing: 0.1em;
text-transform: uppercase;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__cell {
2019-10-10 19:19:47 +00:00
font-size: 4rem;
position: relative;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
tr:nth-child(odd) > .calendar__day__cell:nth-child(odd) {
2019-10-10 19:19:47 +00:00
color: var(--day-number);
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
tr:nth-child(even) > .calendar__day__cell:nth-child(even) {
2019-10-10 19:19:47 +00:00
color: var(--day-number);
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__cell[data-event] {
2019-10-10 19:19:47 +00:00
background-color: blue;
color: blue;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__cell[data-event]:after {
2019-10-10 19:19:47 +00:00
content: attr(data-event);
color: #F6E9DC;
display: block;
font-weight: 400;
font-size: .75rem;
position: absolute;
bottom: 0;
width: 100%;
height: 1rem;
text-transform: uppercase;
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__cell[data-today] {
2019-10-10 20:56:23 +00:00
background-color: var(--today-background);
border-color: var(--today-background);
color: var(--today-foreground);
2019-10-10 14:43:21 +00:00
}
2019-10-10 18:25:42 +00:00
.calendar__day__cell[data-today]:after {
2019-10-10 19:19:47 +00:00
content: attr(data-today);
2019-10-10 20:56:23 +00:00
color: var(--today-foreground);
2019-10-10 19:19:47 +00:00
display: block;
font-size: .75rem;
font-weight: 400;
position: absolute;
bottom: 0;
width: 100%;
height: 1rem;
text-transform: uppercase;
2019-10-10 14:43:21 +00:00
}