Skip to content

Commit

Permalink
Add nowrap to buttons to ensure single lines (https://skitch.com/will…
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Aug 2, 2012
1 parent 1900842 commit d774cb5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 3 additions & 6 deletions admin/css/screen.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions admin/scss/_forms.scss
Expand Up @@ -300,27 +300,30 @@ form.small .field, .field.small {
}

.ss-ui-button {
margin-top:0px;
&.buttonset {
margin: 0 -1px; // hack to avoid double borders
}

margin-top:0px;
font-weight: bold;
text-decoration: none;
line-height: $grid-y * 2;
color: lighten($color-text-dark, 10%);
border: 1px solid $color-button-generic-border;
border-bottom: 1px solid darken($color-button-generic-border, 10%);
cursor: pointer;
@include text-shadow(lighten($color-button-generic, 20%) 0 1px 1px);
background-color: $color-button-generic;
white-space: nowrap;

@include background(
linear-gradient(color-stops(
lighten($color-button-generic, 10%),
darken($color-button-generic, 5%)
))
);

@include text-shadow(lighten($color-button-generic, 20%) 0 1px 1px);

&.buttonset {
margin: 0 -1px; // hack to avoid double borders
}

&.ui-state-hover, &:hover {
text-decoration: none;
background-color: lighten($color-button-generic, 10%);
Expand Down
1 change: 1 addition & 0 deletions admin/scss/_style.scss
Expand Up @@ -170,6 +170,7 @@ body.cms {
// Reset to default styles
.ss-ui-button {
line-height: $grid-x*3;

.ui-button-text {
line-height: 1.4;
}
Expand Down

2 comments on commit d774cb5

@oetiker
Copy link
Contributor

@oetiker oetiker commented on d774cb5 Aug 2, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

@dd1079
Copy link
Contributor

@dd1079 dd1079 commented on d774cb5 Aug 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repostet here for completeness:

The nowrap works great, but the border issue is not fixed. The SCSS results into:

.cms .ss-ui-button.buttonset { margin: 0 -1px; }

but should result into:

.cms .ss-ui-buttonset .ss-ui-button { margin: 0 -1px; }

Additionally the following rule:

.cms .Actions {
    min-height: 30px;
    overflow: auto;
}

needs an overflow: visible, which is the default value, so you can just leave it out.

Please sign in to comment.