|
| 1 | +/** |
| 2 | + * Based on https://github.com/Fevol/obsidian-translate/blob/master/src/ui/translator-components/SettingsPage.svelte |
| 3 | + */ |
| 4 | + |
| 5 | +.linter-navigation-item { |
| 6 | + cursor: pointer; |
| 7 | + border-radius: 100px; |
| 8 | + border: 1px solid var(--background-modifier-border); |
| 9 | + border-radius: 8px 8px 2px 2px; |
| 10 | + |
| 11 | + font-weight: bold; |
| 12 | + font-size: 16px; |
| 13 | + |
| 14 | + display: flex; |
| 15 | + flex-direction: row; |
| 16 | + white-space: nowrap; |
| 17 | + |
| 18 | + padding: 4px 6px; |
| 19 | + align-items: center; |
| 20 | + gap: 4px; |
| 21 | + overflow: hidden; |
| 22 | + |
| 23 | + background-color: var(--background-primary-secondary-alt); |
| 24 | + |
| 25 | + transition: color 0.25s ease-in-out, |
| 26 | + padding 0.25s ease-in-out, |
| 27 | + background-color 0.35s cubic-bezier(0.45, 0.25, 0.83, 0.67), |
| 28 | + max-width 0.35s cubic-bezier(0.57, 0.04, 0.58, 1); |
| 29 | + height: 32px; |
| 30 | +} |
| 31 | + |
| 32 | +@media screen and (max-width: 1325px) { |
| 33 | + .linter-navigation-item.linter-desktop { |
| 34 | + max-width: 32px; |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +@media screen and (max-width: 800px) { |
| 39 | + .linter-navigation-item.linter-mobile { |
| 40 | + max-width: 32px; |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +.linter-navigation-item-icon { |
| 45 | + padding-top: 5px; |
| 46 | +} |
| 47 | + |
| 48 | +.linter-navigation-item:hover { |
| 49 | + border-color: var(--interactive-accent-hover); |
| 50 | + border-bottom: 0px; |
| 51 | +} |
| 52 | + |
| 53 | +.linter-navigation-item-selected { |
| 54 | + background-color: var(--interactive-accent) !important; |
| 55 | + color: var(--text-on-accent); |
| 56 | + padding: 4px 9px !important; |
| 57 | + max-width: 100% !important; |
| 58 | + border: 1px solid var(--background-modifier-border); |
| 59 | + border-radius: 8px 8px 2px 2px; |
| 60 | + border-bottom: 0px; |
| 61 | + transition: color 0.25s ease-in-out, |
| 62 | + padding 0.25s ease-in-out, |
| 63 | + background-color 0.35s cubic-bezier(0.45, 0.25, 0.83, 0.67), |
| 64 | + max-width 0.45s cubic-bezier(0.57, 0.04, 0.58, 1) 0.2s; |
| 65 | +} |
| 66 | + |
| 67 | +/** |
| 68 | + * Based on https://github.com/phibr0/obsidian-commander/blob/main/src/styles.scss |
| 69 | + */ |
| 70 | +.linter { |
| 71 | + transition: transform 400ms 0s; |
| 72 | +} |
| 73 | + |
| 74 | +.linter-setting-title { |
| 75 | + display: flex; |
| 76 | + align-items: baseline; |
| 77 | + justify-content: space-between; |
| 78 | + gap: 30px; |
| 79 | +} |
| 80 | +.linter-setting-title.linter-mobile { |
| 81 | + justify-content: space-around; |
| 82 | +} |
| 83 | +.linter-setting-title h1 { |
| 84 | + font-weight: 900; |
| 85 | + margin-top: 6px; |
| 86 | + margin-bottom: 12px; |
| 87 | +} |
| 88 | + |
| 89 | +.linter-setting-header { |
| 90 | + margin-bottom: 24px; |
| 91 | + overflow-y: hidden; |
| 92 | + overflow-x: auto; |
| 93 | +} |
| 94 | + |
| 95 | +.linter-setting-header .linter-setting-tab-group { |
| 96 | + display: flex; |
| 97 | + align-items: flex-end; |
| 98 | + flex-wrap: wrap; |
| 99 | + width: 100%; |
| 100 | +} |
| 101 | +.linter-setting-tab-group { |
| 102 | + margin-top: 6px; |
| 103 | + padding-left: 2px; |
| 104 | + padding-right: 2px; |
| 105 | + border-bottom: 2px solid var(--background-modifier-border); |
| 106 | +} |
| 107 | + |
| 108 | +.linter-setting-header .linter-tab-settings { |
| 109 | + padding: 6px 12px; |
| 110 | + font-weight: 600; |
| 111 | + cursor: pointer; |
| 112 | + white-space: nowrap; |
| 113 | + border-left: 2px solid transparent; |
| 114 | + border-right: 2px solid transparent; |
| 115 | +} |
| 116 | +.linter-setting-header .linter-tab-settings:first-child { |
| 117 | + margin-left: 6px; |
| 118 | +} |
| 119 | +.linter-setting-header .linter-tab-settings.linter-tab-settings-active { |
| 120 | + border-bottom: 2px solid var(--background-primary); |
| 121 | + transform: translateY(2px); |
| 122 | + border-radius: 2px; |
| 123 | + border-left: 2px solid var(--background-modifier-border); |
| 124 | + border-top: 2px solid var(--background-modifier-border); |
| 125 | + border-right: 2px solid var(--background-modifier-border); |
| 126 | +} |
| 127 | + |
| 128 | +/** Hide linter element css |
| 129 | + * Based on https://zellwk.com/blog/hide-content-accessibly/ |
| 130 | + */ |
| 131 | +.linter-navigation-item:not(.linter-navigation-item-selected) > span:nth-child(2), |
| 132 | +.linter-visually-hidden { |
| 133 | + border: 0; |
| 134 | + clip: rect(0 0 0 0); |
| 135 | + clip-path: rect(0 0 0 0); |
| 136 | + height: auto; |
| 137 | + margin: 0; |
| 138 | + overflow: hidden; |
| 139 | + padding: 0; |
| 140 | + position: absolute; |
| 141 | + width: 1px; |
| 142 | + white-space: nowrap; |
| 143 | +} |
| 144 | + |
| 145 | +/** |
| 146 | +* Full-width text areas |
| 147 | +* Based on https://github.com/nyable/obsidian-code-block-enhancer/blob/bb0c636c1e7609b6d26c48a8d7ca15d5cd9abdcf/src/styles/index.scss |
| 148 | +*/ |
| 149 | +textarea.full-width { |
| 150 | + width: 100%; |
| 151 | + min-height: 10em; |
| 152 | + margin-top: 0.8em; |
| 153 | + margin-bottom: 0.8em; |
| 154 | +} |
| 155 | + |
| 156 | +.full-width-textbox-input-wrapper { |
| 157 | + position: relative; |
| 158 | +} |
| 159 | + |
| 160 | +.settings-copy-button { |
| 161 | + position: absolute; |
| 162 | + top: 0.8em; |
| 163 | + right: 0.8em; |
| 164 | + margin: 0 0 0 auto; |
| 165 | + padding: 4px; |
| 166 | +} |
| 167 | + |
| 168 | +.settings-copy-button svg.linter-clipboard path { |
| 169 | + fill: var(--text-faint); |
| 170 | +} |
| 171 | +.settings-copy-button svg.linter-success path { |
| 172 | + fill: var(--interactive-success); |
| 173 | +} |
| 174 | +.settings-copy-button:hover, .settings-copy-button:active { |
| 175 | + cursor: pointer; |
| 176 | +} |
| 177 | +.settings-copy-button:hover svg path, .settings-copy-button:active svg path { |
| 178 | + fill: var(--text-accent-hover); |
| 179 | + transition: all ease 0.3s; |
| 180 | +} |
| 181 | +.settings-copy-button:focus { |
| 182 | + outline: 0; |
| 183 | +} |
| 184 | + |
| 185 | +/** |
| 186 | +* Custom regex replacement |
| 187 | +*/ |
| 188 | +.linter-custom-regex-replacement-container div:last-child{ |
| 189 | + border: none; |
| 190 | +} |
| 191 | +.linter-custom-regex-replacement { |
| 192 | + margin-bottom: 15px; |
| 193 | + border: none; |
| 194 | + border-bottom: var(--hr-thickness) solid; |
| 195 | + border-color: var(--hr-color); |
| 196 | +} |
| 197 | +.linter-custom-regex-replacement-row2 { |
| 198 | + flex-wrap: wrap; |
| 199 | +} |
| 200 | +.linter-custom-regex-replacement-normal-input { |
| 201 | + width: 40%; |
| 202 | +} |
| 203 | +.linter-custom-regex-replacement-flags { |
| 204 | + width: 15%; |
| 205 | +} |
| 206 | +.linter-custom-regex-replacement-label { |
| 207 | + flex-direction: row-reverse; |
| 208 | +} |
| 209 | +.linter-custom-regex-replacement-label-input { |
| 210 | + width: 50%; |
| 211 | +} |
| 212 | + |
| 213 | +/** |
| 214 | +* Setting item no border |
| 215 | +*/ |
| 216 | +.linter-no-border { |
| 217 | + border: none; |
| 218 | +} |
| 219 | + |
| 220 | +/** |
| 221 | +* Custom row |
| 222 | +*/ |
| 223 | +.custom-row-description { |
| 224 | + margin-top: 0px; |
| 225 | +} |
0 commit comments