Browse Source

redoing our buttons in nav bars

pull/245/head
connors 11 years ago
parent
commit
2ef2d9ab2a
  1. 29
      dist/ratchet.css
  2. 6
      index.html
  3. 35
      lib/sass/buttons.scss

29
dist/ratchet.css vendored

@ -632,7 +632,7 @@ select {
cursor: pointer; cursor: pointer;
background-color: white; background-color: white;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 3px;
} }
[class*="button"]:active, [class*="button"].active { [class*="button"]:active, [class*="button"].active {
background-color: #ccc; background-color: #ccc;
@ -688,11 +688,15 @@ select {
} }
.button-link { .button-link {
padding-top: 6px;
padding-bottom: 6px;
color: #428bca; color: #428bca;
background-color: transparent;
border: none; border: none;
} }
.button-link:active, .button-link.active { .button-link:active, .button-link.active {
color: #3071a9; color: #3071a9;
background-color: transparent;
} }
.button-block { .button-block {
@ -711,13 +715,9 @@ input[type="button"] {
.bar-nav [class*="button"] { .bar-nav [class*="button"] {
position: relative; position: relative;
z-index: 10; z-index: 10;
padding: 0; padding: 6px 12px;
font-size: 16px; margin-top: 8px;
font-weight: 400; font-weight: 400;
line-height: 44px;
color: #428bca;
background-color: transparent;
border: 0;
} }
.bar-nav [class*="button"].pull-right { .bar-nav [class*="button"].pull-right {
margin-left: 10px; margin-left: 10px;
@ -725,16 +725,17 @@ input[type="button"] {
.bar-nav [class*="button"].pull-left { .bar-nav [class*="button"].pull-left {
margin-right: 10px; margin-right: 10px;
} }
.bar-nav .button:active, .bar-nav .button-link {
.bar-nav .button.active, padding: 0;
.bar-nav .button-primary:active, margin-top: 0;
.bar-nav .button-primary.active { font-size: 16px;
color: #428bca; color: #428bca;
line-height: 44px;
background-color: transparent; background-color: transparent;
opacity: .3; border: none;
} }
.bar-nav .button-primary { .bar-nav .button-link:active, .bar-nav .button-link.active {
font-weight: 500; color: #3071a9;
} }
[class*="bar"] .button-block { [class*="bar"] .button-block {

6
index.html

@ -102,10 +102,10 @@ layout: default
{% highlight html %} {% highlight html %}
<header class="bar-nav"> <header class="bar-nav">
<a class="button pull-left"> <a class="button-primary pull-left">
Left Left
</a> </a>
<a class="button pull-right"> <a class="button-link pull-right">
Right Right
</a> </a>
<h1 class="title">Title</h1> <h1 class="title">Title</h1>
@ -594,6 +594,7 @@ layout: default
<a class="button-primary">Button</a> <a class="button-primary">Button</a>
<a class="button-positive">Button</a> <a class="button-positive">Button</a>
<a class="button-negative">Button</a> <a class="button-negative">Button</a>
<a class="button-link">Button</a>
</div> </div>
{% highlight html %} {% highlight html %}
@ -601,6 +602,7 @@ layout: default
<a class="button-primary">Button</a> <a class="button-primary">Button</a>
<a class="button-positive">Button</a> <a class="button-positive">Button</a>
<a class="button-negative">Button</a> <a class="button-negative">Button</a>
<a class="button-link">Button</a>
{% endhighlight %} {% endhighlight %}
</article> </article>

35
lib/sass/buttons.scss

@ -16,7 +16,7 @@
cursor: pointer; cursor: pointer;
background-color: $chrome-color; background-color: $chrome-color;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 3px;
// Active & filled button styles // Active & filled button styles
&:active, &:active,
@ -98,12 +98,16 @@
// Link button (Buttons that look like links) // Link button (Buttons that look like links)
.button-link { .button-link {
padding-top: 6px;
padding-bottom: 6px;
color: $primary-color; color: $primary-color;
background-color: transparent;
border: none; border: none;
&:active, &:active,
&.active { &.active {
color: darken($primary-color, 10%); color: darken($primary-color, 10%);
background-color: transparent;
} }
} }
@ -131,13 +135,9 @@ input[type="button"] {
[class*="button"] { [class*="button"] {
position: relative; position: relative;
z-index: 10; // Position the buttons on top of .title z-index: 10; // Position the buttons on top of .title
padding: 0; padding: 6px 12px;
font-size: 16px; margin-top: 8px;
font-weight: $font-weight-light; font-weight: $font-weight-light;
line-height: $bar-base-height;
color: $primary-color;
background-color: transparent;
border: 0;
&.pull-right { &.pull-right {
margin-left: $bar-side-spacing; margin-left: $bar-side-spacing;
@ -147,19 +147,20 @@ input[type="button"] {
} }
} }
// Override standard button active states // Link button (Buttons that look like links)
.button:active, .button-link {
.button.active, padding: 0;
.button-primary:active, margin-top: 0;
.button-primary.active { font-size: 16px;
color: $primary-color; color: $primary-color;
line-height: $bar-base-height;
background-color: transparent; background-color: transparent;
opacity: .3; border: none;
}
// Primary button in bars &:active,
.button-primary { &.active {
font-weight: $font-weight; color: darken($primary-color, 10%);
}
} }
} }

Loading…
Cancel
Save