Created
February 4, 2021 21:19
-
-
Save amattu2/d54c19f4f755be37753a5660a7933b3b to your computer and use it in GitHub Desktop.
A "action prompt" design, made to popover content and request an action.
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
<!-- Alec M., 2021 --> | |
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Action Prompt Design</title> | |
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> | |
<style> | |
/* Variables */ | |
:root { | |
--colors-blue: #4285f4; | |
--colors-lred: rgba(231, 76, 60, 1); | |
--colors-black: #262626; | |
--colors-gblack: #3b3b3b; | |
--float-background: rgba(255, 255, 255, 0.80); | |
} | |
.box-shadow-1 { | |
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12) | |
} | |
.box-shadow-2 { | |
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); | |
} | |
.box-shadow-3 { | |
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); | |
} | |
HTML { | |
height: 100%; | |
} | |
body { | |
padding: 0; | |
margin: 0; | |
font-family: sans-serif; | |
background: var(--colors-blue); | |
} | |
.action-prompt { | |
position: fixed; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
z-index: 999999; | |
background: var(--float-background); | |
user-select: none; | |
cursor: pointer; | |
} | |
.action-prompt .action-prompt-roundel { | |
width: 132px; | |
height: 132px; | |
margin: 0 auto; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
background: var(--colors-gblack); | |
border-radius: 50%; | |
box-sizing: border-box; | |
} | |
.action-prompt .prompt-roundel-icon { | |
width: 116px; | |
height: 116px; | |
border-radius: 50%; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
background: #fff; | |
} | |
.action-prompt .prompt-roundel-icon i { | |
font-size: 43px; | |
color: var(--colors-black); | |
} | |
.action-prompt .action-prompt-message { | |
background: var(--colors-gblack); | |
color: #fff; | |
padding: 5px; | |
border-radius: 3px; | |
position: relative; | |
margin-top: 12px; | |
} | |
.action-prompt .action-prompt-message:after { | |
bottom: 100%; | |
left: 50%; | |
border: solid transparent; | |
content: " "; | |
height: 0; | |
width: 0; | |
position: absolute; | |
pointer-events: none; | |
border-color: rgba(59, 59, 59, 0); | |
border-bottom-color: #3b3b3b; | |
border-width: 12px; | |
margin-left: -12px; | |
} | |
.action-prompt .prompt-message-author { | |
font-size: 12px; | |
text-align: right; | |
} | |
.action-prompt-case { | |
padding: 10px; | |
background: #fff; | |
border-radius: 3px; | |
cursor: pointer; | |
position: relative; | |
} | |
.action-prompt .prompt-message-content { | |
max-width: 250px; | |
font-size: 15px; | |
} | |
.action-prompt .action-prompt-close { | |
cursor: pointer; | |
font-size: 36px; | |
position: absolute; | |
right: 2px; | |
top: 5px; | |
line-height: 21px; | |
color: var(--colors-gblack); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="action-prompt"> | |
<div class="action-prompt-case box-shadow-3"> | |
<div class="action-prompt-close">×</div> | |
<div class="action-prompt-roundel"> | |
<div class="prompt-roundel-icon"> | |
<i class="material-icons">message</i> | |
</div> | |
</div> | |
<div class="action-prompt-message"> | |
<div class="prompt-message-content">Hey, did you order the parts for me? We need them for tomorrow.. get them ASAP</div> | |
<div class="prompt-message-author">→ Test Tester</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preview: