|
| 1 | +details.sd-dropdown { |
| 2 | + position: relative; |
| 3 | + |
| 4 | + .sd-summary-title { |
| 5 | + font-weight: 700; |
| 6 | + // don't overlap the chevron |
| 7 | + padding-right: 3em !important; |
| 8 | + -moz-user-select: none; |
| 9 | + -ms-user-select: none; |
| 10 | + -webkit-user-select: none; |
| 11 | + user-select: none; |
| 12 | + } |
| 13 | + |
| 14 | + &:hover { |
| 15 | + cursor: pointer; |
| 16 | + } |
| 17 | + |
| 18 | + .sd-summary-content { |
| 19 | + cursor: default; |
| 20 | + } |
| 21 | + |
| 22 | + summary { |
| 23 | + // hide the default triangle marker |
| 24 | + list-style: none; |
| 25 | + padding: 1em; |
| 26 | + |
| 27 | + // Ellipsis added when no title |
| 28 | + .sd-octicon.no-title { |
| 29 | + vertical-align: middle; |
| 30 | + } |
| 31 | + } |
| 32 | + |
| 33 | + &[open] summary .sd-octicon.no-title { |
| 34 | + visibility: hidden; |
| 35 | + } |
| 36 | + |
| 37 | + // chrome doesn't yet support list-style |
| 38 | + summary::-webkit-details-marker { |
| 39 | + display: none; |
| 40 | + } |
| 41 | + |
| 42 | + summary:focus { |
| 43 | + outline: none; |
| 44 | + } |
| 45 | + |
| 46 | + .sd-summary-icon { |
| 47 | + margin-right: 0.5em; |
| 48 | + } |
| 49 | + |
| 50 | + .sd-summary-icon svg { |
| 51 | + opacity: 0.8; |
| 52 | + } |
| 53 | + |
| 54 | + summary:hover .sd-summary-up svg, |
| 55 | + summary:hover .sd-summary-down svg { |
| 56 | + opacity: 1; |
| 57 | + transform: scale(1.1); |
| 58 | + } |
| 59 | + |
| 60 | + .sd-summary-up svg, |
| 61 | + .sd-summary-down svg { |
| 62 | + display: block; |
| 63 | + opacity: 0.6; |
| 64 | + } |
| 65 | + |
| 66 | + .sd-summary-up, |
| 67 | + .sd-summary-down { |
| 68 | + pointer-events: none; |
| 69 | + position: absolute; |
| 70 | + right: 1em; |
| 71 | + top: 1em; |
| 72 | + } |
| 73 | + |
| 74 | + &[open] > .sd-summary-title .sd-summary-down { |
| 75 | + visibility: hidden; |
| 76 | + } |
| 77 | + |
| 78 | + &:not([open]) > .sd-summary-title .sd-summary-up { |
| 79 | + visibility: hidden; |
| 80 | + } |
| 81 | + |
| 82 | + // Hide the card body border when not open |
| 83 | + &:not([open]).sd-card { |
| 84 | + border: none; |
| 85 | + } |
| 86 | + &:not([open]) > .sd-card-header { |
| 87 | + border: 1px solid var(--sd-color-card-border); |
| 88 | + border-radius: 0.25rem; |
| 89 | + } |
| 90 | + |
| 91 | + // Transition animation |
| 92 | + &.sd-fade-in[open] summary ~ * { |
| 93 | + -moz-animation: sd-fade-in 0.5s ease-in-out; |
| 94 | + -webkit-animation: sd-fade-in 0.5s ease-in-out; |
| 95 | + animation: sd-fade-in 0.5s ease-in-out; |
| 96 | + } |
| 97 | + |
| 98 | + &.sd-fade-in-slide-down[open] summary ~ * { |
| 99 | + -moz-animation: |
| 100 | + sd-fade-in 0.5s ease-in-out, |
| 101 | + sd-slide-down 0.5s ease-in-out; |
| 102 | + -webkit-animation: |
| 103 | + sd-fade-in 0.5s ease-in-out, |
| 104 | + sd-slide-down 0.5s ease-in-out; |
| 105 | + animation: |
| 106 | + sd-fade-in 0.5s ease-in-out, |
| 107 | + sd-slide-down 0.5s ease-in-out; |
| 108 | + } |
| 109 | +} |
| 110 | + |
| 111 | +.sd-col > .sd-dropdown { |
| 112 | + width: 100%; |
| 113 | +} |
| 114 | + |
| 115 | +.sd-summary-content > .sd-tab-set:first-child { |
| 116 | + margin-top: 0; |
| 117 | +} |
| 118 | + |
| 119 | +@keyframes sd-fade-in { |
| 120 | + 0% { |
| 121 | + opacity: 0; |
| 122 | + } |
| 123 | + |
| 124 | + 100% { |
| 125 | + opacity: 1; |
| 126 | + } |
| 127 | +} |
| 128 | + |
| 129 | +@keyframes sd-slide-down { |
| 130 | + 0% { |
| 131 | + transform: translate(0, -10px); |
| 132 | + } |
| 133 | + |
| 134 | + 100% { |
| 135 | + transform: translate(0, 0); |
| 136 | + } |
| 137 | +} |
0 commit comments