blob: da1277d89aa9b88869bb4f7a6c7b09cc38fb8258 [file] [log] [blame]
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
.timeline-ruler {
position: relative;
pointer-events: none;
z-index: 1;
--timeline-ruler-marker-translateX: -1px;
}
.timeline-ruler.allows-time-range-selection:not(.disabled) {
pointer-events: all;
}
.timeline-ruler.resizing-selection,
.timeline-ruler.resizing-selection > .selection-drag {
cursor: col-resize;
}
.timeline-ruler > * {
pointer-events: none;
}
body[dir=ltr] .timeline-ruler > .header > .divider,
body[dir=ltr] .timeline-ruler > .markers > :matches(.divider, .marker) {
transform: translateX(var(--timeline-ruler-marker-translateX));
}
body[dir=rtl] .timeline-ruler > .header > .divider,
body[dir=rtl] .timeline-ruler > .markers > :matches(.divider, .marker) {
transform: translateX(calc(-1 * var(--timeline-ruler-marker-translateX)));
}
.timeline-ruler > .header {
border-bottom: 1px solid var(--border-color);
position: absolute;
top: 0;
left: 0;
right: 0;
height: var(--timeline-ruler-height);
--timeline-ruler-height: 23px;
}
.timeline-ruler > .header > .divider {
position: absolute;
width: 1px;
top: 0;
bottom: 0;
background-image: linear-gradient(to bottom, hsla(0, 0%, 70%, 0), hsla(0, 0%, 70%, 2) 85%);
}
body.window-inactive .timeline-ruler > .header > .divider {
background-image: linear-gradient(to bottom, hsla(0, 0%, 85%, 0), hsla(0, 0%, 85%, 1) 85%);
}
.timeline-ruler > .header > .divider > .label {
position: absolute;
top: 6px;
font-size: 9px;
color: hsl(0, 0%, 50%);
white-space: nowrap;
--timeline-ruler-header-divider-label-offset-end: 5px;
}
body[dir=ltr] .timeline-ruler > .header > .divider > .label {
right: var(--timeline-ruler-header-divider-label-offset-end);
}
body[dir=rtl] .timeline-ruler > .header > .divider > .label {
left: var(--timeline-ruler-header-divider-label-offset-end);
}
.timeline-ruler > .markers {
position: absolute;
top: 22px;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.timeline-ruler > .markers > .divider {
position: absolute;
width: 1px;
top: 1px;
bottom: 0;
background-color: hsla(0, 0%, 0%, 0.05);
}
.timeline-ruler > .markers > .marker {
position: absolute;
top: 0;
bottom: 0;
pointer-events: all;
border: 0 solid hsla(0, 0%, 50%, 0.5);
}
body[dir=ltr] .timeline-ruler > .markers > .marker {
border-left-width: 1px;
}
body[dir=rtl] .timeline-ruler > .markers > .marker {
border-right-width: 1px;
}
/* Larger tooltip area */
.timeline-ruler > .markers > .marker {
z-index: 20;
width: 3px;
}
.timeline-ruler > .markers > .marker::before {
width: 3px;
content: "";
position: absolute;
top: 0;
bottom: 0;
--timeline-ruler-marker-before-offset-start: -3px;
}
body[dir=ltr] .timeline-ruler > .markers > .marker::before {
left: var(--timeline-ruler-marker-before-offset-start);
}
body[dir=rtl] .timeline-ruler > .markers > .marker::before {
right: var(--timeline-ruler-marker-before-offset-start);
}
.timeline-ruler > .markers > .marker.current-time {
border-color: red;
}
.timeline-ruler > .markers > .marker.current-time::before {
position: absolute;
top: -5px;
width: 9px;
height: 9px;
background-color: red;
border-radius: 5px;
content: "";
--timeline-ruler-marker-before-offset-start: -5px;
}
.timeline-ruler > .markers > .marker.load-event {
border-color: hsla(0, 100%, 50%, 0.25);
}
.timeline-ruler > .markers > .marker.dom-content-event {
border-color: hsla(240, 100%, 50%, 0.25);
}
.timeline-ruler > .markers > .marker.timestamp {
border-color: hsla(119, 100%, 21%, 0.25);
}
.timeline-ruler > .selection-drag {
position: absolute;
top: 0;
height: 23px;
}
.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag {
cursor: -webkit-grab;
pointer-events: all;
}
.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag:active {
cursor: -webkit-grabbing;
}
.timeline-ruler > .selection-handle {
position: absolute;
top: 0;
width: 8px;
height: 22px;
border-radius: 5px;
background-color: hsl(0, 0%, 64%);
border: 1px solid white;
cursor: col-resize;
pointer-events: all;
z-index: 15;
--timeline-ruler-selection-handle-translateX: -4px;
}
.timeline-ruler.disabled > .selection-handle {
display: none;
}
.timeline-ruler.selection-hidden > :matches(.selection-drag, .selection-handle, .shaded-area) {
display: none;
}
.timeline-ruler > .selection-handle.clamped {
border-color: hsl(0, 0%, 64%);
background-color: white;
}
.timeline-ruler > .selection-handle:hover,
.timeline-ruler > .selection-handle:active {
background-color: hsl(0, 0%, 50%);
border-color: white;
}
.timeline-ruler.both-handles-clamped > .selection-handle {
z-index: 14;
}
.timeline-ruler > .selection-handle.clamped.hidden {
display: none;
}
body[dir=ltr] .timeline-ruler > .selection-handle.left,
body[dir=rtl] .timeline-ruler > .selection-handle.right {
transform: translateX(var(--timeline-ruler-selection-handle-translateX));
}
body[dir=ltr] .timeline-ruler > .selection-handle.right,
body[dir=rtl] .timeline-ruler > .selection-handle.left {
transform: translateX(calc(-1 * var(--timeline-ruler-selection-handle-translateX)));
}
.timeline-ruler > .shaded-area {
position: absolute;
top: 0;
bottom: 0;
background-color: hsla(0, 0%, 0%, 0.1);
z-index: 15;
}
body[dir=ltr] .timeline-ruler > .shaded-area.left,
body[dir=rtl] .timeline-ruler > .shaded-area.right {
left: 0;
}
body[dir=ltr] .timeline-ruler > .shaded-area.right,
body[dir=rtl] .timeline-ruler > .shaded-area.left {
right: 0;
}