|
| 1 | +/* |
| 2 | +Copyright 2023 Adobe. All rights reserved. |
| 3 | +This file is licensed to you under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this file except in compliance with the License. You may obtain a copy |
| 5 | +of the License at <http://www.apache.org/licenses/LICENSE-2.0> |
| 6 | +Unless required by applicable law or agreed to in writing, software distributed under |
| 7 | +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS |
| 8 | +OF ANY KIND, either express or implied. See the License for the specific language |
| 9 | +governing permissions and limitations under the License. |
| 10 | +*/ |
| 11 | + |
| 12 | +/* Hide the SVG elements that only include references */ |
| 13 | +svg:has(symbol):not(:has(use)) { |
| 14 | + display: none; |
| 15 | +} |
| 16 | + |
| 17 | +:root, |
| 18 | +.spectrum { |
| 19 | + font-family: var( |
| 20 | + --spectrum-sans-font-family-stack, |
| 21 | + adobe-clean, |
| 22 | + "Adobe Clean", |
| 23 | + "Source Sans Pro", |
| 24 | + -apple-system, |
| 25 | + BlinkMacSystemFont, |
| 26 | + "Segoe UI", |
| 27 | + Roboto, |
| 28 | + Ubuntu, |
| 29 | + "Trebuchet MS", |
| 30 | + "Lucida Grande", |
| 31 | + sans-serif |
| 32 | + ); |
| 33 | + font-size: var(--spectrum-font-size-100, 16px); |
| 34 | + font-weight: var(--spectrum-regular-font-weight, normal); |
| 35 | + font-style: var(--spectrum-default-font-style, normal); |
| 36 | + line-height: var(--spectrum-line-height-100, 1.3); |
| 37 | + color: var(--spectrum-alias-text-color-default, var(--spectrum-gray-900)); |
| 38 | + |
| 39 | + background-color: var( |
| 40 | + --spectrum-alias-background-color-default, |
| 41 | + var(--spectrum-gray-100) |
| 42 | + ); |
| 43 | + |
| 44 | + -webkit-tap-highlight-color: rgba(0 0 0 / 0%); |
| 45 | +} |
| 46 | + |
| 47 | +/* Show/hide button */ |
| 48 | +.docblock-code-toggle { |
| 49 | + margin-block-end: -1px; |
| 50 | + margin-inline-end: -1px; |
| 51 | + |
| 52 | + &.docblock-code-toggle--expanded { |
| 53 | + border-block-end: 1px solid hsla(203deg, 50%, 30%, 15%); |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +/* Contains the rendered code example */ |
| 58 | +.docs-story { |
| 59 | + position: initial; |
| 60 | + overflow: auto; |
| 61 | + |
| 62 | + & > div:first-child { |
| 63 | + margin: 0; |
| 64 | + } |
| 65 | +} |
| 66 | + |
| 67 | +.sbdocs.sbdocs-preview { |
| 68 | + &, |
| 69 | + & > div:last-child { |
| 70 | + box-shadow: none !important; |
| 71 | + } |
| 72 | + |
| 73 | + /* Code snippet */ |
| 74 | + & > div:last-child:not(.docs-story) { |
| 75 | + background-color: rgba(255, 255, 255); |
| 76 | + border-block-start: 1px solid hsla(203deg, 50%, 30%, 15%); |
| 77 | + |
| 78 | + & > div:last-child { |
| 79 | + background: transparent !important; |
| 80 | + |
| 81 | + & button { |
| 82 | + align-items: center; |
| 83 | + color: #2e3438; |
| 84 | + background: #fff; |
| 85 | + border: 1px solid hsla(203deg, 50%, 30%, 15%); |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + & pre.prismjs { |
| 91 | + padding: 10px; |
| 92 | + } |
| 93 | +} |
| 94 | + |
| 95 | +.prismjs > * { |
| 96 | + font-family: var( |
| 97 | + --spectrum-code-font-family-stack, |
| 98 | + "Source Code Pro", |
| 99 | + "SF Mono", |
| 100 | + "Menlo", |
| 101 | + "Consolas", |
| 102 | + "Courier New", |
| 103 | + monospace |
| 104 | + ) !important; |
| 105 | + font-size: var(--spectrum-code-size-s, 14px); |
| 106 | + line-height: var(--spectrum-code-line-height, 1.5); |
| 107 | + color: var(--spectrum-code-color, #000); |
| 108 | + |
| 109 | + & .token.tag { |
| 110 | + color: var(--spectrum-green-900) !important; |
| 111 | + } |
| 112 | + |
| 113 | + & .token.attr-name { |
| 114 | + color: var(--spectrum-blue-900) !important; |
| 115 | + } |
| 116 | + |
| 117 | + & .token.attr-value { |
| 118 | + color: var(--spectrum-purple-900) !important; |
| 119 | + } |
| 120 | + |
| 121 | + & .token.punctuation { |
| 122 | + color: inherit !important; |
| 123 | + } |
| 124 | +} |
0 commit comments