summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/objects/_action-button.scss6
-rw-r--r--src/objects/_dialog.scss8
-rw-r--r--tpl/objects/action-button.pug1
-rw-r--r--tpl/objects/dialog.pug2
4 files changed, 17 insertions, 0 deletions
diff --git a/src/objects/_action-button.scss b/src/objects/_action-button.scss
index 160aa5d..08ac625 100644
--- a/src/objects/_action-button.scss
+++ b/src/objects/_action-button.scss
@@ -223,6 +223,12 @@
223 } 223 }
224 } 224 }
225 225
226 @include iro.bem-modifier('round') {
227 padding-right: fn.dim(--pad-y);
228 padding-left: fn.dim(--pad-y);
229 border-radius: 100em;
230 }
231
226 @include iro.bem-is('disabled') { 232 @include iro.bem-is('disabled') {
227 border-color: fn.color(--disabled --border); 233 border-color: fn.color(--disabled --border);
228 background-color: fn.color(--disabled --bg); 234 background-color: fn.color(--disabled --bg);
diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss
index d83f348..9c7dc1f 100644
--- a/src/objects/_dialog.scss
+++ b/src/objects/_dialog.scss
@@ -24,6 +24,7 @@
24 display: grid; 24 display: grid;
25 grid-template-rows: auto auto 1fr auto; 25 grid-template-rows: auto auto 1fr auto;
26 grid-template-areas: 'header' 'rule' 'body' 'footer'; 26 grid-template-areas: 'header' 'rule' 'body' 'footer';
27 position: relative;
27 max-width: fn.dim(--width-md); 28 max-width: fn.dim(--width-md);
28 margin: 0 auto; 29 margin: 0 auto;
29 padding: fn.dim(--pad-y) fn.dim(--pad-x); 30 padding: fn.dim(--pad-y) fn.dim(--pad-x);
@@ -46,6 +47,13 @@
46 margin-bottom: fn.dim(--title-body-spacing); 47 margin-bottom: fn.dim(--title-body-spacing);
47 } 48 }
48 49
50 @include iro.bem-elem('close-btn') {
51 position: absolute;
52 top: iro.fn-px-to-rem(12px);
53 right: iro.fn-px-to-rem(12px);
54 font-size: fn.global-dim(--font-size --lg);
55 }
56
49 @include iro.bem-elem('rule') { 57 @include iro.bem-elem('rule') {
50 grid-area: rule; 58 grid-area: rule;
51 margin: 0; 59 margin: 0;
diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug
index eb524a2..a695bee 100644
--- a/tpl/objects/action-button.pug
+++ b/tpl/objects/action-button.pug
@@ -6,6 +6,7 @@ mixin action-button
6 'o-action-button': true, 6 'o-action-button': true,
7 'o-action-button--block': attributes.block, 7 'o-action-button--block': attributes.block,
8 'o-action-button--quiet': attributes.quiet, 8 'o-action-button--quiet': attributes.quiet,
9 'o-action-button--round': attributes.round,
9 'is-disabled': attributes.disabled, 10 'is-disabled': attributes.disabled,
10 'is-selected': attributes.selected 11 'is-selected': attributes.selected
11 } 12 }
diff --git a/tpl/objects/dialog.pug b/tpl/objects/dialog.pug
index 7e3e2d6..0ee52df 100644
--- a/tpl/objects/dialog.pug
+++ b/tpl/objects/dialog.pug
@@ -1,12 +1,14 @@
1include rule.pug 1include rule.pug
2include button.pug 2include button.pug
3include heading.pug 3include heading.pug
4include action-button.pug
4 5
5mixin dialog(title) 6mixin dialog(title)
6 .o-dialog.t-raised 7 .o-dialog.t-raised
7 header.o-dialog__header 8 header.o-dialog__header
8 +div-heading('lg')(class='o-dialog__title') 9 +div-heading('lg')(class='o-dialog__title')
9 = title 10 = title
11 +action-button(round=true quiet=true icon='x' class='o-dialog__close-btn')
10 +rule('medium')(class='o-dialog__rule') 12 +rule('medium')(class='o-dialog__rule')
11 section.o-dialog__body 13 section.o-dialog__body
12 block 14 block