| 40 | EACH TD CORRESPONDS TO A COLUMN 41 | THEY ARE ORDERED TOP TO BOTTOM, IN ORDER FROM LEFT TO RIGHT 42 | 43 | THIS SPAN IS WHERE YOUR RETURNS INFO IS (links, images, text) 44 | 45 | | 46 |
Some text
*/ 42 | 43 | 44 | /* From Gabroel - https://discord.com/channels/686053708261228577/702656734631821413/789334135788273724 and scroll down that page. Code was not quite correct, so here is the right code. */ 45 | 46 | .stickies { 47 | text-align: center; 48 | transition: width 2s; 49 | padding: 5px; 50 | margin: 10px; 51 | position: relative; 52 | float: right; 53 | right: -30px; 54 | box-shadow: 0 10px 10px 2px rgba(0, 0, 0, 0.3); 55 | width: 40%; 56 | background: hotpink; 57 | -webkit-transform: rotate(0deg); 58 | -moz-transform: rotate(0deg); 59 | -o-transform: rotate(0deg); 60 | -ms-transform: rotate(0deg); 61 | transform: rotate(2deg); 62 | transition: all 2s ease; 63 | z-index: 1; 64 | padding-top: 10px; 65 | padding-bottom: 10px; 66 | border-radius: 0px; 67 | color: black; 68 | } 69 | 70 | .stickies::after { 71 | content: ""; 72 | left: -1%; 73 | top: -10px; 74 | background: ffff00; 75 | height: 40px; 76 | width: 15px; 77 | border-radius: 10px; 78 | border: 3px solid black; 79 | display: inline-block; 80 | position: absolute; 81 | -webkit-transform: rotate(0deg); 82 | -moz-transform: rotate(0deg); 83 | -o-transform: rotate(0deg); 84 | -ms-transform: rotate(0deg); 85 | transform: rotate(-11deg); 86 | z-index: 11; 87 | } 88 | 89 | .stickies::before { 90 | width: 11px; 91 | height: 20px; 92 | content: ""; 93 | background: ffff00; 94 | display: inline-block; 95 | position: absolute; 96 | left: -1.3%; 97 | top: -2px; 98 | border-radius: 10px; 99 | border: 3px solid black; 100 | border-bottom: 0; 101 | border-bottom-right-radius: 0; 102 | border-bottom-left-radius: 0; 103 | z-index: 10; 104 | -webkit-transform: rotate(0deg); 105 | -moz-transform: rotate(0deg); 106 | -o-transform: rotate(0deg); 107 | -ms-transform: rotate(0deg); 108 | transform: rotate(-11deg); 109 | } 110 | 111 | .stickies2 { 112 | position: relative; 113 | float: left; 114 | box-shadow: 0 10px 10px 2px rgba(0, 0, 0, 0.3); 115 | width: 30%; 116 | background: #edec92; 117 | -webkit-transform: rotate(0deg); 118 | -moz-transform: rotate(0deg); 119 | -o-transform: rotate(0deg); 120 | -ms-transform: rotate(0deg); 121 | transform: rotate(-2deg); 122 | transition: all 2s ease; 123 | z-index: 1; 124 | padding: 20px; 125 | margin: 10px; 126 | color: black; 127 | } 128 | 129 | .stickies2::after { 130 | content: ""; 131 | display: block; 132 | height: 32px; 133 | width: 2px; 134 | position: absolute; 135 | left: 50%; 136 | top: -10px; 137 | z-index: 1; 138 | border-radius: 50%; 139 | display: inline-block; 140 | height: 15px; 141 | width: 15px; 142 | border: 1px; 143 | box-shadow: inset -10px -10px 10px #f0b7a4, inset 3px 3px 5px; 144 | } 145 | ``` 146 | 147 | ```css 148 | /* Another sticky possibility from j314 - https://discord.com/channels/686053708261228577/702656734631821413/801873554785566760 149 | /* NOTE: syntax to be used to have a sticky rendered 150 | /*Some text
*/ 151 | 152 | .sticky { 153 | background-color:var(--yellow); 154 | padding:10px; 155 | width:300px; 156 | height:200px; 157 | color:black; 158 | margin-left:150px; 159 | font-family: chalkboard; 160 | box-shadow: 10px 10px 7px rgb(0,0,0,0.5); 161 | transform:rotate(3deg); 162 | transition: transform .15s linear; 163 | } 164 | .sticky:hover { 165 | transform:scale(1.1); 166 | } 167 | ``` 168 | 169 | ## Images with a piece of scotch tape effect - thanks to Lithou 170 | 171 | ```css 172 | /* placement of images */ 173 | /* After putting the code below, you can get the tape effect doing */ 174 | /* ![[imagename.png#tape]] */ 175 | /* refer to Lithou's sandbox https://github.com/lithou/sandbox */ 176 | 177 | div{ 178 | --coremarg: 1%; 179 | --extramarg: 1%; /* This margin is used for any added margin between items */ 180 | --defaultwidth: 60%; /*This is the default width for core flags such as the "side" and "tape" */ 181 | } 182 | 183 | /* Core Flags */ 184 | /* side */ 185 | 186 | div[alt*="+side"]{ 187 | position: relative; 188 | width: var(--defaultwidth); 189 | float: right; 190 | margin: 0px; 191 | margin-left: var(--coremarg); 192 | } 193 | 194 | /* tape */ 195 | 196 | div[alt*="+tape"] { 197 | position: relative; 198 | float: right; 199 | width: var(--defaultwidth); 200 | margin-left: var(--coremarg); 201 | -webkit-transform: rotate(0deg); 202 | -moz-transform: rotate(0deg); 203 | -o-transform: rotate(0deg); 204 | -ms-transform: rotate(0deg); 205 | transform: rotate(2deg); 206 | } 207 | 208 | div[alt*="+tape"]::before { 209 | content: ""; 210 | display: block; 211 | position: relative; 212 | margin: auto; 213 | width: 100px; 214 | height: 30px; 215 | top: 12px; 216 | background: rgba(255, 234, 118, 0.377); /*here you can chosse the scotch tape background*/ 217 | -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.4); 218 | -moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.4); 219 | box-shadow: 0px 1px 3px rgba(0,0,0,0.4); 220 | z-index: 10; 221 | clip-path: polygon(50% 0%, 100% 0%, 222 | 98% 10%, 100% 20%, 98% 30%, 100% 40%, 98% 50%, 100% 60%, 98% 70%, 100% 80%, 98% 90%,100% 100%, 223 | 0% 100%, 2% 90%, 0% 80%, 2% 70%, 0% 60%, 2% 50%, 0% 40%, 2% 30%, 0% 20%, 2% 10%, 0% 0%); 224 | } 225 | div[alt*="-lg"]::before{ 226 | width: 100px; 227 | height: 30px; 228 | } 229 | 230 | div[alt*="-med"]::before{ 231 | width: 70px; 232 | height: 25px; 233 | } 234 | 235 | div[alt*="-sm"]::before{ 236 | width: 45px; 237 | height: 15px; 238 | top: 8px; 239 | } 240 | div[alt*="-thumb"]::before{ 241 | width: 25px; 242 | height: 5px; 243 | top: 2px; 244 | } 245 | ``` 246 | 247 | ```css 248 | /* Push Pin */ 249 | 250 | div[alt*="+pin"] { 251 | position: relative; 252 | float: right; 253 | width: var(--defaultwidth); 254 | margin: auto; 255 | margin-left: var(--coremarg); 256 | -webkit-transform: rotate(0deg); 257 | -moz-transform: rotate(0deg); 258 | -o-transform: rotate(0deg); 259 | -ms-transform: rotate(0deg); 260 | transform: rotate(2deg);} 261 | div[alt*="+pin"]::before { 262 | content: ""; 263 | position: absolute; 264 | width: 5px; 265 | height: 5px; 266 | background-color: #4588cc; 267 | top: -3%; 268 | left: 50%; 269 | border: solid #336699 8px; 270 | border-radius: 50%; 271 | box-shadow: #274d74 -5px 3px 1px;} 272 | /* Portrait and Landscape */ 273 | div[alt*="+portrait"]{ 274 | position: relative; 275 | width: calc(var(--defaultwidth)/2); 276 | float: right; 277 | /* background-color:blue; This setting will create a border effect of set color */ 278 | clip-path: ellipse(36% 46% at 50% 50%);} 279 | div[alt*="+portrait"]>img{ 280 | vertical-align: middle; 281 | clip-path: ellipse(35% 45% at 50% 50%);} 282 | div[alt*="+landscape"]{ 283 | position: relative; 284 | width: var(--defaultwidth); 285 | float: right; 286 | /* background-color:blue; This setting will create a border effect of set color */ 287 | clip-path: ellipse(46% 36% at 50% 50%);} 288 | div[alt*="+landscape"]>img{ 289 | vertical-align: middle; 290 | clip-path: ellipse(45% 35% at 50% 50%);} 291 | ``` 292 | 293 | ```css 294 | /* Banner and HR */ 295 | 296 | div[alt*="+banner"]{ 297 | height: 100px; 298 | overflow: hidden; 299 | 300 | } 301 | 302 | div[alt*="+banner"]>img{ 303 | margin-top: -130px; 304 | } 305 | 306 | div[alt*="+hr"]{ 307 | height: 10px; 308 | overflow: hidden; 309 | border-radius: 20px; 310 | 311 | } 312 | 313 | div[alt*="+hr"]>img{ 314 | margin-top: -200px; 315 | } 316 | ``` 317 | 318 | ```css 319 | /* Custom Core Flags */ 320 | 321 | div[alt*="+custom1"]{ 322 | position: relative; 323 | width: var(--defaultwidth); 324 | float: right; 325 | margin-top: 0px; 326 | margin-bottom: 0px; 327 | } 328 | div[alt*="+custom2"]{ 329 | position: relative; 330 | width: var(--defaultwidth); 331 | float: right; 332 | margin-top: 0px; 333 | margin-bottom: 0px; 334 | } 335 | ``` 336 | 337 | ```css 338 | /* Modifier Flags */ 339 | /* Orientation and position */ 340 | 341 | div[alt*="-left"]{ 342 | float: left; 343 | margin: 0px; 344 | margin-right: var(--extramarg);} 345 | div[alt*="-right"]{ 346 | float: right; 347 | margin: 0px; 348 | margin-left: var(--extramarg);} 349 | div[alt*="-fix"]{position: fixed;} 350 | div[alt*="-abs"]{position: absolute;} 351 | ``` 352 | 353 | ```css 354 | /* Size */ 355 | 356 | div[alt*="-thumb"]{width: 11.50%;} 357 | div[alt*="-sm"]{width: 24%;} 358 | div[alt*="-med"]{width: 32.3333%;} 359 | div[alt*="-lg"]{width: 49%;} 360 | div[alt*="-huge"]{width: 67%;} 361 | div[alt*="-cwidth"]{float: none;margin-left: -10%;width: 120%;} 362 | ``` 363 | 364 | ```css 365 | /* Borders */ 366 | 367 | div[alt*="-border1"]>img{border: solid black 3px;} 368 | div[alt*="-border2"]>img{border: solid white 3px;} 369 | div[alt*="-bradius1"]>img{border-radius: 5px;} 370 | div[alt*="-bradius2"]>img{border-radius: 20px;} 371 | div[alt*="-bradiustl"]>img{border-top-left-radius: 20px;} 372 | div[alt*="-bradiusbr"]>img{border-bottom-right-radius: 20px;} 373 | div[alt*="-bradiustr"]>img{border-top-right-radius: 20px;} 374 | div[alt*="-bradiusbl"]>img{border-bottom-left-radius: 20px;} 375 | div[alt*="-bthick"]>img{border-width: 5px;} 376 | div[alt*="-bthin"]>img{border-width: 1px;} 377 | ``` 378 | 379 | ```css 380 | /* Div Borders */ 381 | 382 | div[alt*="-divborder1"]{border: solid #336699 2px;} 383 | div[alt*="-divborder2"]{border: solid black 2px;} 384 | div[alt*="-divbradius1"]{border-radius: 5px;} 385 | div[alt*="-divbradius2"]{border-radius: 20px;} 386 | div[alt*="-cdivbradius1"]{border-radius: 50px;} 387 | 388 | div[alt*="-shadow1"]>img{ 389 | box-shadow: darkgrey -2px 2px 2px; 390 | 391 | } 392 | 393 | div[alt*="-glow"]>img{ 394 | box-shadow: darkgrey 0px 0px 20px; 395 | } 396 | 397 | div[alt*="-nofloat"]{ 398 | float:none 399 | } 400 | ``` 401 | -------------------------------------------------------------------------------- /dmytro-shulha/Headers.md: -------------------------------------------------------------------------------- 1 | # Headers 2 | 3 | ```css 4 | /* List styling (H1 numbering ONLY) for note content */ 5 | 6 | /* initialize css counter */ 7 | body { 8 | counter-reset: head-num-1; 9 | } 10 | 11 | /* put counter result into H1 headings */ 12 | .markdown-source-view .cm-formatting-header-1::after , h1::before { 13 | counter-increment: head-num-1; 14 | content: counter(head-num-1) ". "; 15 | } 16 | 17 | /* Do not render H6 header in Preview */ 18 | h6 { 19 | display: none; 20 | } 21 | ``` 22 | 23 | ```css 24 | /* Selection the first H1 header of the Note */ 25 | pre:nth-of-type(2).HyperMD-header.HyperMD-header-1 { 26 | color: red; 27 | } 28 | ``` 29 | 30 | ```css 31 | /* Change just 1 particular header */ 32 | /* Note: gap between 1st and 2nd line must be put in ! */ 33 | 34 | ``` 35 | 36 | OR put it in an html element with a class that changes the color 37 | 38 | ```css 39 | .important { 40 | color: red; 41 | } 42 | 43 | 44 | 45 | /* changing the color of the header in edit mode */ 46 | .cm-header-1 { 47 | color:rgb(203, 77, 73); 48 | } 49 | 50 | /* Gradient coloured headers in Edit and Preview mode */ 51 | .cm-s-obsidian .cm-header-1, 52 | .markdown-preview-view h1 { 53 | background: linear-gradient(to right, gold, coral); /* choose any 2 colors you like */ 54 | -webkit-background-clip: text; 55 | color: transparent; 56 | width: fit-content; 57 | } 58 | 59 | /* Coloured headings for editor and preview in Dracula */ 60 | .cm-header-1, .markdown-preview-view h1 61 | { 62 | font-family: var(--font-family-editor); 63 | font-weight: 500; 64 | font-size: var(--font-size-h1); 65 | color: var(--text-title-h1); 66 | } 67 | 68 | .cm-header-2, .markdown-preview-view h2 69 | { 70 | font-family: var(--font-family-editor); 71 | font-weight: 500; 72 | font-size: var(--font-size-h2); 73 | color: var(--text-title-h2); 74 | } 75 | 76 | .cm-header-3, .markdown-preview-view h3 77 | { 78 | font-family: var(--font-family-editor); 79 | font-weight: 500; 80 | font-size: var(--font-size-h3); 81 | color: var(--text-title-h3); 82 | } 83 | 84 | .cm-header-4, .markdown-preview-view h4 85 | { 86 | font-family: var(--font-family-editor); 87 | font-weight: 500; 88 | font-size: var(--font-size-h4); 89 | color: var(--text-title-h4); 90 | } 91 | 92 | .cm-header-5, .markdown-preview-view h5 93 | { 94 | font-family: var(--font-family-editor); 95 | font-weight: 500; 96 | font-size: var(--font-size-h5); 97 | color: var(--text-title-h5); 98 | } 99 | 100 | .cm-header-6, .markdown-preview-view h6 101 | { 102 | font-family: var(--font-family-editor); 103 | font-weight: 500; 104 | font-size: var(--font-size-h6); 105 | color: var(--text-title-h6); 106 | } */ 107 | 108 | /* Coloured headings for editor and preview, same font-weight in Edit & Preview */ 109 | .cm-s-obsidian .cm-header-1, 110 | .markdown-preview-view h1 { 111 | font-weight: 450; 112 | color: rgb(123, 108, 214); /* was(115, 98, 205); */ 113 | } 114 | 115 | .cm-s-obsidian .cm-header-2, 116 | .markdown-preview-view h2 { 117 | font-weight: 450; 118 | color: rgb(123, 108, 214); 119 | } 120 | 121 | .cm-s-obsidian .cm-header-3, 122 | .markdown-preview-view h3 { 123 | font-weight: 450; 124 | color: rgb(123, 108, 214); 125 | } 126 | 127 | .cm-s-obsidian .cm-header-4, 128 | .markdown-preview-view h4 { 129 | font-weight: 450; 130 | color: rgb(123, 108, 214); 131 | } 132 | 133 | .cm-s-obsidian .cm-header-5, 134 | .markdown-preview-view h5 { 135 | font-weight: 450; 136 | color: rgb(123, 108, 214); 137 | } 138 | 139 | .cm-s-obsidian .cm-header-6, 140 | .markdown-preview-view h6 { 141 | font-weight: 450; 142 | color: rgb(123, 108, 214); 143 | } 144 | 145 | /* Underline H1 heading in Edit mode */ 146 | /* .cm-header-1 { 147 | border-bottom: 1px solid var(--text-accent); 148 | } */ 149 | 150 | .cm-s-obsidian pre.HyperMD-header-1:after { 151 | content: ""; 152 | position: absolute; 153 | bottom: 5px; 154 | left: 5px; 155 | width: calc(100% - 10px); 156 | height: 1px; 157 | background: var(--text-accent); /* rgb(123, 108, 214); */ 158 | } 159 | ``` 160 | 161 | ```css 162 | 163 | /* Eliminate margin (gap, space) under headings - Preview mode only */ 164 | /* H1 underlined too */ 165 | .markdown-preview-view h1 { 166 | padding-bottom: 5px; 167 | border-bottom: 1px solid var(--base2); /* PB changed from --text-accent */ 168 | margin-bottom: -10px; 169 | } 170 | 171 | .markdown-preview-view h2, 172 | .markdown-preview-view h3, 173 | .markdown-preview-view h4, 174 | .markdown-preview-view h5, 175 | .markdown-preview-view h6 { 176 | margin-bottom: -20px; 177 | padding-bottom: 5px; 178 | } 179 | 180 | /* Changing size/color of the header hashtags # */ 181 | .cm-formatting-header { 182 | color: var(--text-faint); 183 | font-size: 0.6em; 184 | } 185 | 186 | /* USED IN CONTEXT OF "REMOVE CLUTTER" */ 187 | /* Replace header hashes (#) by H1, H2, etc. in edit mode */ 188 | /* from Blue Topaz theme: DIRTY WYSIWYM HEADERS by _ph */ 189 | 190 | /* Header folder icon */ 191 | .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { 192 | padding-left: -10px; 193 | } 194 | 195 | .CodeMirror-sizer{ 196 | margin-left: 35px !important; 197 | } 198 | 199 | /*-- reduce left padding --*/ 200 | .CodeMirror { 201 | height: 100%; 202 | direction: ltr; 203 | padding: 0 5px; 204 | } 205 | 206 | /*-- hide # markup--*/ 207 | .cm-formatting.cm-formatting-header.cm-formatting-header-1.cm-header.cm-header-1, 208 | .cm-formatting.cm-formatting-header.cm-formatting-header-2.cm-header.cm-header-2, 209 | .cm-formatting.cm-formatting-header.cm-formatting-header-3.cm-header.cm-header-3, 210 | .cm-formatting.cm-formatting-header.cm-formatting-header-4.cm-header.cm-header-4, 211 | .cm-formatting.cm-formatting-header.cm-formatting-header-5.cm-header.cm-header-5, 212 | .cm-formatting.cm-formatting-header.cm-formatting-header-6.cm-header.cm-header-6 213 | {font-size:0px;} 214 | 215 | /*-- display H1-h6 in gutter--*/ 216 | .cm-formatting.cm-formatting-header.cm-formatting-header-1.cm-header.cm-header-1:before{ 217 | content:"H1"; 218 | font-size:14px; 219 | color: var(--h1ys); 220 | left:-36.5px; 221 | top:11px; 222 | position:absolute; 223 | } 224 | .cm-formatting.cm-formatting-header.cm-formatting-header-2.cm-header.cm-header-2:before{ 225 | content:"H2"; 226 | font-size:13px; 227 | color: var(--h2ys); 228 | left:-36.5px; 229 | top:9px; 230 | position:absolute; 231 | } 232 | .cm-formatting.cm-formatting-header.cm-formatting-header-3.cm-header.cm-header-3:before{ 233 | content:"H3"; 234 | font-size:12px; 235 | color: var(--h3ys); 236 | left:-36.7px; 237 | top: 7px; 238 | position:absolute; 239 | } 240 | .cm-formatting.cm-formatting-header.cm-formatting-header-4.cm-header.cm-header-4:before{ 241 | content:"H4"; 242 | font-size:11px; 243 | color: var(--h4ys); 244 | left:-20.5px; 245 | top: 7px; 246 | position:absolute; 247 | } 248 | .cm-formatting.cm-formatting-header.cm-formatting-header-5.cm-header.cm-header-5:before{ 249 | content:"H5"; 250 | font-size:10px; 251 | color: var(--h5ys); 252 | left:-20px; 253 | top: 9px; 254 | position:absolute; 255 | } 256 | .cm-formatting.cm-formatting-header.cm-formatting-header-6.cm-header.cm-header-6:before{ 257 | content:"H6"; 258 | font-size:9px; 259 | color: var(--h6ys); 260 | left:-19.5px; 261 | top: 9px; 262 | position:absolute; 263 | } 264 | 265 | /*-- is active line, hide H[1-6] in gutter --*/ 266 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-1.cm-header.cm-header-1:before, 267 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-2.cm-header.cm-header-2:before, 268 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-3.cm-header.cm-header-3:before, 269 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-4.cm-header.cm-header-4:before, 270 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-5.cm-header.cm-header-5:before, 271 | .CodeMirror-activeline span.cm-formatting.cm-formatting-header.cm-formatting-header-6.cm-header.cm-header-6:before 272 | {font-size:0px;} 273 | 274 | /*-- is active line, display # markup --*/ 275 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-1.cm-header.cm-header-1{ 276 | font-size:24px; 277 | display:inline; 278 | } 279 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-2.cm-header.cm-header-2{ 280 | font-size:22px; 281 | display:inline; 282 | } 283 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-3.cm-header.cm-header-3{ 284 | font-size:20px; 285 | display:inline; 286 | } 287 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-4.cm-header.cm-header-4{ 288 | font-size:18px; 289 | display:inline; 290 | } 291 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-5.cm-header.cm-header-5{ 292 | font-size:16px; 293 | display:inline; 294 | } 295 | .CodeMirror-activeline > pre > span .cm-formatting.cm-formatting-header.cm-formatting-header-6.cm-header.cm-header-6{ 296 | font-size:16px; 297 | display:inline; 298 | } 299 | 300 | /* Change header size in Edit mode */ 301 | .cm-header-1 { 302 | font-size: 27px; 303 | } 304 | 305 | .cm-header-2 { 306 | font-size: 22px; 307 | } 308 | 309 | .cm-header-3 { 310 | font-size: 21px; 311 | } 312 | 313 | .cm-header-4 { 314 | font-size: 19px; 315 | } 316 | 317 | .cm-header-5 { 318 | font-size: 16px; 319 | } 320 | 321 | .cm-header-6 { 322 | font-size: 13px; 323 | } 324 | 325 | /* Change header size in Preview mode */ 326 | .markdown-preview-view h1 { 327 | font-size: 27px; 328 | } 329 | 330 | .markdown-preview-view h2 { 331 | font-size: 20px; 332 | } 333 | 334 | .markdown-preview-view h3 { 335 | font-size: 21px; 336 | } 337 | 338 | .markdown-preview-view h4 { 339 | font-size: 19px; 340 | } 341 | 342 | .markdown-preview-view h5 { 343 | font-size: 16px; 344 | } 345 | 346 | .markdown-preview-view h6 { 347 | font-size: 13px; 348 | font-weight: bold; 349 | } 350 | ``` 351 | 352 | ```css 353 | /* Automatically convert H1 headings to capitals in the Outline pane */ 354 | .outline .tree-item-inner { 355 | text-transform: uppercase; 356 | } 357 | 358 | .outline .tree-item-children .tree-item-inner { 359 | text-transform: none; 360 | } 361 | ``` 362 | 363 | If you need to have H1 headings capitalized in the note text, use: 364 | 365 | ```css 366 | /* Automatically convert H1 headings to capitals in text */ 367 | .cm-header-1, .markdown-preview-view h1 { 368 | text-transform: uppercase; 369 | } 370 | ``` 371 | 372 | In Live Preview, header hashes are hidden if the line is not active. 373 | Some people prefer to keep them visible to know what level header they are dealing with. 374 | The code below is courtesy of @NothingIsLost on the Discord forum. 375 | 376 | ```css 377 | .cm-line > span.cm-header-1:not(.cm-formatting):before { content: "# "; } 378 | .cm-line.cm-active > span.cm-header-1 > span:not(.cm-selection):before { content: "# "; } 379 | .cm-line > span.cm-header-1 ~ span.cm-header-1:not(.cm-formatting):before { content: ""; } 380 | 381 | .cm-line > span.cm-header-2:not(.cm-formatting):before { content: "## "; } 382 | .cm-line.cm-active > span.cm-header-2 > span:not(.cm-selection):before { content: "## "; } 383 | .cm-line > span.cm-header-2 ~ span.cm-header-2:not(.cm-formatting):before { content: ""; } 384 | 385 | .cm-line > span.cm-header-3:not(.cm-formatting):before { content: "### "; } 386 | .cm-line.cm-active > span.cm-header-3 > span:not(.cm-selection):before { content: "### "; } 387 | .cm-line > span.cm-header-3 ~ span.cm-header-3:not(.cm-formatting):before { content: ""; } 388 | 389 | .cm-line > span.cm-header-4:not(.cm-formatting):before { content: "#### "; } 390 | .cm-line.cm-active > span.cm-header-4 > span:not(.cm-selection):before { content: "#### "; } 391 | .cm-line > span.cm-header-4 ~ span.cm-header-4:not(.cm-formatting):before { content: ""; } 392 | 393 | .cm-line > span.cm-header-5:not(.cm-formatting):before { content: "##### "; } 394 | .cm-line.cm-active > span.cm-header-5 > span:not(.cm-selection):before { content: "##### "; } 395 | .cm-line > span.cm-header-5 ~ span.cm-header-5:not(.cm-formatting):before { content: ""; } 396 | 397 | .cm-line > span.cm-header-6:not(.cm-formatting):before { content: "###### "; } 398 | .cm-line.cm-active > span.cm-header-6 > span:not(.cm-selection):before { content: "###### "; } 399 | .cm-line > span.cm-header-6 ~ span.cm-header-6:not(.cm-formatting):before { content: ""; } 400 | ``` 401 | -------------------------------------------------------------------------------- /dmytro-shulha/File explorer - Obsidian.md: -------------------------------------------------------------------------------- 1 | # File explorer - Obsidian 2 | ```css 3 | /* condense line spacing on file explorer title list. also avoids character-level word breaks */ 4 | .nav-file-title-content, 5 | .search-result-file-title, 6 | .search-result-file-match { 7 | padding-top: 0 !important; 8 | padding-bottom: 0 !important; 9 | line-height: normal !important; 10 | word-break: keep-all; 11 | } 12 | 13 | /* file xplor : smaller & bold vault title */ 14 | .nav-folder.mod-root > .nav-folder-title { 15 | padding-left: 6px; 16 | font-size: 14px; 17 | font-weight: bolder; 18 | top:-6px; /* higher */ 19 | cursor: default; 20 | color: var(--base2); 21 | } 22 | 23 | /* Enhancing the view of folders in left pane */ 24 | /* by Shamama on https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/112 */ 25 | 26 | /* outliner for the outline */ 27 | .outline-heading-children{ 28 | border-left: 1px solid rgba(118,158,165,0.2); 29 | border-radius:0 0px 0px 0; 30 | transition:all 0.5s ease-in-out; 31 | } 32 | 33 | .outline-heading-children:hover{ 34 | border-left-color:rgba(118,158,165,0.4); 35 | } 36 | 37 | /* Connectining lines for files and folders in left pane*/ 38 | .nav-folder,.nav-file{ 39 | margin:0 !important; 40 | border-left: 1px solid rgba(118,158,165,0.2); 41 | } 42 | 43 | /* == File Explorer - animation for active file as per Obuntu === */ 44 | .nav-file-title, 45 | .nav-folder-title { 46 | padding: 0px 14px 0px 20px; 47 | } 48 | 49 | .nav-folder-title { 50 | font-weight: bold; 51 | } 52 | 53 | .nav-folder.mod-root > .nav-folder-title { 54 | padding-left: 6px; 55 | font-size: 14px; 56 | font-weight: bolder; 57 | top: -6px; 58 | cursor: default; 59 | } 60 | 61 | .nav-file.is-active > .nav-file-title, 62 | .nav-file.is-active > .nav-file-title:hover { 63 | background-color: var(--background-primary); 64 | border-radius: 6px; 65 | font-weight: bold; 66 | /* color: var(--text-accent); */ 67 | border-left: 2px solid var(--text-accent); 68 | transition: all 0.5s ease; 69 | } 70 | 71 | .nav-file.is-active > .nav-file-title { 72 | padding-left: 5px; 73 | /* margin-left: 5px; */ 74 | } 75 | 76 | body:not(.is-grabbing) .nav-file-title:hover, 77 | body:not(.is-grabbing) .nav-folder-title:hover { 78 | background-color: var(--background-primary); 79 | border-radius: 2px; 80 | transition: all 0.2s ease; 81 | } 82 | 83 | .nav-file-tag { 84 | background-color: var(--background-secondary-alt); 85 | top: -1px; 86 | } 87 | 88 | /* Folder and file icons */ 89 | .nav-folder-children .nav-file-title-content:first-child::before { content: '🗒 '; } 90 | .nav-folder-children .nav-folder-title-content::before { content: '📂 '; } 91 | 92 | /* add colour to folder icons - needs 2 lines of .nav-folder-children above to work*/ 93 | .nav-folder-title-content::before { 94 | 95 | font-size: 17px; 96 | /* 97 | how to get CSS filter ? 98 | 0, open website: 99 | https://www.zhangxinxu.com/sp/filter.html 100 | 101 | 1, first: image original cloro this is : #000 102 | 2, second: display color i want : #D6FFF1 103 | 3, CSS filter trans btn clik: the result is : 104 | filter: invert(99%) sepia(90%) saturate(382%) hue-rotate(69deg) brightness(106%) contrast(102%); 105 | 106 | 4, pause👇 : OK ✌️; 107 | */ 108 | filter: invert(88%) sepia(8%) saturate(554%) hue-rotate(103deg) brightness(108%) contrast(102%); 109 | 110 | /* 111 | If you want to change the icon, you only need to modify this code.you can only change d='' 112 | */ 113 | 114 | content: url("data:image/svg+xml;charset=UTF-8, "); 115 | 116 | /* margin */ 117 | margin-right: 5px !important; 118 | } 119 | 120 | /*hover color*/ 121 | .nav-folder-title:hover .nav-folder-title-content::before { 122 | 123 | /* hover color #69fafd 👆 CSS filter 👇 */ 124 | filter: invert(87%) sepia(20%) saturate(1026%) hue-rotate(113deg) brightness(105%) contrast(103%); 125 | } 126 | 127 | /* change font size of file explorer */ 128 | .nav-file-title, .nav-folder-title { font-size: 14px; line-height: 15px; } 129 | 130 | /* change font size of search results */ 131 | .search-result-file-title { font-size: xyz; } 132 | .search-result-file-matches { font-size: xyz; } 133 | 134 | /* Reduce space of header buttons/icons - Blue Topaz */ 135 | div.nav-header{ 136 | padding: 0px 5px 5px 5px; 137 | margin-bottom: 0px; 138 | margin-top: 5px; 139 | line-height: 0px; 140 | } 141 | div.nav-buttons-container{ 142 | margin: 0px 0px 0px 0px; 143 | } 144 | input.search-input{ 145 | margin: 0px 10px -3px 10px; 146 | } 147 | .nav-action-button{ 148 | margin: 0px 2px 0px 2px !important; 149 | } 150 | .workspace-leaf-content[data-type='search'] .nav-action-button, .workspace-leaf-content[data-type='backlink'] .nav-action-button{ 151 | padding: 3px 3px 3px 3px; 152 | } 153 | 154 | /* Fix background of folder-collapse-indicator */ 155 | body:not(.is-grabbing) .nav-folder-title:hover .nav-folder-collapse-indicator { 156 | background: none; 157 | } 158 | 159 | /* Line up tabs with macOS traffic lights */ 160 | .hider-frameless .workspace-split.mod-left-split > .workspace-tabs { 161 | padding: 0;} 162 | .workspace-tab-container-inner { 163 | padding-left:30px; 164 | } 165 | ``` 166 | 167 | ## Chest-of-drawers icon in nav tab - California Coast theme by mgmeyers 168 | ```css 169 | /* Note: css variables do not work in embedded svgs, so 170 | I took the rgb equivalents of var(--text-accent) when active 171 | and of var(--text-faint) for not active */ 172 | 173 | /* when the tab is NOT in focus */ 174 | .theme-light 175 | .workspace-tab-header[aria-label="File explorer"] 176 | .workspace-tab-header-inner-icon:after { 177 | opacity: 0.5; 178 | content: url('data:image/svg+xml; utf8, '); 179 | } 180 | 181 | .theme-light 182 | .workspace-tab-header[aria-label="File explorer"]:hover 183 | .workspace-tab-header-inner-icon:after { 184 | opacity: 0.5; 185 | content: url('data:image/svg+xml; utf8, '); 186 | } 187 | 188 | /* when the tab is in focus */ 189 | .theme-light 190 | .workspace-tab-header[aria-label="File explorer"].is-active 191 | .workspace-tab-header-inner-icon:after { 192 | opacity: 0.5; 193 | content: url('data:image/svg+xml; utf8, '); 194 | } 195 | 196 | /* when the tab is NOT in focus */ 197 | .theme-dark 198 | .workspace-tab-header[aria-label="File explorer"] 199 | .workspace-tab-header-inner-icon:after { 200 | content: url('data:image/svg+xml; utf8, '); 201 | } 202 | 203 | .theme-dark 204 | .workspace-tab-header[aria-label="File explorer"]:hover 205 | .workspace-tab-header-inner-icon:after { 206 | content: url('data:image/svg+xml; utf8, '); 207 | } 208 | 209 | /* when the tab is in focus */ 210 | .theme-dark 211 | .workspace-tab-header[aria-label="File explorer"].is-active 212 | .workspace-tab-header-inner-icon:after { 213 | content: url('data:image/svg+xml; utf8, '); 214 | } 215 | 216 | .workspace-tab-header[aria-label="File explorer"] 217 | .workspace-tab-header-inner-icon:after, 218 | .view-header-icon:after, 219 | .search-input-clear-button:before, 220 | .document-search-close-button:before { 221 | line-height: 1; 222 | display: inline-block; 223 | width: 18px; 224 | height: 18px; 225 | } 226 | 227 | .workspace-tab-header[aria-label="File explorer"] 228 | .workspace-tab-header-inner-icon 229 | > svg { 230 | display: none; 231 | } 232 | ``` 233 | 234 | ## Nav titles 235 | ```css 236 | /* Wrap long nav text */ 237 | .nav-file-title, .nav-folder-title { 238 | white-space: normal; 239 | width: auto; 240 | } 241 | 242 | /* Indent wrapped nav text */ 243 | .nav-file-title-content { 244 | margin-left: 10px; 245 | text-indent: -10px; 246 | } 247 | 248 | /* Set background color when hovering over a title */ 249 | .nav-file-title-content:hover { 250 | background-color: var(--base4); 251 | } 252 | ``` 253 | 254 | ## Top tab container background color 255 | ```css 256 | .theme-dark { 257 | --background1: rgb(51, 51, 51); 258 | } 259 | 260 | .theme-light { 261 | --background1: #f2f8fd; 262 | } 263 | 264 | .workspace-tab-header-container { 265 | background-color: var(--background1); 266 | } 267 | 268 | .workspace-tab-container-before.is-before-active .workspace-tab-header-inner, 269 | .workspace-tab-container-after.is-after-active .workspace-tab-header-inner, 270 | .workspace-tab-header.is-before-active .workspace-tab-header-inner, 271 | .workspace-tab-header.is-after-active .workspace-tab-header-inner { 272 | background-color: var(--background1); 273 | } 274 | 275 | .workspace-tab-header, 276 | .workspace-tab-header-inner, 277 | .workspace-tab-container-before, 278 | .workspace-tab-container-after { 279 | transition: none; 280 | } 281 | 282 | .workspace-tabs { 283 | background-color: var(--background1); 284 | } 285 | ``` 286 | 287 | ## Emojis in folder name 288 | /* 2 examples */ 289 | ```css 290 | .nav-folder-title[data-path="+inbox"] .nav-folder-title-content::before { 291 | content: "📥 "; 292 | font-size:1.3em; 293 | } 294 | 295 | .nav-folder-title[data-path="+Obsidian"] .nav-folder-title-content::before { 296 | content: "⚙️ "; 297 | font-size:1.3em; 298 | } 299 | ``` 300 | 301 | ## Hide a folder 302 | Note: If you don’t know the data-path to put in the code below, you can open the developer with 303 | CTRL/CMD+SHIFT+I and check the path. Beware, the data path only updates after a restart for newly file/folder. 304 | ```css 305 | div[data-path='folder'], 306 | div[data-path='folder'] + div.nav-folder-children 307 | { 308 | display: none; 309 | } 310 | ``` 311 | 312 | # Hide a file 313 | ```css 314 | .nav-file-title[data-path="file_path.md"] { 315 | display: none; 316 | } 317 | ``` 318 | --------------------------------------------------------------------------------