Skip to content

Commit

Permalink
Update Bootstrap to v4 stable & Bump version to 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikborsadiya committed Jan 19, 2018
1 parent ad84ce5 commit 2d9703f
Show file tree
Hide file tree
Showing 25 changed files with 615 additions and 535 deletions.
737 changes: 407 additions & 330 deletions docs/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vali-admin",
"version": "2.1.0",
"version": "2.2.0",
"description": "An admin theme built with Bootstrap, sass and PugJs",
"devDependencies": {
"autoprefixer": "^7.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/sass/1-tools/bootstrap-source/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@

@each $color, $value in $theme-colors {
.alert-#{$color} {
@include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6));
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
}
}
11 changes: 4 additions & 7 deletions src/sass/1-tools/bootstrap-source/_bootstrap-grid.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Bootstrap Grid v4.0.0-beta.3 (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
* Bootstrap Grid v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

Expand All @@ -23,13 +23,10 @@ html {
@import "functions";
@import "variables";

//
// Grid mixins
//

@import "mixins/breakpoints";
@import "mixins/grid-framework";
@import "mixins/grid";

@import "grid";
@import "utilities/display";
@import "utilities/flex";
6 changes: 3 additions & 3 deletions src/sass/1-tools/bootstrap-source/_bootstrap-reboot.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Bootstrap Reboot v4.0.0-beta.3 (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Bootstrap v4.0.0-beta.3 (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
* Bootstrap v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

Expand Down
14 changes: 5 additions & 9 deletions src/sass/1-tools/bootstrap-source/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
}

// Opinionated: add "hand" cursor to non-disabled .btn elements
&:not([disabled]):not(.disabled) {
&:not(:disabled):not(.disabled) {
cursor: pointer;
}

&:not([disabled]):not(.disabled):active,
&:not([disabled]):not(.disabled).active {
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active {
background-image: none;
@include box-shadow($btn-active-box-shadow);

Expand All @@ -51,7 +51,7 @@

// Future-proof disabling of clicks on `<a>` elements
a.btn.disabled,
fieldset[disabled] a.btn {
fieldset:disabled a.btn {
pointer-events: none;
}

Expand All @@ -68,11 +68,7 @@ fieldset[disabled] a.btn {

@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@if $color == "light" {
@include button-outline-variant($value, $gray-900);
} @else {
@include button-outline-variant($value, $white);
}
@include button-outline-variant($value);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sass/1-tools/bootstrap-source/_close.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

// Opinionated: add "hand" cursor to non-disabled .close elements
&:not([disabled]):not(.disabled) {
&:not(:disabled):not(.disabled) {
cursor: pointer;
}
}
Expand Down
17 changes: 16 additions & 1 deletion src/sass/1-tools/bootstrap-source/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@
background-image: $custom-checkbox-indicator-icon-indeterminate;
}
}

.custom-control-input:disabled {
&:checked ~ .custom-control-label::before {
background-color: $custom-control-indicator-checked-disabled-bg;
}
&:indeterminate ~ .custom-control-label::before {
background-color: $custom-control-indicator-checked-disabled-bg;
}
}
}

// Radios
Expand All @@ -136,6 +145,12 @@
background-image: $custom-radio-indicator-icon-checked;
}
}

.custom-control-input:disabled {
&:checked ~ .custom-control-label::before {
background-color: $custom-control-indicator-checked-disabled-bg;
}
}
}


Expand All @@ -148,7 +163,7 @@
.custom-select {
display: inline-block;
width: 100%;
height: $input-height;
height: $custom-select-height;
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
line-height: $custom-select-line-height;
color: $custom-select-color;
Expand Down
27 changes: 15 additions & 12 deletions src/sass/1-tools/bootstrap-source/_input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
align-items: stretch;
width: 100%;

.form-control,
.custom-select,
.custom-file {
> .form-control,
> .custom-select,
> .custom-file {
position: relative; // For focus state's z-index
flex: 1 1 auto;
// Add width 1% and flex-basis auto to ensure that button will not wrap out
Expand All @@ -26,27 +26,29 @@
z-index: 3;
}

+ .form-control {
+ .form-control,
+ .custom-select,
+ .custom-file {
margin-left: -$input-border-width;
}
}

.form-control,
.custom-select {
> .form-control,
> .custom-select {
&:not(:last-child) { @include border-right-radius(0); }
&:not(:first-child) { @include border-left-radius(0); }
}

// Custom file inputs have more complex markup, thus requiring different
// border-radius overrides.
.custom-file {
> .custom-file {
display: flex;
align-items: center;

&:not(:last-child) .custom-file-control,
&:not(:last-child) .custom-file-control::before { @include border-right-radius(0); }
&:not(:first-child) .custom-file-control,
&:not(:first-child) .custom-file-control::before { @include border-left-radius(0); }
&:not(:last-child) .custom-file-label,
&:not(:last-child) .custom-file-label::before { @include border-right-radius(0); }
&:not(:first-child) .custom-file-label,
&:not(:first-child) .custom-file-label::before { @include border-left-radius(0); }
}
}

Expand All @@ -60,7 +62,6 @@
.input-group-prepend,
.input-group-append {
display: flex;
align-items: center;

// Ensure buttons are always above inputs for more visually pleasing borders.
// This isn't needed for `.input-group-text` since it shares the same border-color
Expand Down Expand Up @@ -88,6 +89,8 @@
// to prepend or append to an input.

.input-group-text {
display: flex;
align-items: center;
padding: $input-padding-y $input-padding-x;
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
font-size: $font-size-base; // Match inputs
Expand Down
6 changes: 3 additions & 3 deletions src/sass/1-tools/bootstrap-source/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
}

// Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
&:not([disabled]):not(.disabled) {
&:not(:disabled):not(.disabled) {
cursor: pointer;
}
}
Expand Down Expand Up @@ -168,8 +168,8 @@
}

.nav-link {
padding-right: .5rem;
padding-left: .5rem;
padding-right: $navbar-nav-link-padding-x;
padding-left: $navbar-nav-link-padding-x;
}
}

Expand Down
9 changes: 7 additions & 2 deletions src/sass/1-tools/bootstrap-source/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@
background-color: $pagination-bg;
border: $pagination-border-width solid $pagination-border-color;

@include hover-focus {
&:hover {
color: $pagination-hover-color;
text-decoration: none;
background-color: $pagination-hover-bg;
border-color: $pagination-hover-border-color;
}

&:focus {
z-index: 2;
outline: 0;
box-shadow: $pagination-focus-box-shadow;
}

// Opinionated: add "hand" cursor to non-disabled .page-link elements
&:not([disabled]):not(.disabled) {
&:not(:disabled):not(.disabled) {
cursor: pointer;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/sass/1-tools/bootstrap-source/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text();
font-size: $font-size-sm;
font-size: $popover-font-size;
// Allow breaking very long words so they don't overflow the popover's bounds
word-wrap: break-word;
background-color: $popover-bg;
background-clip: padding-box;
border: $popover-border-width solid $popover-border-color;
@include border-radius($border-radius-lg);
@include border-radius($popover-border-radius);
@include box-shadow($popover-box-shadow);

.arrow {
Expand Down
20 changes: 17 additions & 3 deletions src/sass/1-tools/bootstrap-source/_print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
box-shadow: none !important;
}

a,
a:visited {
text-decoration: underline;
a {
&:not(.btn) {
text-decoration: underline;
}
}

// Bootstrap specific; comment the following selector out
Expand Down Expand Up @@ -82,6 +83,19 @@

// Bootstrap specific changes start

// Specify a size and min-width to make printing closer across browsers.
// We don't set margin here because it breaks `size` in Chrome. We also
// don't use `!important` on `size` as it breaks in Chrome.
@page {
size: $print-page-size;
}
body {
min-width: $print-body-min-width !important;
}
.container {
min-width: $print-body-min-width !important;
}

// Bootstrap components
.navbar {
display: none;
Expand Down
23 changes: 0 additions & 23 deletions src/sass/1-tools/bootstrap-source/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -279,29 +279,6 @@ svg:not(:root) {
}


// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
//
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
// However, they DO support removing the click delay via `touch-action: manipulation`.
// See:
// * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
// * https://caniuse.com/#feat=css-touch-action
// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay

a,
area,
button,
[role="button"],
input:not([type="range"]),
label,
select,
summary,
textarea {
touch-action: manipulation;
}


//
// Tables
//
Expand Down
4 changes: 2 additions & 2 deletions src/sass/1-tools/bootstrap-source/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text();
font-size: $font-size-sm;
font-size: $tooltip-font-size;
// Allow breaking very long words so they don't overflow the tooltip's bounds
word-wrap: break-word;
opacity: 0;
Expand Down Expand Up @@ -111,5 +111,5 @@
color: $tooltip-color;
text-align: center;
background-color: $tooltip-bg;
@include border-radius($border-radius);
@include border-radius($tooltip-border-radius);
}
Loading

0 comments on commit 2d9703f

Please sign in to comment.