Last active
April 13, 2020 02:22
-
-
Save hoyangtsai/e64d1309fca1143e4bd429889e10aee8 to your computer and use it in GitHub Desktop.
css utils
This file contains hidden or 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
/* | |
list item keep indent when multiple line | |
*/ | |
.cssClass li { | |
list-style-type: disc; | |
list-style-position: inside; | |
text-indent: -1em; | |
padding-left: 1em; | |
} | |
/* | |
border-concave | |
*/ | |
.border-concave { | |
width: 100%; | |
height: 5.87rem; | |
position: absolute; | |
bottom: 0; | |
overflow: hidden; | |
&:before { | |
content: ""; | |
position: absolute; | |
left: 50%; | |
transform: translateX(-50%); | |
top: -10%; | |
width: 100%; | |
padding: 50%; // curve deg | |
border-radius: 50%; | |
box-shadow: 0 0 0 3rem #5924c5 inset; //border think | |
} | |
} | |
/* | |
Title on background | |
*/ | |
.bg-title { | |
z-index: -5; | |
font-family: Tahoma; | |
line-height: 1; | |
text-transform: uppercase; | |
display: inline-block; | |
position: absolute; | |
font-weight: 600; | |
color: rgba(255, 255, 255, 1); | |
text-shadow: | |
-2px 0px 0 #555, | |
-2px 1px 0 #555, | |
6px 2px 0 #555, | |
-2px -2px 0 #555; | |
left: 0; | |
} | |
/* | |
Align video in background center | |
*/ | |
video.bg-center { | |
display: block; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
width: 100%; | |
height: 100%; | |
transform: translateX(-50%) translateY(-50%); | |
object-fit: cover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment