Commit b919d548 by benjaoming

Upgrade to Bootstrap 3 RC1, add font-awesome, lots of refactoring

parent 204cc43a
...@@ -3,5 +3,3 @@ ...@@ -3,5 +3,3 @@
lessc wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap.less wiki/static/wiki/bootstrap/css/wiki-bootstrap.css lessc wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap.less wiki/static/wiki/bootstrap/css/wiki-bootstrap.css
lessc -x wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap.less wiki/static/wiki/bootstrap/css/wiki-bootstrap.min.css lessc -x wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap.less wiki/static/wiki/bootstrap/css/wiki-bootstrap.min.css
lessc wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap-responsive.less wiki/static/wiki/bootstrap/css/wiki-bootstrap-responsive.css
lessc -x wiki/static/wiki/bootstrap/less/wiki/wiki-bootstrap-responsive.less wiki/static/wiki/bootstrap/css/wiki-bootstrap-responsive.min.css
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<hr /> <hr />
<form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data"> <form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data">
{% wiki_form form %} {% wiki_form form %}
<div class="form-actions"> <div class="form-group form-actions">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn"> <a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn">
<span class="icon-arrow-left"></span> <span class="icon-arrow-left"></span>
{% trans "Go back" %} {% trans "Go back" %}
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</p> </p>
<form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data"> <form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data">
{% wiki_form form %} {% wiki_form form %}
<div class="form-actions"> <div class="form-group form-actions">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn"> <a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn">
<span class="icon-arrow-left"></span> <span class="icon-arrow-left"></span>
{% trans "Go back" %} {% trans "Go back" %}
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data"> <form method="POST" class="form-horizontal" id="attachment_form" enctype="multipart/form-data">
{% wiki_form form %} {% wiki_form form %}
<div class="form-actions"> <div class="form-group form-actions">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn"> <a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn">
<span class="icon-arrow-left"></span> <span class="icon-arrow-left"></span>
{% trans "Go back" %} {% trans "Go back" %}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</p> </p>
<form method="POST" class="form-horizontal" enctype="multipart/form-data"> <form method="POST" class="form-horizontal" enctype="multipart/form-data">
{% wiki_form form %} {% wiki_form form %}
<div class="form-actions"> <div class="form-group form-actions">
<a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn"> <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn">
<span class="icon-arrow-left"></span> <span class="icon-arrow-left"></span>
{% trans "Go back" %} {% trans "Go back" %}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</p> </p>
<form method="POST" class="form-horizontal" enctype="multipart/form-data"> <form method="POST" class="form-horizontal" enctype="multipart/form-data">
{% wiki_form form %} {% wiki_form form %}
<div class="form-actions"> <div class="form-group form-actions">
<a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn"> <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn">
<span class="icon-arrow-left"></span> <span class="icon-arrow-left"></span>
{% trans "Go back" %} {% trans "Go back" %}
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<em>{% trans "You are not subscribed to any notifications yet." %}</em> <em>{% trans "You are not subscribed to any notifications yet." %}</em>
{% endfor %} {% endfor %}
{% if formset.forms %} {% if formset.forms %}
<div class="form-actions"> <div class="form-group form-actions">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
<span class="icon-ok"></span> <span class="icon-ok"></span>
{% trans "Save changes" %} {% trans "Save changes" %}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,30 +5,27 @@ ...@@ -5,30 +5,27 @@
// Parent container // Parent container
.accordion { .accordion {
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
} }
// Group == heading + body // Group == heading + body
.accordion-group { .accordion-group {
margin-bottom: 2px; margin-bottom: 2px;
border: 1px solid #e5e5e5; border: 1px solid @accordion-border-color;
.border-radius(@baseBorderRadius); border-radius: @border-radius-base;
} }
.accordion-heading { .accordion-heading {
border-bottom: 0; border-bottom: 0;
}
.accordion-heading .accordion-toggle {
display: block;
padding: 8px 15px;
}
// General toggle styles .accordion-toggle {
.accordion-toggle { display: block;
cursor: pointer; padding: 8px 15px;
cursor: pointer;
}
} }
// Inner needs the styles because you can't animate properly with any styles on the element // Inner needs the styles because you can't animate properly with any styles on the element
.accordion-inner { .accordion-inner {
padding: 9px 15px; padding: 9px 15px;
border-top: 1px solid #e5e5e5; border-top: 1px solid @accordion-border-color;
} }
...@@ -7,73 +7,63 @@ ...@@ -7,73 +7,63 @@
// ------------------------- // -------------------------
.alert { .alert {
padding: 8px 35px 8px 14px; padding: 10px 35px 10px 15px;
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
text-shadow: 0 1px 0 rgba(255,255,255,.5); color: @alert-text;
background-color: @warningBackground; background-color: @alert-bg;
border: 1px solid @warningBorder; border: 1px solid @alert-border;
.border-radius(@baseBorderRadius); border-radius: @alert-border-radius;
}
.alert,
.alert h4 {
// Specified for the h4 to prevent conflicts of changing @headingsColor
color: @warningText;
}
.alert h4 {
margin: 0;
}
// Adjust close link position // Headings for larger alerts
.alert .close { h4 {
position: relative; margin-top: 0;
top: -2px; // Specified for the h4 to prevent conflicts of changing @headingsColor
right: -21px; color: inherit;
line-height: @baseLineHeight; }
} // Match the hr to the border of the alert
hr {
border-top-color: darken(@alert-border, 5%);
}
// Provide class for links that match alerts
.alert-link {
font-weight: 500;
color: darken(@alert-text, 10%);
}
// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
}
// Alternate styles // Alternate styles
// ------------------------- // -------------------------
.alert-success { .alert-success {
background-color: @successBackground; .alert-variant(@alert-success-bg, @alert-success-border, @alert-success-text);
border-color: @successBorder;
color: @successText;
}
.alert-success h4 {
color: @successText;
} }
.alert-danger, .alert-danger {
.alert-error { .alert-variant(@alert-danger-bg, @alert-danger-border, @alert-danger-text);
background-color: @errorBackground;
border-color: @errorBorder;
color: @errorText;
}
.alert-danger h4,
.alert-error h4 {
color: @errorText;
} }
.alert-info { .alert-info {
background-color: @infoBackground; .alert-variant(@alert-info-bg, @alert-info-border, @alert-info-text);
border-color: @infoBorder;
color: @infoText;
}
.alert-info h4 {
color: @infoText;
} }
// Block alerts // Block alerts
// ------------------------- // -------------------------
.alert-block { .alert-block {
padding-top: 14px; padding-top: 15px;
padding-bottom: 14px; padding-bottom: 15px;
}
.alert-block > p, > p,
.alert-block > ul { > ul {
margin-bottom: 0; margin-bottom: 0;
} }
.alert-block p + p { p + p {
margin-top: 5px; margin-top: 5px;
}
} }
//
// Badges
// --------------------------------------------------
// Base classes
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: @font-size-small;
font-weight: bold;
color: @badge-color;
line-height: 1;
vertical-align: middle;
white-space: nowrap;
text-align: center;
background-color: @badge-bg;
border-radius: 10px;
// Empty labels/badges collapse
&:empty {
display: none;
}
}
// Hover state, but only for links
a.badge {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Quick fix for labels/badges in buttons
.btn .badge {
position: relative;
top: -1px;
}
// Account for counters in navs
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
}
/*! /*!
* Bootstrap v2.3.2 * Bootstrap v3.0.0
* *
* Copyright 2012 Twitter, Inc * Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0 * Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world by @mdo and @fat.
*/ */
// Core variables and mixins // Core variables and mixins
@import "variables.less"; // Modify this for custom colors, font-sizes, etc @import "variables.less";
@import "mixins.less"; @import "mixins.less";
// CSS Reset // Reset
@import "reset.less"; @import "normalize.less";
@import "print.less";
// Grid system and page structure // Core CSS
@import "scaffolding.less"; @import "scaffolding.less";
@import "grid.less";
@import "layouts.less";
// Base CSS
@import "type.less"; @import "type.less";
@import "code.less"; @import "code.less";
@import "forms.less"; @import "grid.less";
@import "tables.less"; @import "tables.less";
@import "forms.less";
@import "buttons.less";
// Components: common // Components: common
@import "sprites.less"; @import "component-animations.less";
@import "dropdowns.less"; @import "dropdowns.less";
@import "list-group.less";
@import "panels.less";
@import "wells.less"; @import "wells.less";
@import "component-animations.less";
@import "close.less"; @import "close.less";
// Components: Buttons & Alerts
@import "buttons.less";
@import "button-groups.less";
@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
// Components: Nav // Components: Nav
@import "navs.less"; @import "navs.less";
@import "navbar.less"; @import "navbar.less";
@import "button-groups.less";
@import "breadcrumbs.less"; @import "breadcrumbs.less";
@import "pagination.less"; @import "pagination.less";
@import "pager.less"; @import "pager.less";
...@@ -51,13 +48,16 @@ ...@@ -51,13 +48,16 @@
@import "popovers.less"; @import "popovers.less";
// Components: Misc // Components: Misc
@import "alerts.less";
@import "thumbnails.less"; @import "thumbnails.less";
@import "media.less"; @import "media.less";
@import "labels-badges.less"; @import "labels.less";
@import "badges.less";
@import "progress-bars.less"; @import "progress-bars.less";
@import "accordion.less"; @import "accordion.less";
@import "carousel.less"; @import "carousel.less";
@import "hero-unit.less"; @import "jumbotron.less";
// Utility classes // Utility classes
@import "utilities.less"; // Has to be last to override when necessary @import "utilities.less"; // Has to be last to override when necessary
@import "responsive-utilities.less";
...@@ -5,20 +5,19 @@ ...@@ -5,20 +5,19 @@
.breadcrumb { .breadcrumb {
padding: 8px 15px; padding: 8px 15px;
margin: 0 0 @baseLineHeight; margin-bottom: @line-height-computed;
list-style: none; list-style: none;
background-color: #f5f5f5; background-color: @breadcrumb-bg;
.border-radius(@baseBorderRadius); border-radius: @border-radius-base;
> li { > li {
display: inline-block; display: inline-block;
.ie7-inline-block(); &+li:before {
text-shadow: 0 1px 0 @white; content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
> .divider {
padding: 0 5px; padding: 0 5px;
color: #ccc; color: @breadcrumb-color;
} }
} }
> .active { > .active {
color: @grayLight; color: @breadcrumb-active-color;
} }
} }
...@@ -2,90 +2,85 @@ ...@@ -2,90 +2,85 @@
// Button groups // Button groups
// -------------------------------------------------- // --------------------------------------------------
// Button carets
.btn .caret {
border-top-color: @btn-default-color;
}
.dropup .btn .caret {
border-bottom-color: @btn-default-color;
}
// Make the div behave like a button // Make the div behave like a button
.btn-group { .btn-group,
.btn-group-vertical {
position: relative; position: relative;
display: inline-block; display: inline-block;
.ie7-inline-block();
font-size: 0; // remove as part 1 of font-size inline-block hack
vertical-align: middle; // match .btn alignment given font-size hack above vertical-align: middle; // match .btn alignment given font-size hack above
white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) > .btn {
.ie7-restore-left-whitespace(); position: relative;
float: left;
// Bring the "active" button to the front
&:hover,
&:active {
z-index: 2;
}
}
} }
// Space out series of button groups // Prevent double borders when buttons are next to each other
.btn-group + .btn-group { .btn-group .btn + .btn {
margin-left: 5px; margin-left: -1px;
} }
// Optional: Group multiple button groups together for a toolbar // Optional: Group multiple button groups together for a toolbar
.btn-toolbar { .btn-toolbar {
font-size: 0; // Hack to remove whitespace that results from using inline-block .clearfix();
margin-top: @baseLineHeight / 2;
margin-bottom: @baseLineHeight / 2;
> .btn + .btn,
> .btn-group + .btn,
> .btn + .btn-group {
margin-left: 5px;
}
}
// Float them, remove border radius, then re-add to first and last elements .btn-group {
.btn-group > .btn { float: left;
position: relative; }
.border-radius(0); // Space out series of button groups
} > .btn,
.btn-group > .btn + .btn { > .btn-group {
margin-left: -1px; + .btn,
} + .btn-group {
.btn-group > .btn, margin-left: 5px;
.btn-group > .dropdown-menu, }
.btn-group > .popover { }
font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
} }
// Reset fonts for other sizes .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
.btn-group > .btn-mini { border-radius: 0;
font-size: @fontSizeMini;
}
.btn-group > .btn-small {
font-size: @fontSizeSmall;
}
.btn-group > .btn-large {
font-size: @fontSizeLarge;
} }
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child { .btn-group > .btn:first-child {
margin-left: 0; margin-left: 0;
.border-top-left-radius(@baseBorderRadius); &:not(:last-child):not(.dropdown-toggle) {
.border-bottom-left-radius(@baseBorderRadius); .border-right-radius(0);
}
} }
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child, .btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle { .btn-group > .dropdown-toggle:not(:first-child) {
.border-top-right-radius(@baseBorderRadius); .border-left-radius(0);
.border-bottom-right-radius(@baseBorderRadius);
} }
// Reset corners for large buttons
.btn-group > .btn.large:first-child { // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
margin-left: 0; .btn-group > .btn-group {
.border-top-left-radius(@borderRadiusLarge); float: left;
.border-bottom-left-radius(@borderRadiusLarge);
} }
.btn-group > .btn.large:last-child, .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
.btn-group > .large.dropdown-toggle { border-radius: 0;
.border-top-right-radius(@borderRadiusLarge);
.border-bottom-right-radius(@borderRadiusLarge);
} }
.btn-group > .btn-group:first-child {
// On hover/focus/active, bring the proper btn to front > .btn:last-child,
.btn-group > .btn:hover, > .dropdown-toggle {
.btn-group > .btn:focus, .border-right-radius(0);
.btn-group > .btn:active, }
.btn-group > .btn.active { }
z-index: 2; .btn-group > .btn-group:last-child > .btn:first-child {
.border-left-radius(0);
} }
// On active and open, don't show outline // On active and open, don't show outline
...@@ -103,78 +98,26 @@ ...@@ -103,78 +98,26 @@
.btn-group > .btn + .dropdown-toggle { .btn-group > .btn + .dropdown-toggle {
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
.box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
*padding-top: 5px;
*padding-bottom: 5px;
}
.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
padding-right: 5px;
*padding-top: 2px;
*padding-bottom: 2px;
}
.btn-group > .btn-small + .dropdown-toggle {
*padding-top: 5px;
*padding-bottom: 4px;
} }
.btn-group > .btn-large + .dropdown-toggle { .btn-group > .btn-large + .dropdown-toggle {
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
*padding-top: 7px;
*padding-bottom: 7px;
} }
.btn-group.open { // The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state
// The clickable button for toggling the menu .btn-group.open .dropdown-toggle {
// Remove the gradient and set the same inset shadow as the :active state .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
.dropdown-toggle {
background-image: none;
.box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
}
// Keep the hover's background when dropdown is open
.btn.dropdown-toggle {
background-color: @btnBackgroundHighlight;
}
.btn-primary.dropdown-toggle {
background-color: @btnPrimaryBackgroundHighlight;
}
.btn-warning.dropdown-toggle {
background-color: @btnWarningBackgroundHighlight;
}
.btn-danger.dropdown-toggle {
background-color: @btnDangerBackgroundHighlight;
}
.btn-success.dropdown-toggle {
background-color: @btnSuccessBackgroundHighlight;
}
.btn-info.dropdown-toggle {
background-color: @btnInfoBackgroundHighlight;
}
.btn-inverse.dropdown-toggle {
background-color: @btnInverseBackgroundHighlight;
}
} }
// Reposition the caret // Reposition the caret
.btn .caret { .btn .caret {
margin-top: 8px;
margin-left: 0; margin-left: 0;
} }
// Carets in other button sizes // Carets in other button sizes
.btn-large .caret { .btn-large .caret {
margin-top: 6px; border-width: 5px;
}
.btn-large .caret {
border-left-width: 5px;
border-right-width: 5px;
border-top-width: 5px;
}
.btn-mini .caret,
.btn-small .caret {
margin-top: 8px;
} }
// Upside down carets for .dropup // Upside down carets for .dropup
.dropup .btn-large .caret { .dropup .btn-large .caret {
...@@ -182,48 +125,47 @@ ...@@ -182,48 +125,47 @@
} }
// Account for other colors
.btn-primary,
.btn-warning,
.btn-danger,
.btn-info,
.btn-success,
.btn-inverse {
.caret {
border-top-color: @white;
border-bottom-color: @white;
}
}
// Vertical button groups // Vertical button groups
// ---------------------- // ----------------------
.btn-group-vertical {
display: inline-block; // makes buttons only take up the width they need
.ie7-inline-block();
}
.btn-group-vertical > .btn { .btn-group-vertical > .btn {
display: block; display: block;
float: none; float: none;
width: 100%;
max-width: 100%; max-width: 100%;
.border-radius(0); + .btn {
} margin-top: -1px;
.btn-group-vertical > .btn + .btn { }
margin-left: 0;
margin-top: -1px;
}
.btn-group-vertical > .btn:first-child {
.border-radius(@baseBorderRadius @baseBorderRadius 0 0);
} }
.btn-group-vertical > .btn:last-child { .btn-group-vertical .btn {
.border-radius(0 0 @baseBorderRadius @baseBorderRadius); &:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:first-child {
.border-bottom-radius(0);
}
&:last-child {
.border-top-radius(0);
}
} }
.btn-group-vertical > .btn-large:first-child {
.border-radius(@borderRadiusLarge @borderRadiusLarge 0 0);
// Justified button groups
// ----------------------
.btn-group-justified {
display: table;
width: 100%;
.btn {
float: none;
display: table-cell;
width: 1%;
}
} }
.btn-group-vertical > .btn-large:last-child {
.border-radius(0 0 @borderRadiusLarge @borderRadiusLarge);
// Checkbox and radio options
.btn-group[data-toggle="buttons"] > .btn > input[type="radio"],
.btn-group[data-toggle="buttons"] > .btn > input[type="checkbox"] {
display: none;
} }
...@@ -6,223 +6,152 @@ ...@@ -6,223 +6,152 @@
// Base styles // Base styles
// -------------------------------------------------- // --------------------------------------------------
// Core // Core styles
.btn { .btn {
display: inline-block; display: inline-block;
.ie7-inline-block(); padding: @padding-base-vertical @padding-base-horizontal;
padding: 4px 12px;
margin-bottom: 0; // For input.btn margin-bottom: 0; // For input.btn
font-size: @baseFontSize; font-size: @font-size-base;
line-height: @baseLineHeight; font-weight: 500;
line-height: @line-height-base;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
.buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75)); border: 1px solid transparent;
border: 1px solid @btnBorder; border-radius: @border-radius-base;
*border: 0; // Remove the border to prevent IE7's black border on input:focus white-space: nowrap;
border-bottom-color: darken(@btnBorder, 10%);
.border-radius(@baseBorderRadius);
.ie7-restore-left-whitespace(); // Give IE7 some love
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
// Hover/focus state
&:hover,
&:focus {
color: @grayDark;
text-decoration: none;
background-position: 0 -15px;
// transition is only when going to hover/focus, otherwise the background &:focus {
// behind the gradient (there for IE<=9 fallback) gets mismatched .tab-focus();
.transition(background-position .1s linear);
} }
// Focus state for keyboard and accessibility &:hover,
&:focus { &:focus {
.tab-focus(); color: @btn-hover-color;
text-decoration: none;
} }
// Active state &:active,
&.active, &.active {
&:active {
background-image: none;
outline: 0; outline: 0;
.box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
} }
// Disabled state
&.disabled, &.disabled,
&[disabled] { &[disabled],
fieldset[disabled] & {
cursor: default; cursor: default;
background-image: none; pointer-events: none; // Future-proof disabling of clicks
.opacity(65); .opacity(.65);
.box-shadow(none); .box-shadow(none);
} }
} }
// Button Sizes
// --------------------------------------------------
// Large
.btn-large {
padding: @paddingLarge;
font-size: @fontSizeLarge;
.border-radius(@borderRadiusLarge);
}
.btn-large [class^="icon-"],
.btn-large [class*=" icon-"] {
margin-top: 4px;
}
// Small
.btn-small {
padding: @paddingSmall;
font-size: @fontSizeSmall;
.border-radius(@borderRadiusSmall);
}
.btn-small [class^="icon-"],
.btn-small [class*=" icon-"] {
margin-top: 0;
}
.btn-mini [class^="icon-"],
.btn-mini [class*=" icon-"] {
margin-top: -1px;
}
// Mini
.btn-mini {
padding: @paddingMini;
font-size: @fontSizeMini;
.border-radius(@borderRadiusSmall);
}
// Block button
// -------------------------
.btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
.box-sizing(border-box);
}
// Vertically space out multiple block buttons
.btn-block + .btn-block {
margin-top: 5px;
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}
// Alternate buttons // Alternate buttons
// -------------------------------------------------- // --------------------------------------------------
// Provide *some* extra contrast for those who can get it .btn-default {
.btn-primary.active, .btn-pseudo-states(@btn-default-color, @btn-default-bg, @btn-default-border);
.btn-warning.active,
.btn-danger.active,
.btn-success.active,
.btn-info.active,
.btn-inverse.active {
color: rgba(255,255,255,.75);
} }
// Set the backgrounds
// -------------------------
.btn-primary { .btn-primary {
.buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); .btn-pseudo-states(@btn-primary-color, @btn-primary-bg, @btn-primary-border);
} }
// Warning appears are orange // Warning appears as orange
.btn-warning { .btn-warning {
.buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight); .btn-pseudo-states(@btn-warning-color, @btn-warning-bg, @btn-warning-border);
} }
// Danger and error appear as red // Danger and error appear as red
.btn-danger { .btn-danger {
.buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight); .btn-pseudo-states(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
} }
// Success appears as green // Success appears as green
.btn-success { .btn-success {
.buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight); .btn-pseudo-states(@btn-success-color, @btn-success-bg, @btn-success-border);
} }
// Info appears as a neutral blue // Info appears as blue-green
.btn-info { .btn-info {
.buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight); .btn-pseudo-states(@btn-info-color, @btn-info-bg, @btn-info-border);
}
// Inverse appears as dark gray
.btn-inverse {
.buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
} }
// Cross-browser Jank // Link buttons
// -------------------------------------------------- // -------------------------
button.btn, // Make a button look and behave like a link
input[type="submit"].btn { .btn-link {
color: @link-color;
font-weight: normal;
cursor: pointer;
border-radius: 0;
// Firefox 3.6 only I believe &,
&::-moz-focus-inner { &:active,
padding: 0; &[disabled],
border: 0; fieldset[disabled] & {
background-color: transparent;
.box-shadow(none);
} }
&,
// IE7 has some default padding on button controls &:hover,
*padding-top: 3px; &:focus,
*padding-bottom: 3px; &:active {
border-color: transparent;
&.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
} }
&.btn-small { &:hover,
*padding-top: 3px; &:focus {
*padding-bottom: 3px; color: @link-hover-color;
text-decoration: underline;
background-color: transparent;
} }
&.btn-mini { &[disabled],
*padding-top: 1px; fieldset[disabled] & {
*padding-bottom: 1px; &:hover,
&:focus {
color: @gray-dark;
text-decoration: none;
}
} }
} }
// Link buttons // Button Sizes
// -------------------------------------------------- // --------------------------------------------------
// Make a button look and behave like a link .btn-large {
.btn-link, padding: @padding-large-vertical @padding-large-horizontal;
.btn-link:active, font-size: @font-size-large;
.btn-link[disabled] { border-radius: @border-radius-large;
background-color: transparent;
background-image: none;
.box-shadow(none);
} }
.btn-link { .btn-small {
border-color: transparent; padding: @padding-small-vertical @padding-small-horizontal;
cursor: pointer; font-size: @font-size-small;
color: @linkColor; line-height: 1.5; // ensure proper height of button next to small input
.border-radius(0); border-radius: @border-radius-small;
}
// Block button
// --------------------------------------------------
.btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
} }
.btn-link:hover,
.btn-link:focus { // Vertically space out multiple block buttons
color: @linkColorHover; .btn-block + .btn-block {
text-decoration: underline; margin-top: 5px;
background-color: transparent;
} }
.btn-link[disabled]:hover,
.btn-link[disabled]:focus { // Specificity overrides
color: @grayDark; input[type="submit"],
text-decoration: none; input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
} }
...@@ -3,19 +3,15 @@ ...@@ -3,19 +3,15 @@
// -------------------------------------------------- // --------------------------------------------------
// Wrapper for the slide container and indicators
.carousel { .carousel {
position: relative; position: relative;
margin-bottom: @baseLineHeight;
line-height: 1;
} }
.carousel-inner { .carousel-inner {
position: relative;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
position: relative;
}
.carousel-inner {
> .item { > .item {
display: none; display: none;
...@@ -25,7 +21,7 @@ ...@@ -25,7 +21,7 @@
// Account for jankitude on images // Account for jankitude on images
> img, > img,
> a > img { > a > img {
display: block; .img-responsive();
line-height: 1; line-height: 1;
} }
} }
...@@ -70,89 +66,140 @@ ...@@ -70,89 +66,140 @@
.carousel-control { .carousel-control {
position: absolute; position: absolute;
top: 40%; top: 0;
left: 15px; left: 0;
width: 40px; bottom: 0;
height: 40px; width: 15%;
margin-top: -20px; .opacity(.5);
font-size: 60px; font-size: 20px;
font-weight: 100; color: @carousel-control-color;
line-height: 30px;
color: @white;
text-align: center; text-align: center;
background: @grayDarker; text-shadow: @carousel-text-shadow;
border: 3px solid @white; // We can't have this transition here because webkit cancels the carousel
.border-radius(23px); // animation if you trip this while in the middle of another animation.
.opacity(50);
// Set gradients for backgrounds
// we can't have this transition here &.left {
// because webkit cancels the carousel #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
// animation if you trip this while background-color: transparent;
// in the middle of another animation }
// ;_;
// .transition(opacity .2s linear);
// Reposition the right one
&.right { &.right {
left: auto; left: auto;
right: 15px; right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
background-color: transparent;
} }
// Hover/focus state // Hover/focus state
&:hover, &:hover,
&:focus { &:focus {
color: @white; color: @carousel-control-color;
text-decoration: none; text-decoration: none;
.opacity(90); .opacity(.9);
}
// Toggles
.glyphicon,
.icon-prev,
.icon-next {
position: absolute;
top: 50%;
left: 50%;
z-index: 5;
display: inline-block;
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
font-family: serif;
}
// Non-glyphicon toggles
.icon-prev {
&:before {
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
}
}
.icon-next {
&:before {
content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
}
} }
} }
// Carousel indicator pips // Optional indicator pips
// ----------------------------- // -----------------------------
.carousel-indicators { .carousel-indicators {
position: absolute; position: absolute;
top: 15px; bottom: 10px;
right: 15px; left: 50%;
z-index: 5; z-index: 15;
margin: 0; width: 120px;
margin-left: -60px;
padding-left: 0;
list-style: none; list-style: none;
text-align: center;
li { li {
display: block; display: inline-block;
float: left; width: 10px;
width: 10px;
height: 10px; height: 10px;
margin-left: 5px; margin: 1px;
text-indent: -999px; text-indent: -999px;
background-color: #ccc; border: 1px solid @carousel-indicator-border-color;
background-color: rgba(255,255,255,.25); border-radius: 10px;
border-radius: 5px; cursor: pointer;
} }
.active { .active {
background-color: #fff; margin: 0;
width: 12px;
height: 12px;
background-color: @carousel-indicator-active-bg;
} }
} }
// Caption for text below images // Optional captions
// ----------------------------- // -----------------------------
// Hidden by default for smaller viewports
.carousel-caption { .carousel-caption {
position: absolute; position: absolute;
left: 0; left: 15%;
right: 0; right: 15%;
bottom: 0; bottom: 20px;
padding: 15px; z-index: 10;
background: @grayDark; padding-top: 20px;
background: rgba(0,0,0,.75); padding-bottom: 20px;
} color: @carousel-caption-color;
.carousel-caption h4, text-align: center;
.carousel-caption p { text-shadow: @carousel-text-shadow;
color: @white; & .btn {
line-height: @baseLineHeight; text-shadow: none; // No shadow for button elements in carousel-caption
} }
.carousel-caption h4 {
margin: 0 0 5px;
} }
.carousel-caption p {
margin-bottom: 0;
// Scale up controls for tablets and up
@media screen and (min-width: @screen-tablet) {
// Scale up the controls a smidge
.carousel-control .glyphicon,
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
margin-left: -15px;
font-size: 30px;
}
// Show and left align the captions
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
// Move up the indicators
.carousel-indicators {
bottom: 20px;
}
} }
...@@ -5,28 +5,29 @@ ...@@ -5,28 +5,29 @@
.close { .close {
float: right; float: right;
font-size: 20px; font-size: (@font-size-base * 1.5);
font-weight: bold; font-weight: bold;
line-height: @baseLineHeight; line-height: 1;
color: @black; color: @close-color;
text-shadow: 0 1px 0 rgba(255,255,255,1); text-shadow: @close-text-shadow;
.opacity(20); .opacity(.2);
&:hover, &:hover,
&:focus { &:focus {
color: @black; color: @close-color;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
.opacity(40); .opacity(.5);
} }
}
// Additional properties for button version // Additional properties for button version
// iOS requires the button element instead of an anchor tag. // iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`. // If you want the anchor version, it requires `href="#"`.
button.close { button& {
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
background: transparent; background: transparent;
border: 0; border: 0;
-webkit-appearance: none; -webkit-appearance: none;
} }
\ No newline at end of file }
...@@ -6,48 +6,42 @@ ...@@ -6,48 +6,42 @@
// Inline and block code styles // Inline and block code styles
code, code,
pre { pre {
padding: 0 3px 2px; font-family: @font-family-monospace;
#font > #family > .monospace;
font-size: @baseFontSize - 2;
color: @grayDark;
.border-radius(3px);
} }
// Inline code // Inline code
code { code {
padding: 2px 4px; padding: 2px 4px;
color: #d14; font-size: 90%;
background-color: #f7f7f9; color: @code-color;
border: 1px solid #e1e1e8; background-color: @code-bg;
white-space: nowrap; white-space: nowrap;
border-radius: 4px;
} }
// Blocks of code // Blocks of code
pre { pre {
display: block; display: block;
padding: (@baseLineHeight - 1) / 2; padding: ((@line-height-computed - 1) / 2);
margin: 0 0 @baseLineHeight / 2; margin: 0 0 (@line-height-computed / 2);
font-size: @baseFontSize - 1; // 14px to 13px font-size: (@font-size-base - 1); // 14px to 13px
line-height: @baseLineHeight; line-height: @line-height-base;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
white-space: pre; color: @gray-dark;
white-space: pre-wrap; background-color: @pre-bg;
background-color: #f5f5f5; border: 1px solid @pre-border-color;
border: 1px solid #ccc; // fallback for IE7-8 border-radius: @border-radius-base;
border: 1px solid rgba(0,0,0,.15);
.border-radius(@baseBorderRadius);
// Make prettyprint styles more spaced out for readability // Make prettyprint styles more spaced out for readability
&.prettyprint { &.prettyprint {
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
} }
// Account for some code outputs that place code tags in pre tags // Account for some code outputs that place code tags in pre tags
code { code {
padding: 0; padding: 0;
color: inherit; color: inherit;
white-space: pre;
white-space: pre-wrap; white-space: pre-wrap;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
...@@ -58,4 +52,4 @@ pre { ...@@ -58,4 +52,4 @@ pre {
.pre-scrollable { .pre-scrollable {
max-height: 340px; max-height: 340px;
overflow-y: scroll; overflow-y: scroll;
} }
\ No newline at end of file
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
// Component animations // Component animations
// -------------------------------------------------- // --------------------------------------------------
// Heads up!
//
// We don't use the `.opacity()` mixin here since it causes a bug with text
// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
.fade { .fade {
opacity: 0; opacity: 0;
...@@ -12,11 +16,14 @@ ...@@ -12,11 +16,14 @@
} }
.collapse { .collapse {
display: none;
&.in {
display: block;
}
}
.collapsing {
position: relative; position: relative;
height: 0; height: 0;
overflow: hidden; overflow: hidden;
.transition(height .35s ease); .transition(height .35s ease);
&.in {
height: auto;
}
} }
...@@ -3,62 +3,39 @@ ...@@ -3,62 +3,39 @@
// -------------------------------------------------- // --------------------------------------------------
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle {
// The caret makes the toggle a bit too tall in IE7
*margin-bottom: -3px;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
// Dropdown arrow/caret // Dropdown arrow/caret
// -------------------- // --------------------
.caret { .caret {
display: inline-block; display: inline-block;
width: 0; width: 0;
height: 0; height: 0;
vertical-align: top; margin-left: 2px;
border-top: 4px solid @black; vertical-align: middle;
border-top: 4px solid @dropdown-caret-color;
border-right: 4px solid transparent; border-right: 4px solid transparent;
border-left: 4px solid transparent; border-left: 4px solid transparent;
content: ""; content: "";
} }
// Place the caret
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
// The dropdown menu (ul) // The dropdown menu (ul)
// ---------------------- // ----------------------
.dropdown-menu { .dropdown-menu {
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 0; left: 0;
z-index: @zindexDropdown; z-index: @zindex-dropdown;
display: none; // none by default, but block on "open" of the menu display: none; // none by default, but block on "open" of the menu
float: left; float: left;
min-width: 160px; min-width: 160px;
padding: 5px 0; padding: 5px 0;
margin: 2px 0 0; // override default ul margin: 2px 0 0; // override default ul
list-style: none; list-style: none;
background-color: @dropdownBackground; background-color: @dropdown-bg;
border: 1px solid #ccc; // Fallback for IE7-8 border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdownBorder; border: 1px solid @dropdown-border;
*border-right-width: 2px; border-radius: @border-radius-base;
*border-bottom-width: 2px; .box-shadow(0 6px 12px rgba(0,0,0,.175));
.border-radius(6px); .background-clip(padding-box);
.box-shadow(0 5px 10px rgba(0,0,0,.2));
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
// Aligns the dropdown menu to right // Aligns the dropdown menu to right
&.pull-right { &.pull-right {
...@@ -68,7 +45,7 @@ ...@@ -68,7 +45,7 @@
// Dividers (basically an hr) within the dropdown // Dividers (basically an hr) within the dropdown
.divider { .divider {
.nav-divider(@dropdownDividerTop, @dropdownDividerBottom); .nav-divider(@dropdown-divider-bg);
} }
// Links within the dropdown menu // Links within the dropdown menu
...@@ -77,64 +54,84 @@ ...@@ -77,64 +54,84 @@
padding: 3px 20px; padding: 3px 20px;
clear: both; clear: both;
font-weight: normal; font-weight: normal;
line-height: @baseLineHeight; line-height: @line-height-base;
color: @dropdownLinkColor; color: @dropdown-link-color;
white-space: nowrap; white-space: nowrap; // prevent links from randomly breaking onto new lines
} }
} }
// Hover/Focus state // Hover/Focus state
// ----------- // -----------
.dropdown-menu > li > a:hover, .dropdown-menu > li > a {
.dropdown-menu > li > a:focus, &:hover,
.dropdown-submenu:hover > a, &:focus {
.dropdown-submenu:focus > a { text-decoration: none;
text-decoration: none; color: @dropdown-link-hover-color;
color: @dropdownLinkColorHover; #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%)); }
} }
// Active state // Active state
// ------------ // ------------
.dropdown-menu > .active > a, .dropdown-menu > .active > a {
.dropdown-menu > .active > a:hover, &,
.dropdown-menu > .active > a:focus { &:hover,
color: @dropdownLinkColorActive; &:focus {
text-decoration: none; color: @dropdown-link-active-color;
outline: 0; text-decoration: none;
#gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%)); outline: 0;
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
}
} }
// Disabled state // Disabled state
// -------------- // --------------
// Gray out text and ensure the hover/focus state remains gray // Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a {
.dropdown-menu > .disabled > a:hover, &,
.dropdown-menu > .disabled > a:focus { &:hover,
color: @grayLight; &:focus {
color: @gray-light;
}
} }
// Nuke hover/focus effects // Nuke hover/focus effects
.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a {
.dropdown-menu > .disabled > a:focus { &:hover,
text-decoration: none; &:focus {
background-color: transparent; text-decoration: none;
background-image: none; // Remove CSS gradient background-color: transparent;
.reset-filter(); background-image: none; // Remove CSS gradient
cursor: default; .reset-filter();
cursor: not-allowed;
}
} }
// Open state for the dropdown // Open state for the dropdown
// --------------------------- // ---------------------------
.open { .open {
// IE7's z-index only goes to the nearest positioned ancestor, which would // Show the menu
// make the menu appear below buttons that appeared later on the page > .dropdown-menu {
*z-index: @zindexDropdown;
& > .dropdown-menu {
display: block; display: block;
} }
// Remove the outline when :focus is triggered
> a {
outline: 0;
}
}
// Dropdown section headers
// ---------------------------
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: @font-size-small;
line-height: @line-height-base;
color: @gray-light;
} }
// Backdrop to catch body clicks on mobile, etc. // Backdrop to catch body clicks on mobile, etc.
// --------------------------- // ---------------------------
.dropdown-backdrop { .dropdown-backdrop {
...@@ -143,7 +140,7 @@ ...@@ -143,7 +140,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
top: 0; top: 0;
z-index: @zindexDropdown - 10; z-index: @zindex-dropdown - 10;
} }
// Right aligned dropdowns // Right aligned dropdowns
...@@ -162,7 +159,7 @@ ...@@ -162,7 +159,7 @@
// Reverse the caret // Reverse the caret
.caret { .caret {
border-top: 0; border-top: 0;
border-bottom: 4px solid @black; border-bottom: 4px solid @dropdown-caret-color;
content: ""; content: "";
} }
// Different positioning for bottom up menu // Different positioning for bottom up menu
...@@ -172,77 +169,3 @@ ...@@ -172,77 +169,3 @@
margin-bottom: 1px; margin-bottom: 1px;
} }
} }
// Sub menus
// ---------------------------
.dropdown-submenu {
position: relative;
}
// Default dropdowns
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
.border-radius(0 6px 6px 6px);
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
// Dropups
.dropup .dropdown-submenu > .dropdown-menu {
top: auto;
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
.border-radius(5px 5px 5px 0);
}
// Caret to indicate there is a submenu
.dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: darken(@dropdownBackground, 20%);
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: @dropdownLinkColorHover;
}
// Left aligned submenus
.dropdown-submenu.pull-left {
// Undo the float
// Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
float: none;
// Positioning the submenu
> .dropdown-menu {
left: -100%;
margin-left: 10px;
.border-radius(6px 0 6px 6px);
}
}
// Tweak nav headers
// -----------------
// Increase padding from 15px to 20px on sides
.dropdown .dropdown-menu .nav-header {
padding-left: 20px;
padding-right: 20px;
}
// Typeahead
// ---------
.typeahead {
z-index: 1051;
margin-top: 2px; // give it some space to breathe
.border-radius(@baseBorderRadius);
}
...@@ -2,20 +2,203 @@ ...@@ -2,20 +2,203 @@
// Grid system // Grid system
// -------------------------------------------------- // --------------------------------------------------
// Set the container width, and override it for fixed navbars in media queries
.container {
.container-fixed();
}
// Mobile-first defaults
.row {
.make-row();
}
// Common styles for small and large grid columns
.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-10,
.col-11,
.col-12,
.col-sm-1,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12 {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
//
// Container and grid column sizing
//
// Tiny device columns (smartphones)
.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-10,
.col-11,
.col-12 {
float: left;
}
.col-1 { width: percentage((1 / @grid-columns)); }
.col-2 { width: percentage((2 / @grid-columns)); }
.col-3 { width: percentage((3 / @grid-columns)); }
.col-4 { width: percentage((4 / @grid-columns)); }
.col-5 { width: percentage((5 / @grid-columns)); }
.col-6 { width: percentage((6 / @grid-columns)); }
.col-7 { width: percentage((7 / @grid-columns)); }
.col-8 { width: percentage((8 / @grid-columns)); }
.col-9 { width: percentage((9 / @grid-columns)); }
.col-10 { width: percentage((10/ @grid-columns)); }
.col-11 { width: percentage((11/ @grid-columns)); }
.col-12 { width: 100%; }
// Fixed (940px) // Small device columns (phones to tablets)
#grid > .core(@gridColumnWidth, @gridGutterWidth); @media (min-width: @screen-tablet) {
.container {
max-width: @container-tablet;
}
.col-sm-1,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-10,
.col-sm-11,
.col-sm-12 {
float: left;
}
.col-sm-1 { width: percentage((1 / @grid-columns)); }
.col-sm-2 { width: percentage((2 / @grid-columns)); }
.col-sm-3 { width: percentage((3 / @grid-columns)); }
.col-sm-4 { width: percentage((4 / @grid-columns)); }
.col-sm-5 { width: percentage((5 / @grid-columns)); }
.col-sm-6 { width: percentage((6 / @grid-columns)); }
.col-sm-7 { width: percentage((7 / @grid-columns)); }
.col-sm-8 { width: percentage((8 / @grid-columns)); }
.col-sm-9 { width: percentage((9 / @grid-columns)); }
.col-sm-10 { width: percentage((10/ @grid-columns)); }
.col-sm-11 { width: percentage((11/ @grid-columns)); }
.col-sm-12 { width: 100%; }
// Push and pull columns for source order changes
.col-push-1 { left: percentage((1 / @grid-columns)); }
.col-push-2 { left: percentage((2 / @grid-columns)); }
.col-push-3 { left: percentage((3 / @grid-columns)); }
.col-push-4 { left: percentage((4 / @grid-columns)); }
.col-push-5 { left: percentage((5 / @grid-columns)); }
.col-push-6 { left: percentage((6 / @grid-columns)); }
.col-push-7 { left: percentage((7 / @grid-columns)); }
.col-push-8 { left: percentage((8 / @grid-columns)); }
.col-push-9 { left: percentage((9 / @grid-columns)); }
.col-push-10 { left: percentage((10/ @grid-columns)); }
.col-push-11 { left: percentage((11/ @grid-columns)); }
.col-pull-1 { right: percentage((1 / @grid-columns)); }
.col-pull-2 { right: percentage((2 / @grid-columns)); }
.col-pull-3 { right: percentage((3 / @grid-columns)); }
.col-pull-4 { right: percentage((4 / @grid-columns)); }
.col-pull-5 { right: percentage((5 / @grid-columns)); }
.col-pull-6 { right: percentage((6 / @grid-columns)); }
.col-pull-7 { right: percentage((7 / @grid-columns)); }
.col-pull-8 { right: percentage((8 / @grid-columns)); }
.col-pull-9 { right: percentage((9 / @grid-columns)); }
.col-pull-10 { right: percentage((10/ @grid-columns)); }
.col-pull-11 { right: percentage((11/ @grid-columns)); }
}
// Fluid (940px) // Medium and large device columns (desktop and up)
#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); @media (min-width: @screen-desktop) {
.container {
max-width: @container-desktop;
}
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12 {
float: left;
}
.col-lg-1 { width: percentage((1 / @grid-columns)); }
.col-lg-2 { width: percentage((2 / @grid-columns)); }
.col-lg-3 { width: percentage((3 / @grid-columns)); }
.col-lg-4 { width: percentage((4 / @grid-columns)); }
.col-lg-5 { width: percentage((5 / @grid-columns)); }
.col-lg-6 { width: percentage((6 / @grid-columns)); }
.col-lg-7 { width: percentage((7 / @grid-columns)); }
.col-lg-8 { width: percentage((8 / @grid-columns)); }
.col-lg-9 { width: percentage((9 / @grid-columns)); }
.col-lg-10 { width: percentage((10/ @grid-columns)); }
.col-lg-11 { width: percentage((11/ @grid-columns)); }
.col-lg-12 { width: 100%; }
// Reset utility classes due to specificity // Offsets
[class*="span"].hide, .col-offset-1 { margin-left: percentage((1 / @grid-columns)); }
.row-fluid [class*="span"].hide { .col-offset-2 { margin-left: percentage((2 / @grid-columns)); }
display: none; .col-offset-3 { margin-left: percentage((3 / @grid-columns)); }
.col-offset-4 { margin-left: percentage((4 / @grid-columns)); }
.col-offset-5 { margin-left: percentage((5 / @grid-columns)); }
.col-offset-6 { margin-left: percentage((6 / @grid-columns)); }
.col-offset-7 { margin-left: percentage((7 / @grid-columns)); }
.col-offset-8 { margin-left: percentage((8 / @grid-columns)); }
.col-offset-9 { margin-left: percentage((9 / @grid-columns)); }
.col-offset-10 { margin-left: percentage((10/ @grid-columns)); }
.col-offset-11 { margin-left: percentage((11/ @grid-columns)); }
} }
[class*="span"].pull-right, // Large desktops and up
.row-fluid [class*="span"].pull-right { @media (min-width: @screen-large-desktop) {
float: right; .container {
max-width: @container-large-desktop;
}
} }
//
// Jumbotron
// --------------------------------------------------
.jumbotron {
padding: 30px;
margin-bottom: 30px;
font-size: (@font-size-base * 1.5);
font-weight: 200;
line-height: (@line-height-base * 1.5);
color: @jumbotron-lead-color;
background-color: @jumbotron-bg;
h1 {
line-height: 1;
color: @jumbotron-heading-color;
}
p {
line-height: 1.4;
}
@media screen and (min-width: @screen-tablet) {
padding: 50px 60px;
border-radius: @border-radius-large; // Only round corners at higher resolutions
h1 {
font-size: (@font-size-base * 4.5);
}
}
}
//
// Labels
// --------------------------------------------------
.label {
display: inline;
padding: .25em .6em;
font-size: 75%;
font-weight: 500;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: @gray-light;
border-radius: .25em;
// Add hover effects, but only for links
&[href] {
&:hover,
&:focus {
color: @label-link-hover-color;
text-decoration: none;
cursor: pointer;
background-color: darken(@gray-light, 10%);
}
}
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-danger {
.label-variant(@label-danger-bg);
}
.label-success {
.label-variant(@label-success-bg);
}
.label-warning {
.label-variant(@label-warning-bg);
}
.label-info {
.label-variant(@label-info-bg);
}
//
// List groups
// --------------------------------------------------
// Base class
//
// Easily usable on <ul>, <ol>, or <div>.
.list-group {
// No need to set list-style: none; since .list-group-item is block level
margin-bottom: 20px;
padding-left: 0; // reset padding because ul and ol
background-color: @list-group-bg;
}
// Individual list items
// -------------------------
.list-group-item {
position: relative;
display: block;
padding: 10px 30px 10px 15px;
// Place the border on the list items and negative margin up for better styling
margin-bottom: -1px;
border: 1px solid @list-group-border;
// Round the first and last items
&:first-child {
.border-top-radius(@border-radius-base);
}
&:last-child {
margin-bottom: 0;
.border-bottom-radius(@border-radius-base);
}
// Align badges within list items
> .badge {
float: right;
margin-right: -15px;
}
}
// Custom content options
// -------------------------
.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}
// Linked list items
// -------------------------
// Custom content within linked items
a.list-group-item {
// Colorize content accordingly
.list-group-item-heading {
color: @list-group-link-heading-color;
}
.list-group-item-text {
color: @list-group-link-color;
}
// Hover state
&:hover,
&:focus {
text-decoration: none;
background-color: @list-group-hover-bg;
}
// Active class on item itself, not parent
&.active {
z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-color;
background-color: @list-group-active-bg;
border-color: @list-group-active-border;
// Force color to inherit for custom content
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: lighten(@list-group-active-bg, 40%);
}
}
}
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
.media, .media,
.media-body { .media-body {
overflow: hidden; overflow: hidden;
*overflow: visible;
zoom: 1; zoom: 1;
} }
...@@ -37,11 +36,13 @@ ...@@ -37,11 +36,13 @@
// Media image alignment // Media image alignment
// ------------------------- // -------------------------
.media > .pull-left { .media {
margin-right: 10px; > .pull-left {
} margin-right: 10px;
.media > .pull-right { }
margin-left: 10px; > .pull-right {
margin-left: 10px;
}
} }
...@@ -50,6 +51,6 @@ ...@@ -50,6 +51,6 @@
// Undo default ul/ol styles // Undo default ul/ol styles
.media-list { .media-list {
margin-left: 0; padding-left: 0;
list-style: none; list-style: none;
} }
...@@ -2,81 +2,105 @@ ...@@ -2,81 +2,105 @@
// Modals // Modals
// -------------------------------------------------- // --------------------------------------------------
// Background // .modal-open - body class for killing the scroll
.modal-backdrop { // .modal - container to scroll within
// .modal-dialog - positioning shell for the actual modal
// .modal-content - actual modal w/ bg and corners and shit
// Kill the scroll on the body
.modal-open {
overflow: hidden;
}
// Container that the modal scrolls within
.modal {
display: none;
overflow: auto;
overflow-y: scroll;
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: @zindexModalBackdrop; z-index: @zindex-modal-background;
background-color: @black;
// Fade for backdrop // When fading in the modal, animate it to slide down
&.fade { opacity: 0; } &.fade .modal-dialog {
.translate(0, -25%);
.transition-transform(~"0.3s ease-out");
}
&.fade.in .modal-dialog { .translate(0, 0)}
} }
.modal-backdrop, // Shell div to position the modal with bottom padding
.modal-backdrop.fade.in { .modal-dialog {
.opacity(80); position: relative;
top: 0;
left: 0;
right: 0;
width: auto;
padding: 10px;
z-index: (@zindex-modal-background + 10);
} }
// Base modal // Actual modal
.modal { .modal-content {
position: fixed; position: relative;
top: 10%; background-color: @modal-content-bg;
left: 50%; border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
z-index: @zindexModal; border: 1px solid @modal-content-border-color;
width: 560px; border-radius: @border-radius-large;
margin-left: -280px; .box-shadow(0 3px 9px rgba(0,0,0,.5));
background-color: @white;
border: 1px solid #999;
border: 1px solid rgba(0,0,0,.3);
*border: 1px solid #999; /* IE6-7 */
.border-radius(6px);
.box-shadow(0 3px 7px rgba(0,0,0,0.3));
.background-clip(padding-box); .background-clip(padding-box);
// Remove focus outline from opened modal // Remove focus outline from opened modal
outline: none; outline: none;
}
&.fade { // Modal background
.transition(e('opacity .3s linear, top .3s ease-out')); .modal-backdrop {
top: -25%; position: fixed;
} top: 0;
&.fade.in { top: 10%; } right: 0;
bottom: 0;
left: 0;
z-index: (@zindex-modal-background - 10);
background-color: @modal-backdrop-bg;
// Fade for backdrop
&.fade { .opacity(0); }
&.fade.in { .opacity(.5); }
} }
// Modal header
// Top section of the modal w/ title and dismiss
.modal-header { .modal-header {
padding: 9px 15px; padding: @modal-title-padding;
border-bottom: 1px solid #eee; border-bottom: 1px solid @modal-header-border-color;
// Close icon min-height: (@modal-title-padding + @modal-title-line-height);
.close { margin-top: 2px; } }
// Heading // Close icon
h3 { .modal-header .close {
margin: 0; margin-top: -2px;
line-height: 30px;
}
} }
// Body (where all modal content resides) // Title text within header
.modal-title {
margin: 0;
line-height: @modal-title-line-height;
}
// Modal body
// Where all modal content resides (sibling of .modal-header and .modal-footer)
.modal-body { .modal-body {
position: relative; position: relative;
overflow-y: auto; padding: @modal-inner-padding;
max-height: 400px;
padding: 15px;
}
// Remove bottom margin if need be
.modal-form {
margin-bottom: 0;
} }
// Footer (for actions) // Footer (for actions)
.modal-footer { .modal-footer {
padding: 14px 15px 15px; margin-top: 15px;
margin-bottom: 0; padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
text-align: right; // right align buttons text-align: right; // right align buttons
background-color: #f5f5f5; border-top: 1px solid @modal-footer-border-color;
border-top: 1px solid #ddd;
.border-radius(0 0 6px 6px);
.box-shadow(inset 0 1px 0 @white);
.clearfix(); // clear it in case folks use .pull-* classes on buttons .clearfix(); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons // Properly space out buttons
...@@ -93,3 +117,20 @@ ...@@ -93,3 +117,20 @@
margin-left: 0; margin-left: 0;
} }
} }
// Scale up the modal
@media screen and (min-width: @screen-tablet) {
.modal-dialog {
left: 50%;
right: auto;
width: 560px;
margin-left: -280px;
padding-top: 30px;
padding-bottom: 30px;
}
.modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5));
}
}
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
// ==========================================================================
// HTML5 display definitions
// ==========================================================================
//
// Correct `block` display not defined in IE 8/9.
//
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
//
// Correct `inline-block` display not defined in IE 8/9.
//
audio,
canvas,
video {
display: inline-block;
}
//
// Prevent modern browsers from displaying `audio` without controls.
// Remove excess height in iOS 5 devices.
//
audio:not([controls]) {
display: none;
height: 0;
}
//
// Address styling not present in IE 8/9.
//
[hidden] {
display: none;
}
// ==========================================================================
// Base
// ==========================================================================
//
// 1. Set default font family to sans-serif.
// 2. Prevent iOS text size adjust after orientation change, without disabling
// user zoom.
//
html {
font-family: sans-serif; // 1
-webkit-text-size-adjust: 100%; // 2
-ms-text-size-adjust: 100%; // 2
}
//
// Remove default margin.
//
body {
margin: 0;
}
// ==========================================================================
// Links
// ==========================================================================
//
// Address `outline` inconsistency between Chrome and other browsers.
//
a:focus {
outline: thin dotted;
}
//
// Improve readability when focused and also mouse hovered in all browsers.
//
a:active,
a:hover {
outline: 0;
}
// ==========================================================================
// Typography
// ==========================================================================
//
// Address variable `h1` font-size and margin within `section` and `article`
// contexts in Firefox 4+, Safari 5, and Chrome.
//
h1 {
font-size: 2em;
margin: 0.67em 0;
}
//
// Address styling not present in IE 8/9, Safari 5, and Chrome.
//
abbr[title] {
border-bottom: 1px dotted;
}
//
// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
//
b,
strong {
font-weight: bold;
}
//
// Address styling not present in Safari 5 and Chrome.
//
dfn {
font-style: italic;
}
//
// Address differences between Firefox and other browsers.
//
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
//
// Address styling not present in IE 8/9.
//
mark {
background: #ff0;
color: #000;
}
//
// Correct font family set oddly in Safari 5 and Chrome.
//
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
//
// Improve readability of pre-formatted text in all browsers.
//
pre {
white-space: pre-wrap;
}
//
// Set consistent quote types.
//
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
//
// Address inconsistent and variable font size in all browsers.
//
small {
font-size: 80%;
}
//
// Prevent `sub` and `sup` affecting `line-height` in all browsers.
//
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
// ==========================================================================
// Embedded content
// ==========================================================================
//
// Remove border when inside `a` element in IE 8/9.
//
img {
border: 0;
}
//
// Correct overflow displayed oddly in IE 9.
//
svg:not(:root) {
overflow: hidden;
}
// ==========================================================================
// Figures
// ==========================================================================
//
// Address margin not present in IE 8/9 and Safari 5.
//
figure {
margin: 0;
}
// ==========================================================================
// Forms
// ==========================================================================
//
// Define consistent border, margin, and padding.
//
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
//
// 1. Correct `color` not being inherited in IE 8/9.
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
//
legend {
border: 0; // 1
padding: 0; // 2
}
//
// 1. Correct font family not being inherited in all browsers.
// 2. Correct font size not being inherited in all browsers.
// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
//
button,
input,
select,
textarea {
font-family: inherit; // 1
font-size: 100%; // 2
margin: 0; // 3
}
//
// Address Firefox 4+ setting `line-height` on `input` using `!important` in
// the UA stylesheet.
//
button,
input {
line-height: normal;
}
//
// Address inconsistent `text-transform` inheritance for `button` and `select`.
// All other form control elements do not inherit `text-transform` values.
// Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
// Correct `select` style inheritance in Firefox 4+ and Opera.
//
button,
select {
text-transform: none;
}
//
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
// and `video` controls.
// 2. Correct inability to style clickable `input` types in iOS.
// 3. Improve usability and consistency of cursor style between image-type
// `input` and others.
//
button,
html input[type="button"], // 1
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
}
//
// Re-set default cursor for disabled elements.
//
button[disabled],
html input[disabled] {
cursor: default;
}
//
// 1. Address box sizing set to `content-box` in IE 8/9.
// 2. Remove excess padding in IE 8/9.
//
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
}
//
// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
// (include `-moz` to future-proof).
//
input[type="search"] {
-webkit-appearance: textfield; // 1
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; // 2
box-sizing: content-box;
}
//
// Remove inner padding and search cancel button in Safari 5 and Chrome
// on OS X.
//
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
//
// Remove inner padding and border in Firefox 4+.
//
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
//
// 1. Remove default vertical scrollbar in IE 8/9.
// 2. Improve readability and alignment in all browsers.
//
textarea {
overflow: auto; // 1
vertical-align: top; // 2
}
// ==========================================================================
// Tables
// ==========================================================================
//
// Remove most spacing between table cells.
//
table {
border-collapse: collapse;
border-spacing: 0;
}
...@@ -4,40 +4,52 @@ ...@@ -4,40 +4,52 @@
.pager { .pager {
margin: @baseLineHeight 0; padding-left: 0;
margin: @line-height-computed 0;
list-style: none; list-style: none;
text-align: center; text-align: center;
.clearfix(); .clearfix();
li {
display: inline;
> a,
> span {
display: inline-block;
padding: 5px 14px;
background-color: @pagination-bg;
border: 1px solid @pagination-border;
border-radius: @pager-border-radius;
}
> a:hover,
> a:focus {
text-decoration: none;
background-color: @pagination-active-bg;
}
}
.next {
> a,
> span {
float: right;
}
}
.previous {
> a,
> span {
float: left;
}
}
.disabled {
> a,
> a:hover,
> a:focus,
> span {
color: @pager-disabled-color;
background-color: @pagination-bg;
cursor: not-allowed;
}
}
} }
.pager li {
display: inline;
}
.pager li > a,
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
.border-radius(15px);
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
.pager .next > a,
.pager .next > span {
float: right;
}
.pager .previous > a,
.pager .previous > span {
float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: @grayLight;
background-color: #fff;
cursor: default;
}
\ No newline at end of file
// //
// Pagination (multiple pages) // Pagination (multiple pages)
// -------------------------------------------------- // --------------------------------------------------
// Space out pagination from surrounding content
.pagination { .pagination {
margin: @baseLineHeight 0;
}
.pagination ul {
// Allow for text-based alignment
display: inline-block; display: inline-block;
.ie7-inline-block(); padding-left: 0;
// Reset default ul styles margin: @line-height-computed 0;
margin-left: 0; border-radius: @border-radius-base;
margin-bottom: 0;
// Visuals > li {
.border-radius(@baseBorderRadius); display: inline; // Remove list-style and block-level defaults
.box-shadow(0 1px 2px rgba(0,0,0,.05)); > a,
} > span {
.pagination ul > li { float: left; // Collapse white-space
display: inline; // Remove list-style and block-level defaults padding: 4px 12px;
} line-height: @line-height-base;
.pagination ul > li > a, text-decoration: none;
.pagination ul > li > span { background-color: @pagination-bg;
float: left; // Collapse white-space border: 1px solid @pagination-border;
padding: 4px 12px; border-left-width: 0;
line-height: @baseLineHeight; }
text-decoration: none; &:first-child {
background-color: @paginationBackground; > a,
border: 1px solid @paginationBorder; > span {
border-left-width: 0; border-left-width: 1px;
} .border-left-radius(@border-radius-base);
.pagination ul > li > a:hover, }
.pagination ul > li > a:focus, }
.pagination ul > .active > a, &:last-child {
.pagination ul > .active > span { > a,
background-color: @paginationActiveBackground; > span {
} .border-right-radius(@border-radius-base);
.pagination ul > .active > a, }
.pagination ul > .active > span { }
color: @grayLight; }
cursor: default;
} > li > a:hover,
.pagination ul > .disabled > span, > li > a:focus,
.pagination ul > .disabled > a, > .active > a,
.pagination ul > .disabled > a:hover, > .active > span {
.pagination ul > .disabled > a:focus { background-color: @pagination-active-bg;
color: @grayLight; }
background-color: transparent; > .active > a,
cursor: default; > .active > span {
} color: @pagination-active-color;
.pagination ul > li:first-child > a, cursor: default;
.pagination ul > li:first-child > span { }
border-left-width: 1px;
.border-left-radius(@baseBorderRadius); > .disabled {
} > span,
.pagination ul > li:last-child > a, > a,
.pagination ul > li:last-child > span { > a:hover,
.border-right-radius(@baseBorderRadius); > a:focus {
} color: @pagination-disabled-color;
background-color: @pagination-bg;
cursor: not-allowed;
// Alignment }
// -------------------------------------------------- }
.pagination-centered {
text-align: center;
}
.pagination-right {
text-align: right;
} }
// Sizing // Sizing
// -------------------------------------------------- // --------------------------------------------------
// Large // Large
.pagination-large { .pagination-large {
ul > li > a, > li {
ul > li > span { > a,
padding: @paddingLarge; > span {
font-size: @fontSizeLarge; padding: @padding-large-vertical @padding-large-horizontal;
} font-size: @font-size-large;
ul > li:first-child > a, }
ul > li:first-child > span { &:first-child {
.border-left-radius(@borderRadiusLarge); > a,
} > span {
ul > li:last-child > a, .border-left-radius(@border-radius-large);
ul > li:last-child > span { }
.border-right-radius(@borderRadiusLarge); }
} &:last-child {
} > a,
> span {
// Small and mini .border-right-radius(@border-radius-large);
.pagination-mini, }
.pagination-small { }
ul > li:first-child > a,
ul > li:first-child > span {
.border-left-radius(@borderRadiusSmall);
}
ul > li:last-child > a,
ul > li:last-child > span {
.border-right-radius(@borderRadiusSmall);
} }
} }
// Small // Small
.pagination-small { .pagination-small {
ul > li > a, > li {
ul > li > span { > a,
padding: @paddingSmall; > span {
font-size: @fontSizeSmall; padding: @padding-small-vertical @padding-small-horizontal;
} font-size: @font-size-small;
} }
// Mini &:first-child {
.pagination-mini { > a,
ul > li > a, > span {
ul > li > span { .border-left-radius(@border-radius-small);
padding: @paddingMini; }
font-size: @fontSizeMini; }
&:last-child {
> a,
> span {
.border-right-radius(@border-radius-small);
}
}
} }
} }
//
// Panels
// --------------------------------------------------
// Base class
.panel {
padding: 15px;
margin-bottom: 20px;
background-color: @panel-bg;
border: 1px solid @panel-border;
border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05));
}
// Optional heading
.panel-heading {
margin: -15px -15px 15px;
padding: 10px 15px;
background-color: @panel-heading-bg;
border-bottom: 1px solid @panel-border;
border-top-left-radius: (@panel-border-radius - 1);
border-top-right-radius: (@panel-border-radius - 1);
}
// Within heading, strip any `h*` tag of it's default margins for spacing.
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: (@font-size-base * 1.25);
font-weight: 500;
}
// Optional footer (stays gray in every modifier class)
.panel-footer {
margin: 15px -15px -15px;
padding: 10px 15px;
background-color: @panel-footer-bg;
border-top: 1px solid @panel-border;
border-bottom-left-radius: (@panel-border-radius - 1);
border-bottom-right-radius: (@panel-border-radius - 1);
}
// Contextual variations
.panel-primary {
border-color: @panel-primary-border;
.panel-heading {
color: @panel-primary-text;
background-color: @panel-primary-heading-bg;
border-color: @panel-primary-border;
}
}
.panel-success {
border-color: @panel-success-border;
.panel-heading {
color: @panel-success-text;
background-color: @panel-success-heading-bg;
border-color: @panel-success-border;
}
}
.panel-warning {
border-color: @panel-warning-border;
.panel-heading {
color: @panel-warning-text;
background-color: @panel-warning-heading-bg;
border-color: @panel-warning-border;
}
}
.panel-danger {
border-color: @panel-danger-border;
.panel-heading {
color: @panel-danger-text;
background-color: @panel-danger-heading-bg;
border-color: @panel-danger-border;
}
}
.panel-info {
border-color: @panel-info-border;
.panel-heading {
color: @panel-info-text;
background-color: @panel-info-heading-bg;
border-color: @panel-info-border;
}
}
// List groups in panels
.list-group-flush {
margin: 15px -15px -15px;
.list-group-item {
border-width: 1px 0;
// Remove border radius for top one
&:first-child {
.border-top-radius(0);
}
// But keep it for the last one
&:last-child {
border-bottom: 0;
}
}
}
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: @zindexPopover; z-index: @zindex-popover;
display: none; display: none;
max-width: 276px; max-width: @popover-max-width;
padding: 1px; padding: 1px;
text-align: left; // Reset given new insertion method text-align: left; // Reset given new insertion method
background-color: @popoverBackground; background-color: @popover-bg;
-webkit-background-clip: padding-box; -webkit-bg-clip: padding-box;
-moz-background-clip: padding; -moz-bg-clip: padding;
background-clip: padding-box; background-clip: padding-box;
border: 1px solid #ccc; border: 1px solid @popover-fallback-border-color;
border: 1px solid rgba(0,0,0,.2); border: 1px solid @popover-border-color;
.border-radius(6px); border-radius: @border-radius-large;
.box-shadow(0 5px 10px rgba(0,0,0,.2)); .box-shadow(0 5px 10px rgba(0,0,0,.2));
// Overrides for proper insertion // Overrides for proper insertion
...@@ -34,16 +34,12 @@ ...@@ -34,16 +34,12 @@
.popover-title { .popover-title {
margin: 0; // reset heading margin margin: 0; // reset heading margin
padding: 8px 14px; padding: 8px 14px;
font-size: 14px; font-size: @font-size-base;
font-weight: normal; font-weight: normal;
line-height: 18px; line-height: 18px;
background-color: @popoverTitleBackground; background-color: @popover-title-bg;
border-bottom: 1px solid darken(@popoverTitleBackground, 5%); border-bottom: 1px solid darken(@popover-title-bg, 5%);
.border-radius(5px 5px 0 0); border-radius: 5px 5px 0 0;
&:empty {
display: none;
}
} }
.popover-content { .popover-content {
...@@ -54,79 +50,85 @@ ...@@ -54,79 +50,85 @@
// //
// .arrow is outer, .arrow:after is inner // .arrow is outer, .arrow:after is inner
.popover .arrow, .popover .arrow {
.popover .arrow:after { &,
position: absolute; &:after {
display: block; position: absolute;
width: 0; display: block;
height: 0; width: 0;
border-color: transparent; height: 0;
border-style: solid; border-color: transparent;
border-style: solid;
}
} }
.popover .arrow { .popover .arrow {
border-width: @popoverArrowOuterWidth; border-width: @popover-arrow-outer-width;
} }
.popover .arrow:after { .popover .arrow:after {
border-width: @popoverArrowWidth; border-width: @popover-arrow-width;
content: ""; content: "";
} }
.popover { .popover {
&.top .arrow { &.top .arrow {
left: 50%; left: 50%;
margin-left: -@popoverArrowOuterWidth; margin-left: -@popover-arrow-outer-width;
border-bottom-width: 0; border-bottom-width: 0;
border-top-color: #999; // IE8 fallback border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-top-color: @popoverArrowOuterColor; border-top-color: @popover-arrow-outer-color;
bottom: -@popoverArrowOuterWidth; bottom: -@popover-arrow-outer-width;
&:after { &:after {
content: " ";
bottom: 1px; bottom: 1px;
margin-left: -@popoverArrowWidth; margin-left: -@popover-arrow-width;
border-bottom-width: 0; border-bottom-width: 0;
border-top-color: @popoverArrowColor; border-top-color: @popover-arrow-color;
} }
} }
&.right .arrow { &.right .arrow {
top: 50%; top: 50%;
left: -@popoverArrowOuterWidth; left: -@popover-arrow-outer-width;
margin-top: -@popoverArrowOuterWidth; margin-top: -@popover-arrow-outer-width;
border-left-width: 0; border-left-width: 0;
border-right-color: #999; // IE8 fallback border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-right-color: @popoverArrowOuterColor; border-right-color: @popover-arrow-outer-color;
&:after { &:after {
content: " ";
left: 1px; left: 1px;
bottom: -@popoverArrowWidth; bottom: -@popover-arrow-width;
border-left-width: 0; border-left-width: 0;
border-right-color: @popoverArrowColor; border-right-color: @popover-arrow-color;
} }
} }
&.bottom .arrow { &.bottom .arrow {
left: 50%; left: 50%;
margin-left: -@popoverArrowOuterWidth; margin-left: -@popover-arrow-outer-width;
border-top-width: 0; border-top-width: 0;
border-bottom-color: #999; // IE8 fallback border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-bottom-color: @popoverArrowOuterColor; border-bottom-color: @popover-arrow-outer-color;
top: -@popoverArrowOuterWidth; top: -@popover-arrow-outer-width;
&:after { &:after {
content: " ";
top: 1px; top: 1px;
margin-left: -@popoverArrowWidth; margin-left: -@popover-arrow-width;
border-top-width: 0; border-top-width: 0;
border-bottom-color: @popoverArrowColor; border-bottom-color: @popover-arrow-color;
} }
} }
&.left .arrow { &.left .arrow {
top: 50%; top: 50%;
right: -@popoverArrowOuterWidth; right: -@popover-arrow-outer-width;
margin-top: -@popoverArrowOuterWidth; margin-top: -@popover-arrow-outer-width;
border-right-width: 0; border-right-width: 0;
border-left-color: #999; // IE8 fallback border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-left-color: @popoverArrowOuterColor; border-left-color: @popover-arrow-outer-color;
&:after { &:after {
content: " ";
right: 1px; right: 1px;
border-right-width: 0; border-right-width: 0;
border-left-color: @popoverArrowColor; border-left-color: @popover-arrow-color;
bottom: -@popoverArrowWidth; bottom: -@popover-arrow-width;
} }
} }
......
//
// Basic print styles
// --------------------------------------------------
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
@media print {
* {
text-shadow: none !important;
color: #000 !important; // Black prints faster: h5bp.com/s
background: transparent !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
// Don't show links for images, or javascript/internal links
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; // h5bp.com/t
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 2cm .5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
// Bootstrap components
.navbar {
display: none;
}
.table {
td,
th {
background-color: #fff !important;
}
}
.btn,
.dropup > .btn {
> .caret {
border-top-color: #000 !important;
}
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table-bordered {
th,
td {
border: 1px solid #ddd !important;
}
}
}
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
// -------------------------------------------------- // --------------------------------------------------
// ANIMATIONS // Bar animations
// ---------- // -------------------------
// Webkit // Webkit
@-webkit-keyframes progress-bar-stripes { @-webkit-keyframes progress-bar-stripes {
...@@ -38,45 +38,40 @@ ...@@ -38,45 +38,40 @@
// THE BARS // Bar itself
// -------- // -------------------------
// Outer container // Outer container
.progress { .progress {
overflow: hidden; overflow: hidden;
height: @baseLineHeight; height: @line-height-computed;
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
#gradient > .vertical(#f5f5f5, #f9f9f9); background-color: @progress-bg;
border-radius: @border-radius-base;
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
.border-radius(@baseBorderRadius);
} }
// Bar of progress // Bar of progress
.progress .bar { .progress-bar {
float: left;
width: 0%; width: 0%;
height: 100%; height: 100%;
color: @white; font-size: @font-size-small;
float: left; color: @progress-bar-color;
font-size: 12px;
text-align: center; text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25); background-color: @progress-bar-bg;
#gradient > .vertical(#149bdf, #0480be);
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.box-sizing(border-box);
.transition(width .6s ease); .transition(width .6s ease);
} }
.progress .bar + .bar {
.box-shadow(~"inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15)");
}
// Striped bars // Striped bars
.progress-striped .bar { .progress-striped .progress-bar {
#gradient > .striped(#149bdf); #gradient > .striped(@progress-bar-bg);
.background-size(40px 40px); .background-size(40px 40px);
} }
// Call animation for the active one // Call animation for the active one
.progress.active .bar { .progress.active .progress-bar {
-webkit-animation: progress-bar-stripes 2s linear infinite; -webkit-animation: progress-bar-stripes 2s linear infinite;
-moz-animation: progress-bar-stripes 2s linear infinite; -moz-animation: progress-bar-stripes 2s linear infinite;
-ms-animation: progress-bar-stripes 2s linear infinite; -ms-animation: progress-bar-stripes 2s linear infinite;
...@@ -86,37 +81,25 @@ ...@@ -86,37 +81,25 @@
// COLORS // Variations
// ------ // -------------------------
// Danger (red) // Danger (red)
.progress-danger .bar, .progress .bar-danger { .progress-bar-danger {
#gradient > .vertical(#ee5f5b, #c43c35); .progress-bar-variant(@progress-bar-danger-bg);
}
.progress-danger.progress-striped .bar, .progress-striped .bar-danger {
#gradient > .striped(#ee5f5b);
} }
// Success (green) // Success (green)
.progress-success .bar, .progress .bar-success { .progress-bar-success {
#gradient > .vertical(#62c462, #57a957); .progress-bar-variant(@progress-bar-success-bg);
}
.progress-success.progress-striped .bar, .progress-striped .bar-success {
#gradient > .striped(#62c462);
}
// Info (teal)
.progress-info .bar, .progress .bar-info {
#gradient > .vertical(#5bc0de, #339bb9);
}
.progress-info.progress-striped .bar, .progress-striped .bar-info {
#gradient > .striped(#5bc0de);
} }
// Warning (orange) // Warning (orange)
.progress-warning .bar, .progress .bar-warning { .progress-bar-warning {
#gradient > .vertical(lighten(@orange, 15%), @orange); .progress-bar-variant(@progress-bar-warning-bg);
} }
.progress-warning.progress-striped .bar, .progress-striped .bar-warning {
#gradient > .striped(lighten(@orange, 15%)); // Info (teal)
.progress-bar-info {
.progress-bar-variant(@progress-bar-info-bg);
} }
...@@ -5,55 +5,115 @@ ...@@ -5,55 +5,115 @@
// IE10 Metro responsive // IE10 Metro responsive
// Required for Windows 8 Metro split-screen snapping with IE10 // Required for Windows 8 Metro split-screen snapping with IE10
//
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
@-ms-viewport{ @-ms-viewport{
width: device-width; width: device-width;
} }
// IE10 on Windows Phone 8
// IE10 on WP8 doesn't report CSS pixels, but actual device pixels. In
// other words, say on a Lumia, you'll get 768px as the device width,
// meaning users will see the tablet styles and not phone styles.
//
// Alternatively you can override this with JS (see source below), but
// we won't be doing that here given our limited scope.
//
// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
@media screen and (max-width: 400px) {
@-ms-viewport{
width: 320px;
}
}
// Hide from screenreaders and browsers // Hide from screenreaders and browsers
// Credit: HTML5 Boilerplate // Credit: HTML5 Boilerplate
.hidden { .hidden {
display: none; display: none !important;
visibility: hidden; visibility: hidden !important;
} }
// Visibility utilities // Visibility utilities
// For desktops // For Phones
.visible-phone { display: none !important; } .visible-sm {
.visible-tablet { display: none !important; } .responsive-visibility();
.hidden-phone { } }
.hidden-tablet { } .visible-md {
.hidden-desktop { display: none !important; } .responsive-invisibility();
.visible-desktop { display: inherit !important; } }
.visible-lg {
.responsive-invisibility();
}
.hidden-sm {
.responsive-invisibility();
}
.hidden-md {
.responsive-visibility();
}
.hidden-lg {
.responsive-visibility();
}
// Tablets & small desktops only // Tablets & small desktops only
@media (min-width: 768px) and (max-width: 979px) { @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
// Hide everything else .visible-sm {
.hidden-desktop { display: inherit !important; } .responsive-invisibility();
.visible-desktop { display: none !important ; } }
// Show .visible-md {
.visible-tablet { display: inherit !important; } .responsive-visibility();
// Hide }
.hidden-tablet { display: none !important; } .visible-lg {
} .responsive-invisibility();
}
// Phones only
@media (max-width: 767px) { .hidden-sm {
// Hide everything else .responsive-visibility();
.hidden-desktop { display: inherit !important; } }
.visible-desktop { display: none !important; } .hidden-md {
// Show .responsive-invisibility();
.visible-phone { display: inherit !important; } // Use inherit to restore previous behavior }
// Hide .hidden-lg {
.hidden-phone { display: none !important; } .responsive-visibility();
}
}
// For desktops
@media (min-width: @screen-desktop) {
.visible-sm {
.responsive-invisibility();
}
.visible-md {
.responsive-invisibility();
}
.visible-lg {
.responsive-visibility();
}
.hidden-sm {
.responsive-visibility();
}
.hidden-md {
.responsive-visibility();
}
.hidden-lg {
.responsive-invisibility();
}
} }
// Print utilities // Print utilities
.visible-print { display: none !important; } .visible-print {
.hidden-print { } .responsive-invisibility();
}
.hidden-print { }
@media print { @media print {
.visible-print { display: inherit !important; } .visible-print {
.hidden-print { display: none !important; } .responsive-visibility();
}
.hidden-print {
.responsive-invisibility();
}
} }
...@@ -3,16 +3,38 @@ ...@@ -3,16 +3,38 @@
// -------------------------------------------------- // --------------------------------------------------
// Reset the box-sizing
// -------------------------
* {
.box-sizing(border-box);
}
// Body reset // Body reset
// ------------------------- // -------------------------
html {
font-size: 62.5%;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
body { body {
margin: 0; font-family: @font-family-base;
font-family: @baseFontFamily; font-size: @font-size-base;
font-size: @baseFontSize; line-height: @line-height-base;
line-height: @baseLineHeight; color: @text-color;
color: @textColor; background-color: @body-bg;
background-color: @bodyBackground; }
// Reset fonts for relevant elements
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
} }
...@@ -20,34 +42,54 @@ body { ...@@ -20,34 +42,54 @@ body {
// ------------------------- // -------------------------
a { a {
color: @linkColor; color: @link-color;
text-decoration: none; text-decoration: none;
} }
a:hover, a:hover,
a:focus { a:focus {
color: @linkColorHover; color: @link-hover-color;
text-decoration: underline; text-decoration: underline;
} }
a:focus {
.tab-focus();
}
// Images // Images
// ------------------------- // -------------------------
img {
vertical-align: middle;
}
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
display: inline-block;
max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}
// Rounded corners // Rounded corners
.img-rounded { .img-rounded {
.border-radius(6px); border-radius: @border-radius-large;
} }
// Add polaroid-esque trim // Image thumbnails
.img-polaroid { // See thumbnails.less for `.img-thumbnail`
padding: 4px;
background-color: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,.2);
.box-shadow(0 1px 3px rgba(0,0,0,.1));
}
// Perfect circle // Perfect circle
.img-circle { .img-circle {
.border-radius(500px); // crank the border-radius so it works with most reasonably sized images border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
} }
// Horizontal rules
// -------------------------
hr {
margin-top: @line-height-computed;
margin-bottom: @line-height-computed;
border: 0;
border-top: 1px solid @hr-border;
}
...@@ -3,242 +3,209 @@ ...@@ -3,242 +3,209 @@
// -------------------------------------------------- // --------------------------------------------------
// BASE TABLES
// -----------------
table { table {
max-width: 100%; max-width: 100%;
background-color: @tableBackground; background-color: @table-bg;
border-collapse: collapse;
border-spacing: 0;
} }
th {
text-align: left;
}
// BASELINE STYLES // Baseline styles
// --------------- // ---------------
.table { .table {
width: 100%; width: 100%;
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
// Cells // Cells
th, thead,
td { tbody,
padding: 8px; tfoot {
line-height: @baseLineHeight; > tr {
text-align: left; > th,
vertical-align: top; > td {
border-top: 1px solid @tableBorder; padding: @table-cell-padding;
} line-height: @line-height-base;
th { vertical-align: top;
font-weight: bold; border-top: 1px solid @table-border-color;
}
}
} }
// Bottom align for column headings // Bottom align for column headings
thead th { thead > tr > th {
vertical-align: bottom; vertical-align: bottom;
} }
// Remove top border from thead by default // Remove top border from thead by default
caption + thead tr:first-child th, caption + thead,
caption + thead tr:first-child td, colgroup + thead,
colgroup + thead tr:first-child th, thead:first-child {
colgroup + thead tr:first-child td, tr:first-child {
thead:first-child tr:first-child th, th, td {
thead:first-child tr:first-child td { border-top: 0;
border-top: 0; }
}
} }
// Account for multiple tbody instances // Account for multiple tbody instances
tbody + tbody { tbody + tbody {
border-top: 2px solid @tableBorder; border-top: 2px solid @table-border-color;
} }
// Nesting // Nesting
.table { .table {
background-color: @bodyBackground; background-color: @body-bg;
} }
} }
// CONDENSED TABLE W/ HALF PADDING // Condensed table w/ half padding
// ------------------------------- // -------------------------------
.table-condensed { .table-condensed {
th, thead,
td { tbody,
padding: 4px 5px; tfoot {
> tr {
> th,
> td {
padding: @table-condensed-cell-padding;
}
}
} }
} }
// BORDERED VERSION
// Bordered version
// ---------------- // ----------------
.table-bordered { .table-bordered {
border: 1px solid @tableBorder; border: 1px solid @table-border-color;
border-collapse: separate; // Done so we can round those corners! > thead,
*border-collapse: collapse; // IE7 can't round corners anyway > tbody,
border-left: 0; > tfoot {
.border-radius(@baseBorderRadius); > tr {
th, > th,
td { > td {
border-left: 1px solid @tableBorder; border: 1px solid @table-border-color;
} }
// Prevent a double border }
caption + thead tr:first-child th,
caption + tbody tr:first-child th,
caption + tbody tr:first-child td,
colgroup + thead tr:first-child th,
colgroup + tbody tr:first-child th,
colgroup + tbody tr:first-child td,
thead:first-child tr:first-child th,
tbody:first-child tr:first-child th,
tbody:first-child tr:first-child td {
border-top: 0;
}
// For first th/td in the first row in the first thead or tbody
thead:first-child tr:first-child > th:first-child,
tbody:first-child tr:first-child > td:first-child,
tbody:first-child tr:first-child > th:first-child {
.border-top-left-radius(@baseBorderRadius);
}
// For last th/td in the first row in the first thead or tbody
thead:first-child tr:first-child > th:last-child,
tbody:first-child tr:first-child > td:last-child,
tbody:first-child tr:first-child > th:last-child {
.border-top-right-radius(@baseBorderRadius);
}
// For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
thead:last-child tr:last-child > th:first-child,
tbody:last-child tr:last-child > td:first-child,
tbody:last-child tr:last-child > th:first-child,
tfoot:last-child tr:last-child > td:first-child,
tfoot:last-child tr:last-child > th:first-child {
.border-bottom-left-radius(@baseBorderRadius);
}
// For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
thead:last-child tr:last-child > th:last-child,
tbody:last-child tr:last-child > td:last-child,
tbody:last-child tr:last-child > th:last-child,
tfoot:last-child tr:last-child > td:last-child,
tfoot:last-child tr:last-child > th:last-child {
.border-bottom-right-radius(@baseBorderRadius);
}
// Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
tfoot + tbody:last-child tr:last-child td:first-child {
.border-bottom-left-radius(0);
}
tfoot + tbody:last-child tr:last-child td:last-child {
.border-bottom-right-radius(0);
}
// Special fixes to round the left border on the first td/th
caption + thead tr:first-child th:first-child,
caption + tbody tr:first-child td:first-child,
colgroup + thead tr:first-child th:first-child,
colgroup + tbody tr:first-child td:first-child {
.border-top-left-radius(@baseBorderRadius);
}
caption + thead tr:first-child th:last-child,
caption + tbody tr:first-child td:last-child,
colgroup + thead tr:first-child th:last-child,
colgroup + tbody tr:first-child td:last-child {
.border-top-right-radius(@baseBorderRadius);
} }
} }
// Zebra-striping
// ZEBRA-STRIPING
// -------------- // --------------
// Default zebra-stripe styles (alternating gray and transparent backgrounds) // Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped { .table-striped {
tbody { > tbody {
> tr:nth-child(odd) > td, > tr:nth-child(odd) {
> tr:nth-child(odd) > th { > td,
background-color: @tableBackgroundAccent; > th {
background-color: @table-bg-accent;
}
} }
} }
} }
// HOVER EFFECT
// Hover effect
// ------------ // ------------
// Placed here since it has to come after the potential zebra striping // Placed here since it has to come after the potential zebra striping
.table-hover { .table-hover {
tbody { > tbody {
tr:hover > td, > tr:hover {
tr:hover > th { > td,
background-color: @tableBackgroundHover; > th {
background-color: @table-bg-hover;
}
} }
} }
} }
// TABLE CELL SIZING
// Table cell sizing
// ----------------- // -----------------
// Reset default grid behavior // Reset default table behavior
table td[class*="span"], table col[class^="col-"] {
table th[class*="span"], float: none;
.row-fluid table td[class*="span"], display: table-column;
.row-fluid table th[class*="span"] {
display: table-cell;
float: none; // undo default grid column styles
margin-left: 0; // undo default grid column styles
} }
table {
// Change the column widths to account for td/th padding td,
.table td, th {
.table th { &[class^="col-"] {
&.span1 { .tableColumns(1); } float: none;
&.span2 { .tableColumns(2); } display: table-cell;
&.span3 { .tableColumns(3); } }
&.span4 { .tableColumns(4); } }
&.span5 { .tableColumns(5); }
&.span6 { .tableColumns(6); }
&.span7 { .tableColumns(7); }
&.span8 { .tableColumns(8); }
&.span9 { .tableColumns(9); }
&.span10 { .tableColumns(10); }
&.span11 { .tableColumns(11); }
&.span12 { .tableColumns(12); }
} }
// TABLE BACKGROUNDS // Table backgrounds
// ----------------- // -----------------
// Exact selectors below required to override .table-striped // Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table tbody tr {
&.success > td { .table > thead > tr,
background-color: @successBackground; .table > tbody > tr,
} .table > tfoot > tr {
&.error > td { > td.active,
background-color: @errorBackground; > th.active,
} &.active > td,
&.warning > td { &.active > th {
background-color: @warningBackground; background-color: @table-bg-hover;
} }
&.info > td { > td.success,
background-color: @infoBackground; > th.success,
&.success > td,
&.success > th {
background-color: @state-success-bg;
border-color: @state-success-border;
}
> td.danger,
> th.danger,
&.danger > td,
&.danger > th {
background-color: @state-danger-bg;
border-color: @state-danger-border;
}
> td.warning,
> th.warning,
&.warning > td,
&.warning > th {
background-color: @state-warning-bg;
border-color: @state-warning-border;
} }
} }
// Hover states for .table-hover // Hover states for `.table-hover`
.table-hover tbody tr { // Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody > tr {
> td.success:hover,
> th.success:hover,
&.success:hover > td { &.success:hover > td {
background-color: darken(@successBackground, 5%); background-color: darken(@state-success-bg, 5%);
border-color: darken(@state-success-border, 5%);
} }
&.error:hover > td { > td.danger:hover,
background-color: darken(@errorBackground, 5%); > th.danger:hover,
&.danger:hover > td {
background-color: darken(@state-danger-bg, 5%);
border-color: darken(@state-danger-border, 5%);
} }
> td.warning:hover,
> th.warning:hover,
&.warning:hover > td { &.warning:hover > td {
background-color: darken(@warningBackground, 5%); background-color: darken(@state-warning-bg, 5%);
} border-color: darken(@state-warning-border, 5%);
&.info:hover > td {
background-color: darken(@infoBackground, 5%);
} }
} }
...@@ -3,51 +3,40 @@ ...@@ -3,51 +3,40 @@
// -------------------------------------------------- // --------------------------------------------------
// Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files // Base classes
// For thumbnail block-level composite components and simple image styles
// Make wrapper ul behave like the grid // The actual thumbnailed element
.thumbnails { // Can be `a`, `div`, or `img`
margin-left: -@gridGutterWidth; .thumbnail,
list-style: none; .img-thumbnail {
.clearfix(); padding: 4px;
} line-height: @line-height-base;
// Fluid rows have no left margin background-color: @thumbnail-bg;
.row-fluid .thumbnails { border: 1px solid @thumbnail-border;
margin-left: 0; border-radius: @thumbnail-border-radius;
} .transition(all .2s ease-in-out);
// Float li to make thumbnails appear in a row
.thumbnails > li {
float: left; // Explicity set the float since we don't require .span* classes
margin-bottom: @baseLineHeight;
margin-left: @gridGutterWidth;
} }
// The actual thumbnail (can be `a` or `div`)
.thumbnail { .thumbnail {
display: block; display: block;
padding: 4px;
line-height: @baseLineHeight;
border: 1px solid #ddd;
.border-radius(@baseBorderRadius);
.box-shadow(0 1px 3px rgba(0,0,0,.055));
.transition(all .2s ease-in-out);
} }
// Add a hover/focus state for linked versions only .thumbnail > img,
.img-thumbnail {
.img-responsive();
}
// Add a hover state for linked versions only
a.thumbnail:hover, a.thumbnail:hover,
a.thumbnail:focus { a.thumbnail:focus {
border-color: @linkColor; border-color: @link-color;
.box-shadow(0 1px 4px rgba(0,105,214,.25));
} }
// Images and captions // Images and captions
.thumbnail > img { .thumbnail > img {
display: block;
max-width: 100%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.thumbnail .caption { .thumbnail .caption {
padding: 9px; padding: 9px;
color: @gray; color: @thumbnail-caption-color;
} }
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
// Base class // Base class
.tooltip { .tooltip {
position: absolute; position: absolute;
z-index: @zindexTooltip; z-index: @zindex-tooltip;
display: block; display: block;
visibility: visible; visibility: visible;
font-size: 11px; font-size: @font-size-small;
line-height: 1.4; line-height: 1.4;
.opacity(0); .opacity(0);
&.in { .opacity(80); }
&.in { .opacity(1); }
&.top { margin-top: -3px; padding: 5px 0; } &.top { margin-top: -3px; padding: 5px 0; }
&.right { margin-left: 3px; padding: 0 5px; } &.right { margin-left: 3px; padding: 0 5px; }
&.bottom { margin-top: 3px; padding: 5px 0; } &.bottom { margin-top: 3px; padding: 5px 0; }
...@@ -21,13 +22,13 @@ ...@@ -21,13 +22,13 @@
// Wrapper for the tooltip content // Wrapper for the tooltip content
.tooltip-inner { .tooltip-inner {
max-width: 200px; max-width: @tooltip-max-width;
padding: 8px; padding: 3px 8px;
color: @tooltipColor; color: @tooltip-color;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
background-color: @tooltipBackground; background-color: @tooltip-bg;
.border-radius(@baseBorderRadius); border-radius: @border-radius-base;
} }
// Arrows // Arrows
...@@ -42,29 +43,53 @@ ...@@ -42,29 +43,53 @@
&.top .tooltip-arrow { &.top .tooltip-arrow {
bottom: 0; bottom: 0;
left: 50%; left: 50%;
margin-left: -@tooltipArrowWidth; margin-left: -@tooltip-arrow-width;
border-width: @tooltipArrowWidth @tooltipArrowWidth 0; border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltipArrowColor; border-top-color: @tooltip-arrow-color;
}
&.top-left .tooltip-arrow {
bottom: 0;
left: 5px;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
&.top-right .tooltip-arrow {
bottom: 0;
right: 5px;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
} }
&.right .tooltip-arrow { &.right .tooltip-arrow {
top: 50%; top: 50%;
left: 0; left: 0;
margin-top: -@tooltipArrowWidth; margin-top: -@tooltip-arrow-width;
border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0; border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
border-right-color: @tooltipArrowColor; border-right-color: @tooltip-arrow-color;
} }
&.left .tooltip-arrow { &.left .tooltip-arrow {
top: 50%; top: 50%;
right: 0; right: 0;
margin-top: -@tooltipArrowWidth; margin-top: -@tooltip-arrow-width;
border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth; border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
border-left-color: @tooltipArrowColor; border-left-color: @tooltip-arrow-color;
} }
&.bottom .tooltip-arrow { &.bottom .tooltip-arrow {
top: 0; top: 0;
left: 50%; left: 50%;
margin-left: -@tooltipArrowWidth; margin-left: -@tooltip-arrow-width;
border-width: 0 @tooltipArrowWidth @tooltipArrowWidth; border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltipArrowColor; border-bottom-color: @tooltip-arrow-color;
}
&.bottom-left .tooltip-arrow {
top: 0;
left: 5px;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
&.bottom-right .tooltip-arrow {
top: 0;
right: 5px;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
} }
} }
...@@ -7,13 +7,17 @@ ...@@ -7,13 +7,17 @@
// ------------------------- // -------------------------
p { p {
margin: 0 0 @baseLineHeight / 2; margin: 0 0 (@line-height-computed / 2);
} }
.lead { .lead {
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
font-size: @baseFontSize * 1.5; font-size: (@font-size-base * 1.15);
font-weight: 200; font-weight: 200;
line-height: @baseLineHeight * 1.5; line-height: 1.4;
@media (min-width: 768px) {
font-size: (@font-size-base * 1.5);
}
} }
...@@ -23,31 +27,18 @@ p { ...@@ -23,31 +27,18 @@ p {
// Ex: 14px base font * 85% = about 12px // Ex: 14px base font * 85% = about 12px
small { font-size: 85%; } small { font-size: 85%; }
strong { font-weight: bold; } // Undo browser default styling
em { font-style: italic; }
cite { font-style: normal; } cite { font-style: normal; }
// Utility classes // Contextual emphasis
.muted { color: @grayLight; } .text-muted { color: @text-muted; }
a.muted:hover, .text-primary { color: @brand-primary; }
a.muted:focus { color: darken(@grayLight, 10%); } .text-warning { color: @state-warning-text; }
.text-danger { color: @state-danger-text; }
.text-warning { color: @warningText; } .text-success { color: @state-success-text; }
a.text-warning:hover, .text-info { color: @state-info-text; }
a.text-warning:focus { color: darken(@warningText, 10%); }
.text-error { color: @errorText; }
a.text-error:hover,
a.text-error:focus { color: darken(@errorText, 10%); }
.text-info { color: @infoText; }
a.text-info:hover,
a.text-info:focus { color: darken(@infoText, 10%); }
.text-success { color: @successText; }
a.text-success:hover,
a.text-success:focus { color: darken(@successText, 10%); }
// Alignment
.text-left { text-align: left; } .text-left { text-align: left; }
.text-right { text-align: right; } .text-right { text-align: right; }
.text-center { text-align: center; } .text-center { text-align: center; }
...@@ -56,44 +47,51 @@ a.text-success:focus { color: darken(@successText, 10%); } ...@@ -56,44 +47,51 @@ a.text-success:focus { color: darken(@successText, 10%); }
// Headings // Headings
// ------------------------- // -------------------------
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6,
margin: (@baseLineHeight / 2) 0; .h1, .h2, .h3, .h4, .h5, .h6 {
font-family: @headingsFontFamily; font-family: @headings-font-family;
font-weight: @headingsFontWeight; font-weight: @headings-font-weight;
line-height: @baseLineHeight; line-height: @headings-line-height;
color: @headingsColor;
text-rendering: optimizelegibility; // Fix the character spacing for headings
small { small {
font-weight: normal; font-weight: normal;
line-height: 1; line-height: 1;
color: @grayLight; color: @headings-small-color;
} }
} }
h1, h1,
h2, h2,
h3 { line-height: @baseLineHeight * 2; } h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
}
h4,
h5,
h6 {
margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2);
}
h1 { font-size: @baseFontSize * 2.75; } // ~38px h1, .h1 { font-size: ceil(@font-size-base * 2.70); } // ~38px
h2 { font-size: @baseFontSize * 2.25; } // ~32px h2, .h2 { font-size: ceil(@font-size-base * 2.25); } // ~32px
h3 { font-size: @baseFontSize * 1.75; } // ~24px h3, .h3 { font-size: ceil(@font-size-base * 1.70); } // ~24px
h4 { font-size: @baseFontSize * 1.25; } // ~18px h4, .h4 { font-size: ceil(@font-size-base * 1.25); } // ~18px
h5 { font-size: @baseFontSize; } h5, .h5 { font-size: @font-size-base; }
h6 { font-size: @baseFontSize * 0.85; } // ~12px h6, .h6 { font-size: ceil(@font-size-base * 0.85); } // ~12px
h1 small { font-size: @baseFontSize * 1.75; } // ~24px h1 small, .h1 small { font-size: ceil(@font-size-base * 1.70); } // ~24px
h2 small { font-size: @baseFontSize * 1.25; } // ~18px h2 small, .h2 small { font-size: ceil(@font-size-base * 1.25); } // ~18px
h3 small { font-size: @baseFontSize; } h3 small, .h3 small,
h4 small { font-size: @baseFontSize; } h4 small, .h4 small { font-size: @font-size-base; }
// Page header // Page header
// ------------------------- // -------------------------
.page-header { .page-header {
padding-bottom: (@baseLineHeight / 2) - 1; padding-bottom: ((@line-height-computed / 2) - 1);
margin: @baseLineHeight 0 (@baseLineHeight * 1.5); margin: (@line-height-computed * 2) 0 @line-height-computed;
border-bottom: 1px solid @grayLighter; border-bottom: 1px solid @page-header-border-color;
} }
...@@ -102,35 +100,28 @@ h4 small { font-size: @baseFontSize; } ...@@ -102,35 +100,28 @@ h4 small { font-size: @baseFontSize; }
// -------------------------------------------------- // --------------------------------------------------
// Unordered and Ordered lists // Unordered and Ordered lists
ul, ol { ul,
padding: 0; ol {
margin: 0 0 @baseLineHeight / 2 25px; margin-top: 0;
} margin-bottom: (@line-height-computed / 2);
ul ul, ul,
ul ol, ol{
ol ol, margin-bottom: 0;
ol ul { }
margin-bottom: 0;
}
li {
line-height: @baseLineHeight;
} }
// Remove default list styles // List options
ul.unstyled,
ol.unstyled {
margin-left: 0;
list-style: none;
}
// Single-line list items // Unstyled keeps list items block level, just removes default browser padding and list-style
ul.inline, .list-unstyled {
ol.inline { padding-left: 0;
margin-left: 0;
list-style: none; list-style: none;
}
// Inline turns list items into inline-block
.list-inline {
.list-unstyled();
> li { > li {
display: inline-block; display: inline-block;
.ie7-inline-block();
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
...@@ -138,50 +129,42 @@ ol.inline { ...@@ -138,50 +129,42 @@ ol.inline {
// Description Lists // Description Lists
dl { dl {
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
} }
dt, dt,
dd { dd {
line-height: @baseLineHeight; line-height: @line-height-base;
} }
dt { dt {
font-weight: bold; font-weight: bold;
} }
dd { dd {
margin-left: @baseLineHeight / 2; margin-left: 0; // Undo browser default
} }
// Horizontal layout (like forms) // Horizontal layout (like forms)
.dl-horizontal { .dl-horizontal {
.clearfix(); // Ensure dl clears floats if empty dd elements present
dt { dt {
float: left; float: left;
width: @horizontalComponentOffset - 20; width: (@component-offset-horizontal - 20);
clear: left; clear: left;
text-align: right; text-align: right;
.text-overflow(); .text-overflow();
} }
dd { dd {
margin-left: @horizontalComponentOffset; .clearfix(); // Clear the floated `dt` if an empty `dd` is present
margin-left: @component-offset-horizontal;
} }
} }
// MISC // MISC
// ---- // ----
// Horizontal rules
hr {
margin: @baseLineHeight 0;
border: 0;
border-top: 1px solid @hrBorder;
border-bottom: 1px solid @white;
}
// Abbreviations and acronyms // Abbreviations and acronyms
abbr[title], abbr[title],
// Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257 // Added data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
abbr[data-original-title] { abbr[data-original-title] {
cursor: help; cursor: help;
border-bottom: 1px dotted @grayLight; border-bottom: 1px dotted @abbr-border-color;
} }
abbr.initialism { abbr.initialism {
font-size: 90%; font-size: 90%;
...@@ -190,21 +173,23 @@ abbr.initialism { ...@@ -190,21 +173,23 @@ abbr.initialism {
// Blockquotes // Blockquotes
blockquote { blockquote {
padding: 0 0 0 15px; padding: (@line-height-computed / 2) @line-height-computed;
margin: 0 0 @baseLineHeight; margin: 0 0 @line-height-computed;
border-left: 5px solid @grayLighter; border-left: 5px solid @blockquote-border-color;
p { p {
margin-bottom: 0; font-size: (@font-size-base * 1.25);
font-size: @baseFontSize * 1.25;
font-weight: 300; font-weight: 300;
line-height: 1.25; line-height: 1.25;
} }
p:last-child {
margin-bottom: 0;
}
small { small {
display: block; display: block;
line-height: @baseLineHeight; line-height: @line-height-base;
color: @grayLight; color: @blockquote-small-color;
&:before { &:before {
content: '\2014 \00A0'; content: '\2014 \00A0';// EM DASH, NBSP
} }
} }
...@@ -213,7 +198,7 @@ blockquote { ...@@ -213,7 +198,7 @@ blockquote {
float: right; float: right;
padding-right: 15px; padding-right: 15px;
padding-left: 0; padding-left: 0;
border-right: 5px solid @grayLighter; border-right: 5px solid @blockquote-border-color;
border-left: 0; border-left: 0;
p, p,
small { small {
...@@ -224,7 +209,7 @@ blockquote { ...@@ -224,7 +209,7 @@ blockquote {
content: ''; content: '';
} }
&:after { &:after {
content: '\00A0 \2014'; content: '\00A0 \2014';// NBSP, EM DASH
} }
} }
} }
...@@ -241,7 +226,7 @@ blockquote:after { ...@@ -241,7 +226,7 @@ blockquote:after {
// Addresses // Addresses
address { address {
display: block; display: block;
margin-bottom: @baseLineHeight; margin-bottom: @line-height-computed;
font-style: normal; font-style: normal;
line-height: @baseLineHeight; line-height: @line-height-base;
} }
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
// -------------------------------------------------- // --------------------------------------------------
// Quick floats // Floats
// -------------------------
.clearfix {
.clearfix();
}
.pull-right { .pull-right {
float: right; float: right;
} }
...@@ -11,20 +16,27 @@ ...@@ -11,20 +16,27 @@
float: left; float: left;
} }
// Toggling content // Toggling content
// -------------------------
.hide { .hide {
display: none; display: none !important;
} }
.show { .show {
display: block; display: block !important;
} }
// Visibility
.invisible { .invisible {
visibility: hidden; visibility: hidden;
} }
.text-hide {
.hide-text();
}
// For Affix plugin // For Affix plugin
// -------------------------
.affix { .affix {
position: fixed; position: fixed;
} }
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
min-height: 20px; min-height: 20px;
padding: 19px; padding: 19px;
margin-bottom: 20px; margin-bottom: 20px;
background-color: @wellBackground; background-color: @well-bg;
border: 1px solid darken(@wellBackground, 7%); border: 1px solid darken(@well-bg, 7%);
.border-radius(@baseBorderRadius); border-radius: @border-radius-base;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
blockquote { blockquote {
border-color: #ddd; border-color: #ddd;
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
// Sizes // Sizes
.well-large { .well-large {
padding: 24px; padding: 24px;
.border-radius(@borderRadiusLarge); border-radius: @border-radius-large;
} }
.well-small { .well-small {
padding: 9px; padding: 9px;
.border-radius(@borderRadiusSmall); border-radius: @border-radius-small;
} }
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#id_title {font-size: 20px; height: 30px; padding: 6px; width: 98%;} #id_title {font-size: 20px; height: 30px; padding: 6px; width: 98%;}
#id_summary {width: 98%; padding: 6px;} #id_summary {width: 98%; padding: 6px;}
h1#article-title {font-size: 2em; margin-top: -5px;} h1#article-title {font-size: 2.5em; margin-top: 0px;}
#article_edit_form label {max-width: 100px;} #article_edit_form label {max-width: 100px;}
#article_edit_form .controls {margin-left: 120px;} #article_edit_form .controls {margin-left: 120px;}
...@@ -46,15 +46,18 @@ h1#article-title {font-size: 2em; margin-top: -5px;} ...@@ -46,15 +46,18 @@ h1#article-title {font-size: 2em; margin-top: -5px;}
.wiki-article div.toc, .wiki-article div.toc,
.wiki-article div.article-list { .wiki-article div.article-list {
.well;
.well-small;
max-width: 340px; max-width: 340px;
clear: left; clear: left;
} }
.wiki-article div.toc ul,
.wiki-article div.article-list ul {
.dropdown-menu
}
.wiki-article div.toc .toctitle .wiki-article div.toc .toctitle
{ {
.nav-header; .dropdown-header;
} }
.wiki-article a.linknotfound {color: #C87;} .wiki-article a.linknotfound {color: #C87;}
...@@ -82,13 +85,13 @@ h1#article-title {font-size: 2em; margin-top: -5px;} ...@@ -82,13 +85,13 @@ h1#article-title {font-size: 2em; margin-top: -5px;}
.wiki-article h1 .wiki-article h1
{ {
font-size: @baseFontSize * 2; font-size: @font-size-base * 2;
.page-header; .page-header;
} }
.wiki-article h2 .wiki-article h2
{ {
font-size: @baseFontSize * 1.75; font-size: @font-size-base * 1.75;
.page-header; .page-header;
margin-bottom: 20px; margin-bottom: 20px;
padding-bottom: 0px; padding-bottom: 0px;
...@@ -96,26 +99,26 @@ h1#article-title {font-size: 2em; margin-top: -5px;} ...@@ -96,26 +99,26 @@ h1#article-title {font-size: 2em; margin-top: -5px;}
.wiki-article h3 .wiki-article h3
{ {
font-size: @baseFontSize * 1.50; font-size: @font-size-base * 1.50;
margin: 15px 0 10px; margin: 15px 0 10px;
line-height: 30px; line-height: 30px;
} }
.wiki-article h4 .wiki-article h4
{ {
font-size: @baseFontSize * 1.25; font-size: @font-size-base * 1.25;
} }
.wiki-article h5, .wiki-article h5,
.wiki-article h6 .wiki-article h6
{ {
font-size: @baseFontSize; font-size: @font-size-base;
} }
.wiki-article blockquote p, .wiki-article blockquote p,
.wiki-article blockquote .wiki-article blockquote
{ {
font-size: @baseFontSize; font-size: @font-size-base;
} }
...@@ -142,11 +145,11 @@ input[type=file] {float: none; width: auto;} ...@@ -142,11 +145,11 @@ input[type=file] {float: none; width: auto;}
} }
.breadcrumb .icon-bar:first-child{margin-top: 0;} .breadcrumb .icon-bar:first-child{margin-top: 0;}
#navbar_wiki_search input.search-query {width: 80px;}
#article-menu #article-menu
{ {
border-bottom: 1px solid #EEE; border-bottom: 1px solid #EEE;
padding-bottom: 0px;
margin-bottom: 20px;
} }
#article-container #article-container
...@@ -197,4 +200,68 @@ input[type=file] {float: none; width: auto;} ...@@ -197,4 +200,68 @@ input[type=file] {float: none; width: auto;}
} }
} }
/******************************
BOOTSTRAP 2 COMPAT
*******************************/
.wiki-control input,
.wiki-control select,
.wiki-control textarea,
{
.form-control;
width: 280px;
display: inline-block;
}
.form-actions {
padding: 19px 15px 20px;
padding-left: 0;
margin-top: 20px;
margin-bottom: 20px;
background-color: rgb(245, 245, 245);
border-top: 1px solid rgb(229, 229, 229);
}
// Assuming it's a nested icon
.accordion-heading .icon
{
color: #444;
font-size: 75%;
}
/******************************
RESPONSIVE STUFF
*******************************/
@media (min-width: 980px) {
.wiki-modal
{
width: 80%;
margin-left: -40%;
}
}
@media (max-width: 979px) {
.wiki-modal
{
width: 90%;
margin-left: -45%;
}
}
@media (max-width: 767px) {
.wiki-modal
{
width: 90%;
margin-left: 0;
}
}
@media screen and (min-width: @grid-float-breakpoint) {
.pull-right-block-on-responsive {
.pull-right;
}
}
/******************************
ICONS
*******************************/
@import "../../../font-awesome/less/font-awesome.less";
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/* BOOTSTRAP SPECIFIC CLASSES
* -------------------------- */
/* Bootstrap 2.0 sprites.less reset */
[class^="icon-"],
[class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: none;
background-position: 0% 0%;
background-repeat: repeat;
margin-top: 0;
}
/* more sprites.less reset */
.icon-white,
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"],
.dropdown-submenu:hover > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"] {
background-image: none;
}
/* keeps Bootstrap styles with and without icons the same */
.btn, .nav {
[class^="icon-"],
[class*=" icon-"] {
// display: inline;
&.icon-large { line-height: .9em; }
&.icon-spin { display: inline-block; }
}
}
.nav-tabs, .nav-pills {
[class^="icon-"],
[class*=" icon-"] {
&, &.icon-large { line-height: .9em; }
}
}
.btn {
[class^="icon-"],
[class*=" icon-"] {
&.pull-left, &.pull-right {
&.icon-2x { margin-top: .18em; }
}
&.icon-spin.icon-large { line-height: .8em; }
}
}
.btn.btn-small {
[class^="icon-"],
[class*=" icon-"] {
&.pull-left, &.pull-right {
&.icon-2x { margin-top: .25em; }
}
}
}
.btn.btn-large {
[class^="icon-"],
[class*=" icon-"] {
margin-top: 0; // overrides bootstrap default
&.pull-left, &.pull-right {
&.icon-2x { margin-top: .05em; }
}
&.pull-left.icon-2x { margin-right: .2em; }
&.pull-right.icon-2x { margin-left: .2em; }
}
}
/* Fixes alignment in nav lists */
.nav-list [class^="icon-"],
.nav-list [class*=" icon-"] {
line-height: inherit;
}
/* FONT AWESOME CORE
* -------------------------- */
[class^="icon-"],
[class*=" icon-"] {
.icon-FontAwesome();
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
text-decoration: inherit;
display: inline-block;
speak: none;
}
/* makes the font 33% larger relative to the icon container */
.icon-large:before {
vertical-align: -10%;
font-size: 4/3em;
}
/* makes sure icons active on rollover in links */
a {
[class^="icon-"],
[class*=" icon-"] {
display: inline;
}
}
/* increased font size for icon-large */
[class^="icon-"],
[class*=" icon-"] {
&.icon-fixed-width {
display: inline-block;
width: 16/14em;
text-align: right;
padding-right: 4/14em;
&.icon-large {
width: 20/14em;
}
}
}
.icons-ul {
margin-left: @icons-li-width;
list-style-type: none;
> li { position: relative; }
.icon-li {
position: absolute;
left: -@icons-li-width;
width: @icons-li-width;
text-align: center;
line-height: inherit;
}
}
// allows usage of the hide class directly on font awesome icons
[class^="icon-"],
[class*=" icon-"] {
&.hide {
display: none;
}
}
.icon-muted { color: @iconMuted; }
.icon-light { color: @iconLight; }
.icon-dark { color: @iconDark; }
// Icon Borders
// -------------------------
.icon-border {
border: solid 1px @borderColor;
padding: .2em .25em .15em;
.border-radius(3px);
}
// Icon Sizes
// -------------------------
.icon-2x {
font-size: 2em;
&.icon-border {
border-width: 2px;
.border-radius(4px);
}
}
.icon-3x {
font-size: 3em;
&.icon-border {
border-width: 3px;
.border-radius(5px);
}
}
.icon-4x {
font-size: 4em;
&.icon-border {
border-width: 4px;
.border-radius(6px);
}
}
.icon-5x {
font-size: 5em;
&.icon-border {
border-width: 5px;
.border-radius(7px);
}
}
// Floats & Margins
// -------------------------
// Quick floats
.pull-right { float: right; }
.pull-left { float: left; }
[class^="icon-"],
[class*=" icon-"] {
&.pull-left {
margin-right: .3em;
}
&.pull-right {
margin-left: .3em;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment