Skip to content

Commit

Permalink
remove some custom css
Browse files Browse the repository at this point in the history
mainly in navbars, where we were doing custom
things that bootstrap already did with classes.

This did require the removal of multiple class LESS inheritance for
navbar buttons, because it doesn't work properly. Seems like a LESS bug, but I'm not sure.
  • Loading branch information
minrk committed Dec 7, 2014
1 parent a84f353 commit 0b46e2a
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 318 deletions.
5 changes: 4 additions & 1 deletion IPython/html/static/base/js/notificationwidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ define([
* @method style
*/
NotificationWidget.prototype.style = function () {
this.element.addClass('notification_widget');
// use explicit bootstrap classes here,
// because multiple inheritance in LESS doesn't work
// for this particular combination
this.element.addClass('notification_widget btn btn-xs navbar-btn');
};

/**
Expand Down
18 changes: 5 additions & 13 deletions IPython/html/static/base/less/page.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ body {
div#header {
/* Initially hidden to prevent FLOUC */
display: none;
margin-bottom: -6px;
position: fixed;
top: 0;
width: 100%;
background-color: @body-bg;
min-height: 31px;

/* Display over codemirror */
z-index: 100;

#header-container {
margin-bottom: 0px;
padding-left: 30px;
padding-bottom: 5px;
padding-top: 5px;
.border-box-sizing();
}

Expand All @@ -51,6 +46,8 @@ div#header {

#ipython_notebook {
padding-left: 0px;
padding-top: (@navbar-height - @logo_height) / 2;
padding-bottom: (@navbar-height - @logo_height) / 2;
}

#noscript {
Expand All @@ -65,8 +62,8 @@ div#header {

#ipython_notebook img {
font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
height: 24px;
text-decoration:none;
height: @logo_height;
text-decoration: none;
color: black;
}

Expand All @@ -85,9 +82,6 @@ div#header {
input.ui-button {
padding: 0.3em 0.9em;
}
.navbar span {
margin-top: 3px;
}

span#login_widget {
float: right;
Expand All @@ -96,9 +90,7 @@ span#login_widget {
span#login_widget > .button,
#logout
{
.btn();
.btn-default();
.btn-sm();
}

.nav-header {
Expand Down
3 changes: 2 additions & 1 deletion IPython/html/static/base/less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
@text-color: @black;
@font-size-base: 13px;
@font-family-monospace: monospace; // to allow user to customize their fonts
@navbar-height: 36px;
@navbar-height: 30px;
@breadcrumb-color: darken(@border_color, 30%);
@blockquote-font-size: inherit;
@modal-inner-padding: 15px;
@grid-float-breakpoint: 540px;
@logo_height: 24px;

// Disable modal slide-in from top animation.
.modal {
Expand Down
4 changes: 1 addition & 3 deletions IPython/html/static/notebook/less/kernelselector.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#kernel_selector_widget {
margin-right: 1em;
float:right;
float: right;

& > button {
.btn();
.btn-default();
.btn-sm();

& > span.caret {
margin-top:0px;
Expand Down
22 changes: 1 addition & 21 deletions IPython/html/static/notebook/less/menubar.less
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#menubar {
margin-top: 0px;
margin-bottom: -24px;
position: relative;
.border-box-sizing();

.navbar {
border-top: 1px;
border-radius: 0px 0px @border-radius-base @border-radius-base;
margin-bottom: 23px;
margin-bottom: 6px;
}

.navbar-toggle {
Expand All @@ -17,19 +14,6 @@
clear: left;
}

li.dropdown {
line-height: 12px;

a {
padding-top: 6px;
padding-bottom: 5px;
}
}

ul.navbar-right {
padding-top: 2px;
margin-bottom: 0px;
}
}

.nav-wrapper {
Expand All @@ -49,10 +33,6 @@ ul#help_menu li a{
}
}

#menus {
min-height: 30px;
}

// Make sub menus work in BS3.
// Credit: http://www.bootply.com/86684
.dropdown-submenu{position:relative;}
Expand Down
9 changes: 2 additions & 7 deletions IPython/html/static/notebook/less/notificationarea.less
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#notification_area {
.pull-right();

z-index: 10;
}

.indicator_area {
color: @navbar-default-link-color;
padding: 4px 3px;
margin: 0px;
margin-left: 5px;
margin-right: 5px;
width: 11px;
z-index: 10;
text-align: center;
Expand All @@ -16,15 +15,11 @@
#kernel_indicator {
.pull-right();
.indicator_area();

margin-right: 12px;
}

#modal_indicator {
.pull-right();
.indicator_area();

margin-right: 5px;
}

.edit_mode_icon:before {
Expand Down
11 changes: 0 additions & 11 deletions IPython/html/static/notebook/less/notificationwidget.less
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
.notification_widget {
color: @navbar-default-link-color;
padding: 1px 12px;
margin: 2px 4px;
z-index: 10;
border-radius: @border-radius-base;
background: @notification_widget_bg;
.pull-right();
.border-box-sizing();
.btn();
.btn-default();
.btn-xs();

&.span {
padding-right:2px;
}
}

.notification_widget.warning {
Expand Down
3 changes: 1 addition & 2 deletions IPython/html/static/notebook/less/savewidget.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
span#save_widget {
padding: 0px 5px;
margin-top: 12px;
margin-top: 6px;
}

span#checkpoint_status, span#autosave_status {
Expand Down
16 changes: 8 additions & 8 deletions IPython/html/static/style/ipython.min.css

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

Loading

0 comments on commit 0b46e2a

Please sign in to comment.