Last active
March 30, 2021 14:54
-
-
Save ScottDillman/d3b165f664ff8381f9d697f0f7111309 to your computer and use it in GitHub Desktop.
CSS fragment to create notices and pulsating bullets from code blocks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* I use .app-container to get around CSS selector specificity | |
*/ | |
.app-container pre[class*="language-note-"] { | |
border: 2px solid; | |
} | |
/* Make the first line of note bold */ | |
*[class*="language-note"]::first-line { | |
font-weight: bold; | |
} | |
.app-container pre[class*="language-note-"] code[class*="language-note-"] { | |
color: rgba(0, 0, 0, 0.781); | |
text-shadow:0 0 2px rgba(0, 0, 0, 0.0); | |
background-color: transparent; | |
white-space: pre-wrap; | |
/* css-3 */ | |
font-family: var(--default-font); | |
} | |
.app-container pre.language-note-red { | |
border-color: rgb(255, 82, 82); | |
background-color: rgba(255, 82, 82, 0.75); | |
} | |
.app-container pre.language-note-orange { | |
border-color: rgb(255, 121, 63); | |
background-color: rgba(255, 121, 63, 0.75); | |
} | |
.app-container pre.language-note-yellow { | |
border-color: rgb(255, 177, 66); | |
background-color: rgba(255, 177, 66,0.75); | |
} | |
.app-container pre.language-note-green { | |
border-color: rgb(51, 217, 178); | |
background-color: rgba(51, 217, 178,0.75); | |
} | |
.app-container pre.language-note-blue { | |
border-color: rgb(52, 172, 224); | |
background-color: rgba(52, 172, 224, 0.75); | |
} | |
.app-container pre.language-note-purple { | |
border-color: rgb(142, 68, 173); | |
background-color: rgba(142, 68, 173,0.75); | |
} | |
.app-container pre.language-note-white { | |
border-color: rgb(255,255,255); | |
background-color: rgba(255, 255, 255, 0.75); | |
} | |
.app-container pre.language-note-black { | |
border-color: rgb(0, 0, 0); | |
background-color: rgba(0, 0, 0, 0.75); | |
} | |
/* pulsing bullet marker */ | |
/* | |
usage: | |
```bullet-pulse-red | |
``` | |
*/ | |
.app-container pre[class*="language-bullet-"] code[class*="language-bullet-"] { | |
white-space: pre-wrap; | |
} | |
@keyframes pulse { | |
0% { | |
transform: scale(0.95); | |
box-shadow: 0 0 0 0; | |
} | |
70% { | |
transform: scale(1); | |
box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); | |
} | |
100% { | |
transform: scale(0.95); | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); | |
} | |
} | |
.app-container pre.language-bullet-pulse-red { | |
background: rgb(255, 82, 82); | |
color: rgb(255, 82, 82); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-orange { | |
background: rgb(255, 121, 63); | |
color: rgb(255, 121, 63); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-yellow { | |
background: rgb(255, 177, 66); | |
color: rgb(255, 177, 63); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-green { | |
background: rgb(51, 217, 178); | |
color: rgba(51, 217, 178,0.75); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-blue { | |
background: rgb(52, 172, 224); | |
color: rgb(52, 172, 224); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-purple { | |
background: rgb(142, 68, 173); | |
color: rgb(142, 68, 173); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-white { | |
background: rgb(255, 255, 255); | |
color: rgb(255, 255, 255); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} | |
.app-container pre.language-bullet-pulse-black { | |
background: rgb(0, 0, 0); | |
color: rgb(0, 0, 0); | |
position: absolute; | |
font-size: 0.3rem; | |
left: 0.5rem; | |
box-shadow: 0 0 0 0 rgba(0, 0, 0, 1); | |
transform: scale(1); | |
animation: pulse 2s infinite; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment