Skip to content

Commit 8df6e4b

Browse files
committed
steal dismiss button from coldfront
1 parent c5e886d commit 8df6e4b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

resources/templates/header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@
147147
<div class='message %s'>
148148
<h3>%s</h3>
149149
<p>%s</p>
150-
<button onclick=\"this.parentElement.style.display='none';\">X</button>
151-
</div>\n
150+
<button onclick=\"this.parentElement.style.display='none';\">×</button>
151+
</div>
152152
",
153153
$level->value,
154154
strip_tags($title),

webroot/css/messages.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.message {
22
border-radius: 10px;
3-
padding: 10px 40px 10px 40px;
3+
/* extra padding on right to make room for button */
4+
padding: 10px 80px 10px 40px;
5+
/* needed for button position: absolute */
6+
position: relative;
47
text-align: center;
58
width: fit-content;
69
margin-left: auto;
@@ -36,3 +39,12 @@
3639
color: #721c24;
3740
background-color: #f8d7da;
3841
}
42+
43+
.message button {
44+
position: absolute;
45+
top: 0;
46+
right: 0;
47+
background-color: inherit;
48+
color: inherit;
49+
font-size: 2rem;
50+
}

0 commit comments

Comments
 (0)