VulpesOS/gaia/apps/calendar/style/multi_day.css
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

481 lines
9 KiB
CSS
Executable file

/*
`.multi-day` is used by week and day views; we use the classes `.day-view` and
`.week-view` to override specific rules instead of IDs to avoid specificity
conflicts.
---
all classes are prefixed with "md__" to avoid collisions ("md" == "multi-day")
following the BEM naming convention.
*/
.multi-day {
overflow: hidden;
}
.md__sticky {
width: 100%;
height: 7rem;
background-color: #f8f8f8;
border-bottom: 0.1rem solid #e2e2e2;
position: relative;
overflow: hidden;
}
.day-view .md__sticky {
height: 5rem;
}
.md__all-day {
top: 2rem;
height: 4.9rem;
line-height: 4.9rem;
color: #707070;
position: absolute;
border-top: 0.1rem solid #e2e2e2;
width: 3rem;
text-align: center;
}
.day-view .md__all-day {
border-top: 0;
width: 7rem;
top: 0;
offset-inline-start: 0;
}
.md__day-name {
color: #707070;
font-size: 1.3rem;
text-transform: uppercase;
font-weight: 400;
text-align: center;
height: 2rem;
line-height: 1.9rem;
width: 100%;
}
.day-view .md__day-name {
display: none;
}
.week-view .md__day-name.is-today {
font-weight: 500;
color: #008eab;
}
.md__allday-events {
border-inline-start: 0.1rem solid #e2e2e2;
border-top: 0.1rem solid #e2e2e2;
height: 5rem;
width: 100%;
position: relative;
overflow-x: hidden;
overflow-y: scroll;
background-color: #f8f8f8;
}
.day-view .md__allday-events {
border: none;
}
.md__main {
height: calc(100% - 7rem);
overflow-y: scroll;
overflow-x: hidden;
position: relative;
}
.day-view .md__main {
height: calc(100% - 5rem);
}
.md__main-content {
position: relative;
/* background color and z-index is important for APZ performance */
background-color: #fff;
z-index: 0;
height: 120rem;
width: 100%;
}
.md__sidebar {
width: 100%;
color: #707070;
text-align: center;
font-size: 1.5rem;
}
.md__sidebar li:last-child {
border-bottom: none;
height: 5rem;
}
.md__sidebar > li {
width: 100%;
height: 5rem;
border-bottom: 0.1rem solid #f8f8f8;
overflow: hidden;
}
.md__display-hour {
display: block;
width: 3rem;
padding-top: 0.2rem;
text-align: center;
line-height: 1.2;
}
.md__display-hour.is-hidden {
visibility: hidden;
}
.day-view .md__display-hour {
width: 7rem;
padding: 0.2rem 0.5rem 0;
}
.week-view .md__display-hour .ampm {
display: block;
font-size: 1.3rem;
}
.md__days-wrapper,
.md__alldays-wrapper {
width: calc(100% - 3rem);
position: absolute;
offset-inline-end: 0;
top: 0;
overflow: hidden;
}
.md__days-wrapper {
height: 120rem;
}
.md__alldays-wrapper {
height: 100%;
}
.day-view .md__days-wrapper,
.day-view .md__alldays-wrapper {
width: calc(100% - 7rem);
}
.md__days,
.md__alldays {
/* it contains 15 days, view only shows 5 each time (so 300% width) */
width: 300%;
overflow: hidden;
height: 100%;
}
.md__day,
.md__allday {
position: relative;
height: 100%;
}
html[dir="ltr"] .md__day,
html[dir="ltr"] .md__allday {
float: left;
}
html[dir="rtl"] .md__day,
html[dir="rtl"] .md__allday {
float: right;
}
.week-view .md__day,
.week-view .md__allday {
width: 6.666%;
}
.day-view .md__day,
.day-view .md__allday {
width: 33.333%;
}
.md__day {
border-inline-start: 0.1rem solid #f8f8f8;
}
.md__event,
.md__event:focus,
.md__event:active {
text-decoration: none;
outline: none;
}
.md__event {
position: relative;
display: block;
border-inline-start-style: solid;
border-inline-start-width: 0.4rem;
width: 100%;
overflow: hidden;
padding: 0.5rem;
}
/* The content of event links should be actionable, the links work as buttons */
.md__event > * {
pointer-events: none;
}
.day-view .md__event {
padding: 0.8rem 0.5rem;
}
.md__main .md__event {
position: absolute;
}
.md__event.is-allday {
margin-top: 0.1rem;
}
.day-view .md__event.is-allday {
height: 3.8rem;
}
.day-view .md__event.is-allday:only-of-type {
/* center it vertically if only one allday event */
margin-top: 0.6rem;
}
.md__event.is-allday:first-child {
margin-top: 0;
}
.week-view .md__event.has-overlaps {
/* avoid expanding event beyond desired width */
padding: 0;
}
.week-view .md__event.has-overlaps .md__event-title {
visibility: hidden;
}
.md__event-title,
.md__event-location {
display: block;
}
.md__event .icon-calendar-alarm {
position: absolute;
top: 0.2rem;
offset-inline-end: 0;
width: 3rem;
height: 3rem;
}
/* since week view displays more events we hide some of the data */
.week-view .md__event-location,
.week-view .md__event .icon-calendar-alarm {
display: none;
}
.md__event-title {
min-height: 1.5rem;
font-size: 1.4rem;
font-weight: 500;
line-height: 1.2;
text-overflow: ellipsis;
overflow: hidden;
color: #333;
}
.day-view .md__event-title,
.md__event.is-partial .md__event-title,
.md__event.is-partial .md__event-location {
line-height: 1;
white-space: nowrap;
}
.md__event-location {
display: block;
top: 2.8rem;
min-height: 2.1rem;
padding-top: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #707070;
font-size: 1.3rem;
font-weight: 400;
}
.md__event.is-partial .md__event-location {
top: unset;
min-height: unset;
padding-top: unset;
}
.md__event.many-overlaps .md__event-title,
.md__event.many-overlaps .md__event-location {
display: none;
}
.md__event.is-partial {
padding-top: 0.4rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.md__event.is-partial-tiny,
.md__event.is-partial-small {
padding-top: 0;
padding-bottom: 0;
display: flex;
align-items: center;
}
/* location is never displayed on week view */
.day_view .md__event.is-partial-tiny .md__event-title,
.day_view .md__event.is-partial-tiny .md__event-location,
.day_view .md__event.is-partial-small .md__event-title,
.day_view .md__event.is-partial-small .md__event-location {
display: inline-block;
line-height: 1.6rem;
min-height: 0;
padding: 0;
}
/* location and title are displayed on same line but because of bidirectional
* content we can't use -moz-margin-end */
.md__event.is-partial-tiny .md__event-title + .md__event-location,
.md__event.is-partial-small .md__event-title + .md__event-location {
margin-inline-start: 0.85rem;
}
.md__event.is-partial-micro .md__event-title,
.md__event.is-partial-micro .md__event-location {
visibility: hidden;
}
.md__event.is-partial-micro .icon-calendar-alarm,
.md__event.is-partial-tiny .icon-calendar-alarm {
/* hide icon since we don't have enough space for it and using a different
* size looks weird (not consistent) */
display: none;
}
.day-view .md__event.has-alarms {
/* avoid text overlap with alarm icon */
padding-inline-end: 2.6rem;
}
.day-view .md__event.is-partial-tiny,
.day-view .md__event.is-partial-micro {
/* these doesn't display alarm, so we can display more text */
padding-inline-end: 0.3rem;
}
.md__event.is-partial-small .icon-calendar-alarm {
/* center the icon vertically if partial hour since it looks better */
top: 50%;
transform: translateY(-56%);
}
/* current time */
.md__current-time {
pointer-events: none;
display: none;
position: absolute;
width: 100%;
color: #008EAB;
font-size: 1.2rem;
line-height: 1.2rem;
margin-top: -0.6rem;
}
.md__current-time.active {
display: block;
}
.md__current-time:before {
content: '';
display: block;
position: absolute;
top: 0.25rem;
width: 0;
height: 0;
border-style: solid;
border-width: 0.4rem 0 0.4rem;
border-inline-start-width: 0.6rem;
border-color: transparent;
border-inline-start-color: #008EAB;
/* z-index here so that only the arrow goes above the events, we want the
* line to be behind the event name and alarm icon */
z-index: 15;
}
.md__current-time:after {
content: '';
display: block;
position: absolute;
top: 0.6rem;
height: 0.1rem;
/* we use border-top instead of background-color to avoid rouding issues on
* high resolution devices */
border-top: 0.1rem solid #008EAB;
}
.week-view .md__current-time {
text-indent: 0.2rem;
}
.week-view .md__current-time:before {
offset-inline-start: 3rem;
}
.week-view .md__current-time:after {
width: calc(100% - 3rem);
offset-inline-start: 3rem;
}
.day-view .md__current-time {
text-indent: 2.2rem;
}
.day-view .md__current-time:before {
offset-inline-start: 7rem;
}
.day-view .md__current-time:after {
width: calc(100% - 7rem);
offset-inline-start: 7rem;
}
/* double tap */
.md__add-event {
position: absolute;
display: block;
width: 100%;
height: 5rem;
background-color: #00caf2;
transition-property: opacity;
transition-duration: 100ms;
/* top is overwritten with JS */
top: 0;
}
.md__allday-events .md__add-event {
/* on weekview we need to set height as 100% to avoid scrollbar */
height: 100%;
}
.md__add-event:active,
.md__add-event:focus {
background-color: #b2f2ff;
outline: none;
}
.md__add-event:before {
color: #fff;
top: 50%;
offset-inline-start: 50%;
/* reset text-indent to show the "+" icon */
text-indent: 0;
}
html[dir="ltr"] .md__add-event:before { transform: translate(-50%, -50%); }
html[dir="rtl"] .md__add-event:before { transform: translate(50%, -50%); }