Progress on header bar box sizing

This commit is contained in:
Max Lynch
2013-09-09 16:44:55 -05:00
parent 4a963f41f3
commit c7b0728fad
3 changed files with 14 additions and 44 deletions

View File

@ -20,14 +20,9 @@
<section>
<header class="bar bar-header bar-dark">
<div class="buttons">
<h1 class="title">Really really really really really really really really long title!</h1>
<a class="button button-clear">Back</a>
<a class="button button-clear">This</a>
</div>
<h1 class="title">Really really really really really really really really long title!</h1>
<div class="buttons">
<a class="button">Forward</a>
</div>
</header>
<div class="bar bar-header-secondary bar-dark">
<div class="button-bar">
@ -37,19 +32,13 @@
</div>
</div>
<header class="bar bar-header bar-dark">
<div class="buttons">
<a class="button button-clear">Back</a>
<a class="button button-clear">This</a>
</div>
<div class="button-bar">
<a class="button">Success</a>
<a class="button">Warning</a>
<a class="button">Danger</a>
</div>
<div class="buttons">
<a class="button button-clear">Back</a>
<a class="button button-clear">This</a>
</div>
</header>
<main class="content content-padded has-header">

View File

@ -3,6 +3,9 @@
.bar {
@include disable-user-select();
display: -webkit-box;
display: box;
position: fixed;
left: 0;
right: 0;
@ -19,9 +22,9 @@
position: absolute;
z-index: 0;
width: 100%;
top: 0;
left: 0;
right: 0;
line-height: $barHeight;
@ -44,41 +47,20 @@
color: inherit;
}
.button {
@include box-flex(0);
}
// Place the last button in a bar on the right of the bar
/*
.title + .button:last-child,
.button + .button:last-child,
.button.pull-right {
> .button + > .button:last-child,
> .button.pull-right {
position: absolute;
top: 5px;
right: 5px;
}
*/
}
.buttons {
position: absolute;
// Lift the buttons container above the title
z-index: 1;
padding: $barPaddingPortrait;
line-height: $barButtonsLineHeight;
.button {
padding: 6px 12px;
line-height: 14px;
}
}
.buttons:first-child {
left: 0;
top: 0;
}
.buttons:last-child {
right: 0;
top: 0;
}
// Header at top
.bar-header {

View File

@ -75,7 +75,6 @@
.button-bar > .button {
@include box-flex(1);
// Fix for box-flex width issue
width: 0;
line-height: 8px;
border-radius: 0;