Last active
January 18, 2022 19:12
-
-
Save spaquet/53990f614d79de229f021fa7e6985cd3 to your computer and use it in GitHub Desktop.
Rails Popper Stimulus Stylesheet
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
#tooltip { | |
background: #333; | |
color: white; | |
font-weight: bold; | |
padding: 4px 8px; | |
font-size: 13px; | |
border-radius: 4px; | |
display: none; | |
} | |
#arrow, | |
#arrow::before { | |
position: absolute; | |
width: 8px; | |
height: 8px; | |
background: inherit; | |
} | |
#arrow { | |
visibility: hidden; | |
} | |
#arrow::before { | |
visibility: visible; | |
content: ""; | |
transform: rotate(45deg); | |
} | |
#tooltip[data-popper-placement^="top"] > #arrow { | |
bottom: -4px; | |
} | |
#tooltip[data-popper-placement^="bottom"] > #arrow { | |
top: -4px; | |
} | |
#tooltip[data-popper-placement^="left"] > #arrow { | |
right: -4px; | |
} | |
#tooltip[data-popper-placement^="right"] > #arrow { | |
left: -4px; | |
} | |
#tooltip[data-show] { | |
display: block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment