Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions demo/modals/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ <h1 class="c-dialog__header">Big</h1>
tincidunt id purus vel posuere.</p>
</div>
<footer class="c-dialog__footer">
<button class="c-dialog__footer__item c-btn c-btn--primary js-close">OK</button>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--basic js-close">Cancel</button>
</div>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--primary js-close">OK</button>
</div>
</footer>
</section></textarea>
</div>
Expand All @@ -285,8 +290,12 @@ <h1 class="c-dialog__header">Big</h1>
gastropub. Austin quinoa butcher, everyday carry echo park sartorial
VHS.</p>
<footer class="c-dialog__footer">
<code class="c-dialog__footer__item c-code" dir="ltr">.c-dialog__footer</code
><button class="c-dialog__footer__item c-btn c-btn--primary js-close">OK</button>
<div class="c-dialog__footer__item">
<code class="c-code" dir="ltr">.c-dialog__footer</code>
</div>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--primary js-close">OK</button>
</div>
</footer>
</section>

Expand Down Expand Up @@ -325,8 +334,12 @@ <h1 class="c-dialog__header">Big</h1>
mlkshk hexagon.</p>
</div>
<footer class="c-dialog__footer">
<button class="c-dialog__footer__item c-btn c-btn--basic js-close">Cancel</button
><button class="c-dialog__footer__item c-btn c-btn--primary js-close">OK</button>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--basic js-close">Cancel</button>
</div>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--primary js-close">OK</button>
</div>
</footer>
</section>

Expand All @@ -348,8 +361,12 @@ <h1 class="c-dialog__header">Big</h1>
bitters, blog letterpress pinterest vegan dreamcatcher. Selvage meh lomo
90's, crucifix banjo seitan knausgaard kitsch salvia actually bespoke.</p>
<footer class="c-dialog__footer">
<button class="c-dialog__footer__item c-btn c-btn--basic js-close">Cancel</button
><button class="c-dialog__footer__item c-btn c-btn--primary js-close">OK</button>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--basic js-close">Cancel</button>
</div>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--primary js-close">OK</button>
</div>
</footer>
</section>

Expand Down Expand Up @@ -387,8 +404,12 @@ <h1 class="c-dialog__header">Big</h1>
mlkshk hexagon.</p>
</div>
<footer class="c-dialog__footer">
<button class="c-dialog__footer__item c-btn c-btn--basic js-close">Cancel</button
><button class="c-dialog__footer__item c-btn c-btn--primary js-close">OK</button>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--basic js-close">Cancel</button>
</div>
<div class="c-dialog__footer__item">
<button class="c-btn c-btn--primary js-close">OK</button>
</div>
</footer>
</section>

Expand Down
16 changes: 8 additions & 8 deletions packages/buttons/src/_base.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
--zd-btn--sm-min-width: calc(calc(46 / 12 * 1em) + calc(var(--zd-btn--sm-padding) * 2));
}

/* 1. IE inner spacing fix.
* 2. Anchor tag reset.
* 3. Override for <input> & <button> elements.
* 4. FF <input type="submit" fix. */
/* 1. Anchor tag reset.
* 2. Override for <input> & <button> elements.
* 3. FF <input type="submit" fix. */

.c-btn {
display: inline-block;
Expand All @@ -41,14 +40,15 @@
cursor: pointer;
padding: 0 var(--zd-btn-padding);
min-width: var(--zd-btn-min-width);
overflow: visible; /* [1] */
overflow: hidden;
vertical-align: middle;
text-align: center;
text-decoration: none; /* [2] */
text-decoration: none; /* [1] */
text-overflow: ellipsis;
line-height: var(--zd-btn-line-height);
white-space: nowrap;
color: var(--zd-btn-color);
font-family: inherit; /* [3] */
font-family: inherit; /* [2] */
font-size: var(--zd-btn-font-size);
font-weight: var(--zd-btn-font-weight);
-webkit-font-smoothing: subpixel-antialiased;
Expand All @@ -57,7 +57,7 @@
-webkit-touch-callout: none;
}

.c-btn::-moz-focus-inner { /* [4] */
.c-btn::-moz-focus-inner { /* [3] */
border: 0;
padding: 0;
}
Expand Down
18 changes: 15 additions & 3 deletions packages/modals/src/_footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:root {
--zd-dialog__footer-padding: 0 var(--zd-spacing-xl) 32px;
--zd-dialog__footer__btn-margin: 20px;
--zd-dialog__footer__item-margin: 20px;
--zd-dialog--large__footer-padding: 32px var(--zd-spacing-xl);
--zd-dialog--large__footer-border-top: var(--zd-dialog__header-border-bottom);
}
Expand All @@ -20,10 +20,22 @@
}

.c-dialog__footer__item {
margin-left: var(--zd-dialog__footer__btn-margin);
display: flex;
margin-left: var(--zd-dialog__footer__item-margin);
min-width: 0;
}

.c-dialog__footer__item:first-child {
margin-left: 0;
}

.c-dialog.is-rtl .c-dialog__footer__item {
margin-right: var(--zd-dialog__footer__btn-margin);
margin-right: var(--zd-dialog__footer__item-margin);
margin-left: 0;
}

/* stylelint-disable selector-max-specificity */
.c-dialog.is-rtl .c-dialog__footer__item:first-child {
margin-right: 0;
}
/* stylelint-enable selector-max-specificity */