/* * Copyright (C) 2023 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. */ .details-section > .content > .group > .row.font-variation { --axisValueWidth: 36px; --axisTagWidth: var(--axisValueWidth); display: grid; gap: 6px; grid-template-columns: [axis-tag] var(--axisTagWidth) [slider] 1fr [axis-value] minmax(max-content, var(--axisValueWidth)); padding: 5px 20px 5px 12px; } .details-section > .content > .group > .row.font-variation > .label:not(:empty) { grid-column: 1 / -1; } .details-section > .content > .group > .row.font-variation > .tag { grid-column: axis-tag; color: var(--text-color-secondary); } .details-section > .content > .group > .row.font-variation > .value { grid-column: axis-value; text-align: end; font-variant-numeric: tabular-nums; } .details-section > .content > .group > .row.font-variation:has(.warning) > .value { margin-inline-end: 8px; /* Clearance so warning icon doesn't overlap the axis value. */ } .details-section > .content > .group > .row.font-variation > .variation-range { display: grid; grid-column: slider; grid-template-columns: [min-value] 1fr [max-value] 1fr; } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"] { appearance: none; grid-column: 1 / -1; position: relative; margin-block: 3px 8px; margin-inline: 0; background-color: transparent; } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::-webkit-slider-thumb { appearance: none; position: relative; z-index: 2; margin-top: -9px; width: 8px; height: 20px; border-radius: 6px; background: var(--slider-thumb-background); box-shadow: var(--slider-thumb-box-shadow); } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::-webkit-slider-thumb:active { background: var(--slider-thumb-background-active); } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; box-shadow: var(--slider-track-box-shadow); background: var(--slider-track-background); } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::before, .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::after { content: ""; position: absolute; z-index: 1; top: -1px; width: 2px; height: 8px; border-radius: 4px; background-color: var(--slider-track-tick-background); } .details-section > .content > .group > .row.font-variation > .variation-range > input[type="range"]::after { right: 0; } .details-section > .content > .group > .row.font-variation > .variation-range > .variation-minvalue { grid-column: min-value; color: var(--text-color-secondary); } .details-section > .content > .group > .row.font-variation > .variation-range > .variation-maxvalue { grid-column: max-value; text-align: end; color: var(--text-color-secondary); }