Skip to content

Commit

Permalink
Merge pull request elastic#7567 from cjcenizal/refactor/remove-bootst…
Browse files Browse the repository at this point in the history
…rap-dependency

Remove bootstrap dependency.

Former-commit-id: 2cf2218
  • Loading branch information
cjcenizal authored Jul 5, 2016
2 parents 92253c0 + 3963798 commit 7b7bfc1
Show file tree
Hide file tree
Showing 83 changed files with 8,647 additions and 53 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
"babel-runtime": "5.8.38",
"bluebird": "2.9.34",
"boom": "2.8.0",
"bootstrap": "3.3.6",
"brace": "0.5.1",
"bunyan": "1.7.1",
"clipboard": "1.5.5",
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/public/visualize/styles/main.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import (reference) "~ui/styles/variables";
@import (reference) "~bootstrap/less/list-group";
@import (reference) "~ui/styles/bootstrap/list-group";
@import (reference) "~ui/styles/list-group-menu";

.vis-wizard {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/styles/base.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// generic mixins
@import (reference) "./mixins";
@import (reference) "./variables";
@import (reference) "~bootstrap/less/bootstrap";
@import (reference) "~ui/styles/bootstrap/bootstrap";

html,
body {
Expand Down
73 changes: 73 additions & 0 deletions src/ui/public/styles/bootstrap/alerts.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// Alerts
// --------------------------------------------------


// Base styles
// -------------------------

.alert {
padding: @alert-padding;
margin-bottom: @line-height-computed;
border: 1px solid transparent;
border-radius: @alert-border-radius;

// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing @headings-color
color: inherit;
}

// Provide class for links that match alerts
.alert-link {
font-weight: @alert-link-font-weight;
}

// Improve alignment and spacing of inner content
> p,
> ul {
margin-bottom: 0;
}

> p + p {
margin-top: 5px;
}
}

// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.

.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissible {
padding-right: (@alert-padding + 20);

// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
}

// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.

.alert-success {
.alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
}

.alert-info {
.alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
}

.alert-warning {
.alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
}

.alert-danger {
.alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
}
66 changes: 66 additions & 0 deletions src/ui/public/styles/bootstrap/badges.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
//
// Badges
// --------------------------------------------------


// Base class
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: @font-size-small;
font-weight: @badge-font-weight;
color: @badge-color;
line-height: @badge-line-height;
vertical-align: middle;
white-space: nowrap;
text-align: center;
background-color: @badge-bg;
border-radius: @badge-border-radius;

// Empty badges collapse automatically (not available in IE8)
&:empty {
display: none;
}

// Quick fix for badges in buttons
.btn & {
position: relative;
top: -1px;
}

.btn-xs &,
.btn-group-xs > .btn & {
top: 0;
padding: 1px 5px;
}

// Hover state, but only for links
a& {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}

// Account for badges in navs
.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}

.list-group-item > & {
float: right;
}

.list-group-item > & + & {
margin-right: 5px;
}

.nav-pills > li > a > & {
margin-left: 3px;
}
}
56 changes: 56 additions & 0 deletions src/ui/public/styles/bootstrap/bootstrap.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

// Core variables and mixins
@import "variables.less";
@import "mixins.less";

// Reset and dependencies
@import "normalize.less";
@import "print.less";
@import "glyphicons.less";

// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "tables.less";
@import "forms.less";
@import "buttons.less";

// Components
@import "component-animations.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";
@import "labels.less";
@import "badges.less";
@import "jumbotron.less";
@import "thumbnails.less";
@import "alerts.less";
@import "progress-bars.less";
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";

// Components w/ JavaScript
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
@import "carousel.less";

// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";
26 changes: 26 additions & 0 deletions src/ui/public/styles/bootstrap/breadcrumbs.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Breadcrumbs
// --------------------------------------------------


.breadcrumb {
padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
margin-bottom: @line-height-computed;
list-style: none;
background-color: @breadcrumb-bg;
border-radius: @border-radius-base;

> li {
display: inline-block;

+ li:before {
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
padding: 0 5px;
color: @breadcrumb-color;
}
}

> .active {
color: @breadcrumb-active-color;
}
}
Loading

0 comments on commit 7b7bfc1

Please sign in to comment.