matrix-public-archive/client/css/styles.css

720 lines
15 KiB
CSS

:root {
--primary-access-color: #0dbd8b;
--primary-access-color-hover: #0a8f69;
--text-color-rgb: 46, 47, 50;
}
/* apply a natural box layout model to all elements, but allowing components to change */
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
}
summary {
cursor: pointer;
}
.PrimaryActionButton {
display: inline-block;
padding: 4px 16px;
background-color: transparent;
/* Always make a pill shape */
border-radius: 9999px;
border: 1px solid #2774c2;
color: #2774c2;
line-height: 24px;
text-decoration: none;
cursor: pointer;
}
.PrimaryActionButton:hover,
.PrimaryActionButton:focus {
background-color: #2774c2;
color: #ffffff;
}
/* Based on .SessionView from Hydrogen */
.ArchiveRoomView {
/* this takes into account whether or not the url bar is hidden on mobile
(have tested Firefox Android and Safari on iOS),
see https://developers.google.com/web/updates/2016/12/url-bar-resizing */
position: fixed;
width: 100%;
height: 100%;
display: grid;
grid-template:
'status status' auto
'middle right' 1fr /
1fr 300px;
min-height: 0;
min-width: 0;
}
.ArchiveRoomView_mainArea {
grid-area: middle;
display: flex;
flex-direction: column;
width: 100%;
min-width: 0;
min-height: 0;
}
.RoomHeader_actionButton {
display: inline-flex;
justify-content: center;
align-items: center;
color: var(--icon-color--darker-20);
}
.RoomHeader_actionButton > * {
vertical-align: middle;
color: var(--icon-color--darker-20);
}
/* No need to open the right-panel when it's always visible at desktop widths */
.RoomHeader_changeDatesButton {
display: none;
}
/* No need to close the right-panel when it's always visible at desktop widths */
.RightPanelView_buttons .close {
display: none;
}
.ArchiveRoomView_mainBody {
flex: 1 1;
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
min-width: 0;
}
.ArchiveRoomView_mainBody > .Timeline {
flex: 1 0;
}
@media screen and (max-width: 800px) {
/* Only the middle needs to be visible mobile by default */
.ArchiveRoomView {
grid-template:
'status' auto
'middle' 1fr /
1fr;
}
/* Which also means hiding the right-panel by default on mobile */
.ArchiveRoomView:not(.right-shown) .RightPanelView {
display: none;
}
/* When the user opens the right-panel, show it */
.ArchiveRoomView.right-shown {
grid-template:
'status' auto
'right' 1fr /
1fr;
}
.ArchiveRoomView.right-shown .ArchiveRoomView_mainArea {
display: none;
}
/* And show the button to open the right-panel on mobile */
.RoomHeader_changeDatesButton {
display: block;
}
/* And show the button to close the right-panel on mobile */
.RightPanelView_buttons .close {
display: block;
}
}
.RightPanelContentView {
overflow: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
.RightPanelContentView_mainContent > * + * {
margin-top: 1em;
}
.RightPanelContentView_footer {
padding-left: 16px;
padding-right: 16px;
padding-bottom: 16px;
font-size: 12px;
}
.RightPanelContentView_footerLinkList > * + * {
margin-left: 1ch;
}
.RightPanelContentView_footerLink {
text-decoration: none;
}
.RightPanelContentView_footerLink:hover,
.RightPanelContentView_footerLink:focus {
color: #0098d4;
text-decoration: underline;
}
.CalendarView {
}
.CalendarView_header {
display: flex;
justify-content: space-between;
}
.CalendarView_header_prevButton,
.CalendarView_header_nextButton {
padding-left: 2em;
padding-right: 2em;
background: none;
border: 0;
}
.CalendarView_header_prevButton:hover,
.CalendarView_header_nextButton:hover {
cursor: pointer;
}
.CalendarView_heading {
position: relative;
}
.CalendarView_heading_text {
display: inline-flex;
align-items: center;
}
.CalendarView_heading_monthInput {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
opacity: 0;
cursor: pointer;
}
.fallback-input-month .CalendarView_heading_monthInput {
display: none;
}
/* The little calendar icon button in the input that opens the date picker.
* We're stretching this out over the heading */
.CalendarView_heading_monthInput::-webkit-calendar-picker-indicator {
width: 100%;
height: 100%;
margin-left: 0;
background-color: #f00;
cursor: pointer;
}
.CalendarView_heading_yearSelectFallback {
display: none;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.fallback-input-month .CalendarView_heading_yearSelectFallback {
display: block;
}
.CalendarView_calendar {
display: grid;
grid-template-columns: repeat(7, 1fr);
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
.CalendarView_dayName {
background: #eee;
}
.CalendarView_day {
padding: 2px;
}
.CalendarView_dayLink {
display: inline-block;
width: 100%;
padding-top: 18%;
padding-bottom: 18%;
text-decoration: none;
}
.CalendarView_dayLink:hover {
background-color: rgba(141, 151, 165, 0.1);
}
.CalendarView_dayLink_active {
background-color: var(--primary-access-color);
color: #ffffff;
}
.CalendarView_dayLink_active:hover {
background-color: var(--primary-access-color-hover);
}
.CalendarView_dayLink_disabled {
opacity: 0.5;
}
.TimeSelectorView {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
.TimeSelectorView_header {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 8px;
}
.TimeSelectorView_primaryTimezoneLabel {
display: inline-block;
padding: 2px 12px;
background-color: var(--primary-access-color);
/* Always make a pill shape */
border-radius: 9999px;
color: #ffffff;
}
.TimeSelectorView_timeInput {
margin-top: 6px;
padding: 2px 18px;
background: transparent;
border: 0;
/* Always make a pill shape */
border-radius: 9999px;
color: var(--primary-access-color);
font-family: inherit;
font-size: inherit;
font-weight: bold;
}
/**
* The Chrome <input type="time"> has a little clock icon that makes the whole input
* appear off-center since we don't have any border/background on it. These styles just
* scoot the time text over to appear centered regardless of the icon.
*/
@supports selector(::-webkit-calendar-picker-indicator) {
.TimeSelectorView_timeInput {
margin-right: calc(-20px - 6px - 8px);
}
.TimeSelectorView_timeInput::-webkit-calendar-picker-indicator {
width: 20px;
padding: 3px;
margin-left: 8px;
}
}
.TimeSelectorView_goAction {
position: absolute;
right: 0;
display: inline-block;
padding: 4px 16px;
margin-right: 16px;
background-color: var(--primary-access-color);
/* Always make a pill shape */
border-radius: 9999px;
border: 0;
color: #ffffff;
line-height: 24px;
text-decoration: none;
cursor: pointer;
}
.TimeSelectorView_goAction:hover {
background-color: var(--primary-access-color-hover);
}
.TimeSelectorView_footer {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 16px;
}
.TimeSelectorView_secondaryTime {
color: rgba(var(--text-color-rgb), 0.75);
font-weight: bold;
}
.TimeSelectorView_secondaryTimezoneLabel {
display: inline-block;
margin-top: 6px;
color: rgba(var(--text-color-rgb), 0.75);
}
.TimeSelectorView_scrubber {
position: relative;
width: 100%;
max-width: 600px;
}
/* Current position triangle indicator */
.TimeSelectorView_scrubber::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 8px;
height: 32px;
transform: translateX(-50%) translateY(-50%);
/* Draw some pointer triangles at our current scroll position */
/* prettier-ignore */
background-image:
/* Arrow pointing down at the top */
linear-gradient(to top right, transparent 50%, var(--primary-access-color) 0),
linear-gradient(to bottom right, var(--primary-access-color) 50%, transparent 0),
/* Arrow pointing up at the bottom */
linear-gradient(to bottom right, transparent 50%, rgba(var(--text-color-rgb), 0.2) 0),
linear-gradient(to top right, rgba(var(--text-color-rgb), 0.2) 50%, transparent 0);
background-size: 50% 4px;
background-repeat: no-repeat;
/* prettier-ignore */
background-position:
/* Arrow pointing down at the top */
left top, right top,
/* Arrow pointing up at the bottom */
left bottom, right bottom;
/* This is just a visual thing, so don't mess with clicks or selection here */
pointer-events: none;
}
/* The magnifier highlights the time range of messages in the timeline on this page */
.TimeSelectorView_magnifierBubble {
position: absolute;
top: 50%;
height: 24px;
transform: translateY(-50%);
/* Add slight highlight color to magnifier glass - Based on message highlight color */
background-color: rgb(255, 255, 138, 0.1);
border-radius: 8px;
box-shadow: 0 2px 6px rgba(var(--text-color-rgb), 0.3);
/* The magnifier is just a visual thing, so don't mess with clicks or selection here */
pointer-events: none;
}
.TimeSelectorView_scrubberScrollWrapper {
/**
* By having plain normal scrolling for this control, we get all the nice momentum
* scrolling that is native to peoples touch devices (Android, iOS, etc). We also
* emulate momentum scrolling for mouse click and dragging.
*/
overflow-x: auto;
/* Hide scrollbar in Firefox. We want scroll but no scrollbar so mobile and touchpad
people can still scroll */
scrollbar-width: none;
display: flex;
width: 100%;
cursor: grab;
}
.TimeSelectorView_scrubberScrollWrapper::-webkit-scrollbar {
/* Hide scrollbar in Safari and Chrome. We want scroll but no scrollbar so mobile and touchpad
people can still scroll */
display: none;
}
.TimeSelectorView_scrubberScrollWrapper.is-dragging {
cursor: grabbing;
user-select: none;
}
.TimeSelectorView_dial {
--tick-width: 1px;
--tick-major-height: 20px;
--tick-minor-height: 10px;
--tick-detail-height: 3px;
position: relative;
display: flex;
height: 68px;
margin: 0;
padding: 0;
/* Allow the dial to scroll to the ends with the start/end tick being in the middle */
margin: 0 50%;
list-style: none;
/* Draw some tick marks along the dial */
/* prettier-ignore */
background-image:
/* Ticks every hour */
linear-gradient(90deg, currentcolor var(--tick-width), transparent 0),
/* Last hour tick */
linear-gradient(90deg, currentcolor var(--tick-width), transparent 0),
/* Ticks every 10 mins */
linear-gradient(90deg, currentcolor var(--tick-width), transparent 0),
/* Ticks every 5 mins */
linear-gradient(90deg, rgba(var(--text-color-rgb), 0.4) var(--tick-width), transparent 0);
/* prettier-ignore */
background-repeat:
/* Ticks every hour */
repeat-x,
/* Last hour tick */
no-repeat,
/* Ticks every 10 mins */
repeat-x,
/* Ticks every 5 mins */
repeat-x;
/* prettier-ignore */
background-size:
/* Ticks every hour */
60px var(--tick-major-height),
/* Last hour tick */
var(--tick-width) var(--tick-major-height),
/* Ticks every 10 mins */
10px var(--tick-minor-height),
/* Ticks every 5 mins */
5px var(--tick-detail-height);
/* prettier-ignore */
background-position:
/* Ticks every hour */
center left,
/* Last hour tick */
center right,
/* Ticks every 10 mins */
center left,
/* Ticks every 5 mins */
center left;
}
.TimeSelectorView_incrementLabel {
flex-shrink: 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
width: 60px;
margin: 0;
white-space: nowrap;
font-size: 12px;
font-weight: bold;
}
.TimeSelectorView_incrementLabelText,
.TimeSelectorView_incrementLabelTextSecondary {
transform: translateX(-50%);
}
.TimeSelectorView_incrementLabelTextSecondary {
color: rgba(var(--text-color-rgb), 0.75);
}
/* Some custom timeline, tiles stuff */
.JumpToPreviousActivitySummaryTileView,
.JumpToNextActivitySummaryTileView {
padding: calc(20px - 1em) 0;
background: rgba(46, 48, 51, 0.1);
border-top: 1px solid rgba(46, 48, 51, 0.38);
border-bottom: 1px solid rgba(46, 48, 51, 0.38);
}
.JumpToPreviousActivitySummaryTileView {
/* no margin so it's easier to notice when you scroll up */
}
.JumpToNextActivitySummaryTileView {
margin-top: 40px;
}
.JumpToNextActivitySummaryTileView_summaryMessage {
margin-top: 1em;
margin-left: 12px;
margin-bottom: 0;
margin-right: 12px;
font-size: 1.17em;
}
.JumpToActivitySummaryTileView_activityLink {
display: inline-block;
padding: 1em 12px;
text-decoration: none;
font-weight: bold;
}
.JumpToActivitySummaryTileView_activityLink:hover,
.JumpToActivitySummaryTileView_activityLink:focus {
color: #0098d4;
text-decoration: underline;
}
.JumpToActivitySummaryTileView_activityIcon {
margin-left: 1ch;
vertical-align: bottom;
}
/* Modal */
.ModalView_modal {
width: 100%;
/* Only expand up to 500px, but on width-constrained devices, make sure there is a bit
* of gap between the modal and the edge.
*/
max-width: min(500px, 100% - 20px);
max-height: 80%;
padding: 0;
background-color: #ffffff;
border-radius: 8px;
border: 0;
box-shadow: 2px 15px 30px 0 rgb(0 0 0 / 48%);
}
.ModalView_modalInner {
overflow-y: auto;
padding: 24px;
padding-bottom: 100px;
}
.ModalView_modal::backdrop {
background-color: rgba(46, 48, 51, 0.38);
}
.ModalView_modalHeader {
display: flex;
justify-content: space-between;
}
.ModalView_modalDismissForm {
display: inline-flex;
}
.ModalView_modalDismissButton {
display: flex;
justify-content: center;
align-items: center;
padding-left: 16px;
padding-right: 16px;
background: none;
border: none;
cursor: pointer;
color: var(--icon-color);
}
.ModalView_footerActionBar {
display: flex;
justify-content: flex-end;
margin-top: 16px;
}
/* Developer options modal */
.DeveloperOptionsContentView_settingsFlag {
display: flex;
align-items: flex-start;
}
.DeveloperOptionsContentView_labelText {
line-height: 1.5em;
}
.DeveloperOptionsContentView_microcopy {
font-size: 0.85em;
line-height: 1.5em;
color: #737d8c;
}
.GeneralForm_textField {
width: 100%;
padding: 12px 16px;
border: 1px solid #e7e7e7;
border-radius: 4px;
transition: border-color 0.25s;
}
.GeneralForm_textField:focus {
outline: none;
border-color: #238cf5;
}
.GeneralForm_textField::placeholder {
color: #888888;
}
/* Error pages */
.heading-sub-detail {
font-weight: normal;
}
.tracing-span-list {
}
.tracing-span-list-item {
margin-bottom: 8px;
}
.tracing-span-item-http-details {
}
.tracing-span-item-sub-details {
margin-left: 4ch;
}