More <message-dialog> fixes.

This commit is contained in:
WrinklyNinja
2014-07-18 21:56:07 +01:00
parent 2bc97f6c89
commit 7cccdace70
2 changed files with 5 additions and 7 deletions
+4 -4
View File
@@ -178,14 +178,14 @@ dialog {
dialog > h1 {
margin: 0;
margin-bottom: 1em;
text-align: center;
font-weight: normal;
display: inline-block;
}
dialog > span:first-child {
font-size: 4em;
position: absolute;
left: 1em;
top: 23px;
position: relative;
margin-right: 0.5em;
top: 0.2em;
}
dialog[data-type=warn] > span:first-child {
color: gold;
+1 -3
View File
@@ -93,8 +93,6 @@ var messageDialogProto = Object.create(HTMLDialogElement.prototype, {
/* A type of 'error' or 'info' produces an 'OK'-only dialog box. */
value: function(type, title, text, onClose) {
this.setAttribute('data-type', type);
this.querySelector('h1').textContent = title;
this.querySelector('p').textContent = text;
@@ -103,7 +101,7 @@ var messageDialogProto = Object.create(HTMLDialogElement.prototype, {
if (type == 'error' || type == 'info') {
this.querySelector('.accept').textContent = 'OK';
hideElement(this.querySelector('.cancel'));
this.querySelector('.cancel').style.display = 'hidden';
}
HTMLDialogElement.prototype.showModal.call(this);