Merge branch 'master' into comment-fix

This commit is contained in:
Holger 2017-10-23 12:19:46 +02:00 committed by GitHub
commit e4718aeac0
78 changed files with 11299 additions and 4540 deletions

File diff suppressed because it is too large Load Diff

2
css/theme.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<?php get_sidebar( 'left' ); ?> <?php get_sidebar( 'left' ); ?>
<?php endif; ?> <?php endif; ?>
<?php { <?php
$html = ''; $html = '';
if ( 'right' === $sidebar_pos || 'left' === $sidebar_pos ) { if ( 'right' === $sidebar_pos || 'left' === $sidebar_pos ) {
$html = '<div class="'; $html = '<div class="';
@ -36,4 +36,4 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
} else { } else {
echo '<div class="col-md-12 content-area" id="primary">'; echo '<div class="col-md-12 content-area" id="primary">';
} }
}

View File

@ -228,6 +228,10 @@ gulp.task('copy-assets', ['clean-source'], function() {
////////////////// All Bootstrap 4 Assets ///////////////////////// ////////////////// All Bootstrap 4 Assets /////////////////////////
// Copy all Bootstrap JS files // Copy all Bootstrap JS files
var stream = gulp.src(basePaths.node + 'bootstrap/dist/umd/popper.min.js')
.pipe(gulp.dest(basePaths + '/js'));
var stream = gulp.src(basePaths.node + 'bootstrap/dist/js/**/*.js') var stream = gulp.src(basePaths.node + 'bootstrap/dist/js/**/*.js')
.pipe(gulp.dest(basePaths.dev + '/js/bootstrap4')); .pipe(gulp.dest(basePaths.dev + '/js/bootstrap4'));

View File

@ -1,6 +1,6 @@
/**! /**!
* @fileOverview Kickass library to create and place poppers near their reference elements. * @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.12.2 * @version 1.12.6
* @license * @license
* Copyright (c) 2016 Federico Zivolo and contributors * Copyright (c) 2016 Federico Zivolo and contributors
* *
@ -28,22 +28,7 @@
(global.Popper = factory()); (global.Popper = factory());
}(this, (function () { 'use strict'; }(this, (function () { 'use strict';
var nativeHints = ['native code', '[object MutationObserverConstructor]']; var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
/**
* Determine if a function is implemented natively (as opposed to a polyfill).
* @method
* @memberof Popper.Utils
* @argument {Function | undefined} fn the function to check
* @returns {Boolean}
*/
var isNative = (function (fn) {
return nativeHints.some(function (hint) {
return (fn || '').toString().indexOf(hint) > -1;
});
});
var isBrowser = typeof window !== 'undefined';
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
var timeoutDuration = 0; var timeoutDuration = 0;
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
@ -54,26 +39,16 @@ for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
} }
function microtaskDebounce(fn) { function microtaskDebounce(fn) {
var scheduled = false; var called = false;
var i = 0;
var elem = document.createElement('span');
// MutationObserver provides a mechanism for scheduling microtasks, which
// are scheduled *before* the next task. This gives us a way to debounce
// a function but ensure it's called *before* the next paint.
var observer = new MutationObserver(function () {
fn();
scheduled = false;
});
observer.observe(elem, { attributes: true });
return function () { return function () {
if (!scheduled) { if (called) {
scheduled = true; return;
elem.setAttribute('x-index', i);
i = i + 1; // don't use compund (+=) because it doesn't get optimized in V8
} }
called = true;
Promise.resolve().then(function () {
called = false;
fn();
});
}; };
} }
@ -90,11 +65,7 @@ function taskDebounce(fn) {
}; };
} }
// It's common for MutationObserver polyfills to be seen in the wild, however var supportsMicroTasks = isBrowser && window.Promise;
// these rely on Mutation Events which only occur when an element is connected
// to the DOM. The algorithm used in this module does not use a connected element,
// and so we must ensure that a *native* MutationObserver is available.
var supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
/** /**
* Create a debounced version of a method, that's asynchronously deferred * Create a debounced version of a method, that's asynchronously deferred
@ -105,7 +76,7 @@ var supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserv
* @argument {Function} fn * @argument {Function} fn
* @returns {Function} * @returns {Function}
*/ */
var debounce = supportsNativeMutationObserver ? microtaskDebounce : taskDebounce; var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
/** /**
* Check if the given variable is a function * Check if the given variable is a function
@ -158,10 +129,18 @@ function getParentNode(element) {
*/ */
function getScrollParent(element) { function getScrollParent(element) {
// Return body, `getScroll` will take care to get the correct `scrollTop` from it // Return body, `getScroll` will take care to get the correct `scrollTop` from it
if (!element || ['HTML', 'BODY', '#document'].indexOf(element.nodeName) !== -1) { if (!element) {
return window.document.body; return window.document.body;
} }
switch (element.nodeName) {
case 'HTML':
case 'BODY':
return element.ownerDocument.body;
case '#document':
return element.body;
}
// Firefox want us to check `-x` and `-y` variations as well // Firefox want us to check `-x` and `-y` variations as well
var _getStyleComputedProp = getStyleComputedProperty(element), var _getStyleComputedProp = getStyleComputedProperty(element),
@ -189,6 +168,10 @@ function getOffsetParent(element) {
var nodeName = offsetParent && offsetParent.nodeName; var nodeName = offsetParent && offsetParent.nodeName;
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
if (element) {
return element.ownerDocument.documentElement;
}
return window.document.documentElement; return window.document.documentElement;
} }
@ -284,8 +267,8 @@ function getScroll(element) {
var nodeName = element.nodeName; var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') { if (nodeName === 'BODY' || nodeName === 'HTML') {
var html = window.document.documentElement; var html = element.ownerDocument.documentElement;
var scrollingElement = window.document.scrollingElement || html; var scrollingElement = element.ownerDocument.scrollingElement || html;
return scrollingElement[upperSide]; return scrollingElement[upperSide];
} }
@ -347,7 +330,7 @@ var isIE10$1 = function () {
}; };
function getSize(axis, body, html, computedStyle) { function getSize(axis, body, html, computedStyle) {
return Math.max(body['offset' + axis], html['client' + axis], html['offset' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
} }
function getWindowSizes() { function getWindowSizes() {
@ -534,7 +517,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
} }
function getViewportOffsetRectRelativeToArtbitraryNode(element) { function getViewportOffsetRectRelativeToArtbitraryNode(element) {
var html = window.document.documentElement; var html = element.ownerDocument.documentElement;
var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
var width = Math.max(html.clientWidth, window.innerWidth || 0); var width = Math.max(html.clientWidth, window.innerWidth || 0);
var height = Math.max(html.clientHeight, window.innerHeight || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0);
@ -595,10 +578,10 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
if (boundariesElement === 'scrollParent') { if (boundariesElement === 'scrollParent') {
boundariesNode = getScrollParent(getParentNode(popper)); boundariesNode = getScrollParent(getParentNode(popper));
if (boundariesNode.nodeName === 'BODY') { if (boundariesNode.nodeName === 'BODY') {
boundariesNode = window.document.documentElement; boundariesNode = popper.ownerDocument.documentElement;
} }
} else if (boundariesElement === 'window') { } else if (boundariesElement === 'window') {
boundariesNode = window.document.documentElement; boundariesNode = popper.ownerDocument.documentElement;
} else { } else {
boundariesNode = boundariesElement; boundariesNode = boundariesElement;
} }
@ -839,10 +822,11 @@ function runModifiers(modifiers, data, ends) {
var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
modifiersToRun.forEach(function (modifier) { modifiersToRun.forEach(function (modifier) {
if (modifier.function) { if (modifier['function']) {
// eslint-disable-line dot-notation
console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
} }
var fn = modifier.function || modifier.fn; var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
if (modifier.enabled && isFunction(fn)) { if (modifier.enabled && isFunction(fn)) {
// Add properties to offsets to make them a complete clientRect object // Add properties to offsets to make them a complete clientRect object
// we do this before each modifier to make sure the previous one doesn't // we do this before each modifier to make sure the previous one doesn't
@ -969,9 +953,19 @@ function destroy() {
return this; return this;
} }
/**
* Get the window associated with the element
* @argument {Element} element
* @returns {Window}
*/
function getWindow(element) {
var ownerDocument = element.ownerDocument;
return ownerDocument ? ownerDocument.defaultView : window;
}
function attachToScrollParents(scrollParent, event, callback, scrollParents) { function attachToScrollParents(scrollParent, event, callback, scrollParents) {
var isBody = scrollParent.nodeName === 'BODY'; var isBody = scrollParent.nodeName === 'BODY';
var target = isBody ? window : scrollParent; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
target.addEventListener(event, callback, { passive: true }); target.addEventListener(event, callback, { passive: true });
if (!isBody) { if (!isBody) {
@ -989,7 +983,7 @@ function attachToScrollParents(scrollParent, event, callback, scrollParents) {
function setupEventListeners(reference, options, state, updateBound) { function setupEventListeners(reference, options, state, updateBound) {
// Resize event listener on window // Resize event listener on window
state.updateBound = updateBound; state.updateBound = updateBound;
window.addEventListener('resize', state.updateBound, { passive: true }); getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
// Scroll event listener on scroll parents // Scroll event listener on scroll parents
var scrollElement = getScrollParent(reference); var scrollElement = getScrollParent(reference);
@ -1020,7 +1014,7 @@ function enableEventListeners() {
*/ */
function removeEventListeners(reference, state) { function removeEventListeners(reference, state) {
// Remove resize event listener on window // Remove resize event listener on window
window.removeEventListener('resize', state.updateBound); getWindow(reference).removeEventListener('resize', state.updateBound);
// Remove scroll event listener on scroll parents // Remove scroll event listener on scroll parents
state.scrollParents.forEach(function (target) { state.scrollParents.forEach(function (target) {
@ -2322,8 +2316,8 @@ var Popper = function () {
}; };
// get reference and popper elements (allow jQuery wrappers) // get reference and popper elements (allow jQuery wrappers)
this.reference = reference.jquery ? reference[0] : reference; this.reference = reference && reference.jquery ? reference[0] : reference;
this.popper = popper.jquery ? popper[0] : popper; this.popper = popper && popper.jquery ? popper[0] : popper;
// Deep merge modifiers options // Deep merge modifiers options
this.options.modifiers = {}; this.options.modifiers = {};

2
js/popper.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

2
js/theme.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "understrap", "name": "understrap",
"version": "0.6.5", "version": "0.6.6",
"description": "WordPress Theme framework", "description": "WordPress Theme framework",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -27,30 +27,30 @@
}, },
"homepage": "https://understrap.com", "homepage": "https://understrap.com",
"dependencies": { "dependencies": {
"bootstrap": "4.0.0-beta", "bootstrap": "4.0.0-beta.2",
"browser-sync": "^2.18.12", "browser-sync": "^2.18.13",
"del": "^3.0.0", "del": "^3.0.0",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-clean-css": "^3.7.0", "gulp-clean-css": "^3.9.0",
"gulp-clone": "^1.0.0", "gulp-clone": "^1.0.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.2", "gulp-cssnano": "^2.1.2",
"gulp-ignore": "^2.0.2", "gulp-ignore": "^2.0.2",
"gulp-imagemin": "^3.3.0", "gulp-imagemin": "^3.4.0",
"gulp-merge": "^0.1.1", "gulp-merge": "^0.1.1",
"gulp-plumber": "^1.1.0", "gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.1", "gulp-rimraf": "^0.2.1",
"gulp-sass": "^3.1.0", "gulp-sass": "^3.1.0",
"gulp-sequence": "^0.4.6", "gulp-sequence": "^0.4.6",
"gulp-sourcemaps": "2.6.0", "gulp-sourcemaps": "2.6.1",
"gulp-uglify": "^3.0.0", "gulp-uglify": "^3.0.0",
"gulp-watch": "^4.3.11", "gulp-watch": "^4.3.11",
"jquery": "3.2.1", "jquery": "3.2.1",
"merge2": "^1.1.0", "merge2": "^1.2.0",
"popper.js": "^1.11.1", "popper.js": "^1.12.6",
"run-sequence": "^2.0.0", "run-sequence": "^2.2.0",
"undescores-for-npm": "^1.0.0" "undescores-for-npm": "^1.0.0"
} }
} }

6287
src/js/bootstrap4/bootstrap.bundle.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@
// //
.alert { .alert {
position: relative;
padding: $alert-padding-y $alert-padding-x; padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom; margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent; border: $alert-border-width solid transparent;
@ -28,9 +29,9 @@
.alert-dismissible { .alert-dismissible {
// Adjust close link position // Adjust close link position
.close { .close {
position: relative; position: absolute;
top: -$alert-padding-y; top: 0;
right: -$alert-padding-x; right: 0;
padding: $alert-padding-y $alert-padding-x; padding: $alert-padding-y $alert-padding-x;
color: inherit; color: inherit;
} }

View File

@ -9,11 +9,10 @@
font-size: $badge-font-size; font-size: $badge-font-size;
font-weight: $badge-font-weight; font-weight: $badge-font-weight;
line-height: 1; line-height: 1;
color: $badge-color;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
@include border-radius(); @include border-radius($badge-border-radius);
// Empty badges collapse automatically // Empty badges collapse automatically
&:empty { &:empty {

View File

@ -1,15 +1,14 @@
.breadcrumb { .breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x; padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom; margin-bottom: $breadcrumb-margin-bottom;
list-style: none; list-style: none;
background-color: $breadcrumb-bg; background-color: $breadcrumb-bg;
@include border-radius($border-radius); @include border-radius($border-radius);
@include clearfix;
} }
.breadcrumb-item { .breadcrumb-item {
float: left;
// The separator between breadcrumbs (by default, a forward-slash: "/") // The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item::before { + .breadcrumb-item::before {
display: inline-block; // Suppress underlining of the separator in modern browsers display: inline-block; // Suppress underlining of the separator in modern browsers
@ -28,6 +27,7 @@
+ .breadcrumb-item:hover::before { + .breadcrumb-item:hover::before {
text-decoration: underline; text-decoration: underline;
} }
// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before { + .breadcrumb-item:hover::before {
text-decoration: none; text-decoration: none;
} }

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement // stylelint-disable selector-no-qualifying-type
// Make the div behave like a button // Make the div behave like a button
.btn-group, .btn-group,
@ -10,7 +10,6 @@
> .btn { > .btn {
position: relative; position: relative;
flex: 0 1 auto; flex: 0 1 auto;
margin-bottom: 0;
// Bring the hover, focused, and "active" buttons to the front to overlay // Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly // the borders properly
@ -48,7 +47,8 @@
border-radius: 0; border-radius: 0;
} }
// 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;
@ -56,25 +56,30 @@
@include border-right-radius(0); @include 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:not(:first-child), .btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) { .btn-group > .dropdown-toggle:not(:first-child) {
@include border-left-radius(0); @include border-left-radius(0);
} }
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) // Custom edits for including btn-groups within btn-groups (useful for including
// dropdown buttons within a btn-group)
.btn-group > .btn-group { .btn-group > .btn-group {
float: left; float: left;
} }
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0; border-radius: 0;
} }
.btn-group > .btn-group:first-child:not(:last-child) { .btn-group > .btn-group:first-child:not(:last-child) {
> .btn:last-child, > .btn:last-child,
> .dropdown-toggle { > .dropdown-toggle {
@include border-right-radius(0); @include border-right-radius(0);
} }
} }
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
@include border-left-radius(0); @include border-left-radius(0);
} }
@ -129,7 +134,6 @@
// //
.btn-group-vertical { .btn-group-vertical {
display: inline-flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: center; justify-content: center;
@ -146,31 +150,36 @@
margin-top: -$input-btn-border-width; margin-top: -$input-btn-border-width;
margin-left: 0; margin-left: 0;
} }
}
.btn-group-vertical > .btn { > .btn {
&:not(:first-child):not(:last-child) { &:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:first-child:not(:last-child) {
@include border-bottom-radius(0);
}
&:last-child:not(:first-child) {
@include border-top-radius(0);
}
}
> .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0; border-radius: 0;
} }
&:first-child:not(:last-child) {
@include border-bottom-radius(0); > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
@include border-bottom-radius(0);
}
} }
&:last-child:not(:first-child) {
> .btn-group:last-child:not(:first-child) > .btn:first-child {
@include border-top-radius(0); @include border-top-radius(0);
} }
} }
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
@include border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
@include border-top-radius(0);
}
// Checkbox and radio options // Checkbox and radio options

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement // stylelint-disable selector-no-qualifying-type
// //
// Base styles // Base styles
@ -22,7 +22,7 @@
&:focus, &:focus,
&.focus { &.focus {
outline: 0; outline: 0;
box-shadow: $btn-focus-box-shadow; box-shadow: $input-btn-focus-box-shadow;
} }
// Disabled comes first so active can properly restyle // Disabled comes first so active can properly restyle
@ -32,10 +32,10 @@
@include box-shadow(none); @include box-shadow(none);
} }
&:active, &:not([disabled]):not(.disabled):active,
&.active { &:not([disabled]):not(.disabled).active {
background-image: none; background-image: none;
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); @include box-shadow($input-btn-focus-box-shadow, $btn-active-box-shadow);
} }
} }
@ -58,7 +58,11 @@ fieldset[disabled] a.btn {
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
.btn-outline-#{$color} { .btn-outline-#{$color} {
@include button-outline-variant($value, #fff); @if $color == "light" {
@include button-outline-variant($value, $gray-900);
} @else {
@include button-outline-variant($value, $white);
}
} }
} }
@ -71,36 +75,27 @@ fieldset[disabled] a.btn {
.btn-link { .btn-link {
font-weight: $font-weight-normal; font-weight: $font-weight-normal;
color: $link-color; color: $link-color;
border-radius: 0; background-color: transparent;
&,
&:active,
&.active,
&:disabled {
background-color: transparent;
@include box-shadow(none);
}
&,
&:focus,
&:active {
border-color: transparent;
box-shadow: none;
}
@include hover { @include hover {
border-color: transparent;
}
@include hover-focus {
color: $link-hover-color; color: $link-hover-color;
text-decoration: $link-hover-decoration; text-decoration: $link-hover-decoration;
background-color: transparent; background-color: transparent;
border-color: transparent;
} }
&:disabled {
color: $btn-link-disabled-color;
@include hover-focus { &:focus,
text-decoration: none; &.focus {
} border-color: transparent;
box-shadow: none;
} }
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
}
// No need for an active state here
} }
@ -109,11 +104,11 @@ fieldset[disabled] a.btn {
// //
.btn-lg { .btn-lg {
@include button-size($input-btn-padding-y-lg, $input-btn-padding-x-lg, $font-size-lg, $line-height-lg, $btn-border-radius-lg); @include button-size($input-btn-padding-y-lg, $input-btn-padding-x-lg, $font-size-lg, $input-btn-line-height-lg, $btn-border-radius-lg);
} }
.btn-sm { .btn-sm {
@include button-size($input-btn-padding-y-sm, $input-btn-padding-x-sm, $font-size-sm, $line-height-sm, $btn-border-radius-sm); @include button-size($input-btn-padding-y-sm, $input-btn-padding-x-sm, $font-size-sm, $input-btn-line-height-sm, $btn-border-radius-sm);
} }

View File

@ -12,6 +12,23 @@
background-clip: border-box; background-clip: border-box;
border: $card-border-width solid $card-border-color; border: $card-border-width solid $card-border-color;
@include border-radius($card-border-radius); @include border-radius($card-border-radius);
> hr {
margin-right: 0;
margin-left: 0;
}
> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
}
}
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
}
}
} }
.card-body { .card-body {
@ -44,21 +61,6 @@
} }
} }
.card {
> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
}
}
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
}
}
}
// //
// Optional textual caps // Optional textual caps
// //
@ -72,6 +74,12 @@
&:first-child { &:first-child {
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0); @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
} }
+ .list-group {
.list-group-item:first-child {
border-top: 0;
}
}
} }
.card-footer { .card-footer {
@ -130,18 +138,26 @@
// Card deck // Card deck
@include media-breakpoint-up(sm) { .card-deck {
.card-deck { display: flex;
display: flex; flex-direction: column;
.card {
margin-bottom: $card-deck-margin;
}
@include media-breakpoint-up(sm) {
flex-flow: row wrap; flex-flow: row wrap;
margin-right: -$card-deck-margin; margin-right: -$card-deck-margin;
margin-left: -$card-deck-margin; margin-left: -$card-deck-margin;
.card { .card {
display: flex; display: flex;
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
flex: 1 0 0%; flex: 1 0 0%;
flex-direction: column; flex-direction: column;
margin-right: $card-deck-margin; margin-right: $card-deck-margin;
margin-bottom: 0; // Override the default
margin-left: $card-deck-margin; margin-left: $card-deck-margin;
} }
} }
@ -152,13 +168,21 @@
// Card groups // Card groups
// //
@include media-breakpoint-up(sm) { .card-group {
.card-group { display: flex;
display: flex; flex-direction: column;
.card {
margin-bottom: $card-group-margin;
}
@include media-breakpoint-up(sm) {
flex-flow: row wrap; flex-flow: row wrap;
.card { .card {
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
flex: 1 0 0%; flex: 1 0 0%;
margin-bottom: 0;
+ .card { + .card {
margin-left: 0; margin-left: 0;
@ -177,6 +201,7 @@
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
} }
} }
&:last-child { &:last-child {
@include border-left-radius(0); @include border-left-radius(0);
@ -188,7 +213,18 @@
} }
} }
&:not(:first-child):not(:last-child) { &:only-child {
@include border-radius($card-border-radius);
.card-img-top {
@include border-top-radius($card-border-radius);
}
.card-img-bottom {
@include border-bottom-radius($card-border-radius);
}
}
&:not(:first-child):not(:last-child):not(:only-child) {
border-radius: 0; border-radius: 0;
.card-img-top, .card-img-top,

View File

@ -90,9 +90,15 @@
} }
.carousel-control-prev { .carousel-control-prev {
left: 0; left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(0,0,0,.001));
}
} }
.carousel-control-next { .carousel-control-next {
right: 0; right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba(0,0,0,.25), rgba(0,0,0,.001));
}
} }
// Icons for within // Icons for within

View File

@ -19,11 +19,11 @@
// If you want the anchor version, it requires `href="#"`. // If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
// scss-lint:disable QualifyingElement // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
button.close { button.close {
padding: 0; padding: 0;
background: transparent; background: transparent;
border: 0; border: 0;
-webkit-appearance: none; -webkit-appearance: none;
} }
// scss-lint:enable QualifyingElement // stylelint-enable

View File

@ -1,5 +1,3 @@
// scss-lint:disable PropertyCount, VendorPrefix
// Embedded icons from Open Iconic. // Embedded icons from Open Iconic.
// Released under MIT and copyright 2014 Waybury. // Released under MIT and copyright 2014 Waybury.
// https://useiconic.com/open // https://useiconic.com/open
@ -24,7 +22,7 @@
&:checked ~ .custom-control-indicator { &:checked ~ .custom-control-indicator {
color: $custom-control-indicator-checked-color; color: $custom-control-indicator-checked-color;
background-color: $custom-control-indicator-checked-bg; @include gradient-bg($custom-control-indicator-checked-bg);
@include box-shadow($custom-control-indicator-checked-box-shadow); @include box-shadow($custom-control-indicator-checked-box-shadow);
} }
@ -35,7 +33,7 @@
&:active ~ .custom-control-indicator { &:active ~ .custom-control-indicator {
color: $custom-control-indicator-active-color; color: $custom-control-indicator-active-color;
background-color: $custom-control-indicator-active-bg; @include gradient-bg($custom-control-indicator-active-bg);
@include box-shadow($custom-control-indicator-active-box-shadow); @include box-shadow($custom-control-indicator-active-box-shadow);
} }
@ -139,7 +137,6 @@
color: $custom-select-color; color: $custom-select-color;
vertical-align: middle; vertical-align: middle;
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center; background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
background-clip: padding-box;
background-size: $custom-select-bg-size; background-size: $custom-select-bg-size;
border: $custom-select-border-width solid $custom-select-border-color; border: $custom-select-border-width solid $custom-select-border-color;
@if $enable-rounded { @if $enable-rounded {
@ -165,6 +162,11 @@
} }
} }
&[multiple] {
height: auto;
background-image: none;
}
&:disabled { &:disabled {
color: $custom-select-disabled-color; color: $custom-select-disabled-color;
background-color: $custom-select-disabled-bg; background-color: $custom-select-disabled-bg;
@ -216,13 +218,11 @@
z-index: 5; z-index: 5;
height: $custom-file-height; height: $custom-file-height;
padding: $custom-file-padding-y $custom-file-padding-x; padding: $custom-file-padding-y $custom-file-padding-x;
overflow: hidden;
line-height: $custom-file-line-height; line-height: $custom-file-line-height;
color: $custom-file-color; color: $custom-file-color;
pointer-events: none; pointer-events: none;
user-select: none; user-select: none;
background-color: $custom-file-bg; background-color: $custom-file-bg;
background-clip: padding-box;
border: $custom-file-border-width solid $custom-file-border-color; border: $custom-file-border-width solid $custom-file-border-color;
@include border-radius($custom-file-border-radius); @include border-radius($custom-file-border-radius);
@include box-shadow($custom-file-box-shadow); @include box-shadow($custom-file-box-shadow);
@ -235,16 +235,18 @@
&::before { &::before {
position: absolute; position: absolute;
top: 0; top: -$custom-file-border-width;
right: 0; right: -$custom-file-border-width;
bottom: -$custom-file-border-width;
z-index: 6; z-index: 6;
display: block; display: block;
height: $custom-file-height; height: $custom-file-height;
padding: $custom-file-padding-y $custom-file-padding-x; padding: $custom-file-padding-y $custom-file-padding-x;
line-height: $custom-file-line-height; line-height: $custom-file-line-height;
color: $custom-file-button-color; color: $custom-file-button-color;
background-color: $custom-file-button-bg; @include gradient-bg($custom-file-button-bg);
border-left: $custom-file-border-width solid $custom-file-border-color; border: $custom-file-border-width solid $custom-file-border-color;
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
} }
@each $lang, $text in map-get($custom-file-text, button-label) { @each $lang, $text in map-get($custom-file-text, button-label) {

View File

@ -6,37 +6,7 @@
.dropdown-toggle { .dropdown-toggle {
// Generate the caret automatically // Generate the caret automatically
&::after { @include caret;
display: inline-block;
width: 0;
height: 0;
margin-left: $caret-width * .85;
vertical-align: $caret-width * .85;
content: "";
border-top: $caret-width solid;
border-right: $caret-width solid transparent;
border-left: $caret-width solid transparent;
}
&:empty::after {
margin-left: 0;
}
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)
// Just add .dropup after the standard .dropdown class and you're set.
.dropup {
.dropdown-menu {
margin-top: 0;
margin-bottom: $dropdown-spacer;
}
.dropdown-toggle {
&::after {
border-top: 0;
border-bottom: $caret-width solid;
}
}
} }
// The dropdown menu // The dropdown menu
@ -61,6 +31,19 @@
@include box-shadow($dropdown-box-shadow); @include box-shadow($dropdown-box-shadow);
} }
// Allow for dropdowns to go bottom up (aka, dropup-menu)
// Just add .dropup after the standard .dropdown class and you're set.
.dropup {
.dropdown-menu {
margin-top: 0;
margin-bottom: $dropdown-spacer;
}
.dropdown-toggle {
@include caret(up);
}
}
// Dividers (basically an `<hr>`) within the dropdown // Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider { .dropdown-divider {
@include nav-divider($dropdown-divider-bg); @include nav-divider($dropdown-divider-bg);
@ -84,14 +67,14 @@
@include hover-focus { @include hover-focus {
color: $dropdown-link-hover-color; color: $dropdown-link-hover-color;
text-decoration: none; text-decoration: none;
background-color: $dropdown-link-hover-bg; @include gradient-bg($dropdown-link-hover-bg);
} }
&.active, &.active,
&:active { &:active {
color: $dropdown-link-active-color; color: $dropdown-link-active-color;
text-decoration: none; text-decoration: none;
background-color: $dropdown-link-active-bg; @include gradient-bg($dropdown-link-active-bg);
} }
&.disabled, &.disabled,
@ -105,14 +88,6 @@
} }
} }
// Open state for the dropdown
.show {
// Remove the outline when :focus is triggered
> a {
outline: 0;
}
}
.dropdown-menu.show { .dropdown-menu.show {
display: block; display: block;
} }

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement, VendorPrefix // stylelint-disable selector-no-qualifying-type
// //
// Textual form controls // Textual form controls
@ -7,8 +7,6 @@
.form-control { .form-control {
display: block; display: block;
width: 100%; width: 100%;
// // Make inputs at least the height of their button counterpart (base line-height + padding + border)
// height: $input-height;
padding: $input-btn-padding-y $input-btn-padding-x; padding: $input-btn-padding-y $input-btn-padding-x;
font-size: $font-size-base; font-size: $font-size-base;
line-height: $input-btn-line-height; line-height: $input-btn-line-height;
@ -90,21 +88,24 @@ select.form-control {
// For use with horizontal and inline forms, when you need the label text to // For use with horizontal and inline forms, when you need the label text to
// align with the form controls. // align with the form controls.
.col-form-label { .col-form-label {
padding-top: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2); padding-top: calc(#{$input-btn-padding-y} + #{$input-btn-border-width});
padding-bottom: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2); padding-bottom: calc(#{$input-btn-padding-y} + #{$input-btn-border-width});
margin-bottom: 0; // Override the `<label>` default margin-bottom: 0; // Override the `<label>` default
line-height: $input-btn-line-height;
} }
.col-form-label-lg { .col-form-label-lg {
padding-top: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2); padding-top: calc(#{$input-btn-padding-y-lg} + #{$input-btn-border-width});
padding-bottom: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2); padding-bottom: calc(#{$input-btn-padding-y-lg} + #{$input-btn-border-width});
font-size: $font-size-lg; font-size: $font-size-lg;
line-height: $input-btn-line-height-lg;
} }
.col-form-label-sm { .col-form-label-sm {
padding-top: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2); padding-top: calc(#{$input-btn-padding-y-sm} + #{$input-btn-border-width});
padding-bottom: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2); padding-bottom: calc(#{$input-btn-padding-y-sm} + #{$input-btn-border-width});
font-size: $font-size-sm; font-size: $font-size-sm;
line-height: $input-btn-line-height-sm;
} }
@ -132,6 +133,7 @@ select.form-control {
padding-bottom: $input-btn-padding-y; padding-bottom: $input-btn-padding-y;
margin-bottom: 0; // match inputs if this class comes on inputs with default margins margin-bottom: 0; // match inputs if this class comes on inputs with default margins
line-height: $input-btn-line-height; line-height: $input-btn-line-height;
background-color: transparent;
border: solid transparent; border: solid transparent;
border-width: $input-btn-border-width 0; border-width: $input-btn-border-width 0;
@ -241,14 +243,11 @@ select.form-control-lg {
// Radios and checkboxes on same line // Radios and checkboxes on same line
.form-check-inline { .form-check-inline {
display: inline-block; display: inline-block;
margin-right: $form-check-inline-margin-x;
.form-check-label { .form-check-label {
vertical-align: middle; vertical-align: middle;
} }
+ .form-check-inline {
margin-left: $form-check-inline-margin-x;
}
} }
@ -259,28 +258,6 @@ select.form-control-lg {
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
// server side validation. // server side validation.
.invalid-feedback {
display: none;
margin-top: .25rem;
font-size: .875rem;
color: $form-feedback-invalid-color;
}
.invalid-tooltip {
position: absolute;
top: 100%;
z-index: 5;
display: none;
width: 250px;
padding: .5rem;
margin-top: .1rem;
font-size: .875rem;
line-height: 1;
color: #fff;
background-color: rgba($form-feedback-invalid-color,.8);
border-radius: .2rem;
}
@include form-validation-state("valid", $form-feedback-valid-color); @include form-validation-state("valid", $form-feedback-valid-color);
@include form-validation-state("invalid", $form-feedback-invalid-color); @include form-validation-state("invalid", $form-feedback-invalid-color);
@ -339,11 +316,6 @@ select.form-control-lg {
width: auto; width: auto;
} }
.form-control-label {
margin-bottom: 0;
vertical-align: middle;
}
// Remove default margin on radios/checkboxes that were used for stacking, and // Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match. // then undo the floating of radios and checkboxes to match.
.form-check { .form-check {

View File

@ -49,7 +49,7 @@
} }
// Color contrast // Color contrast
@mixin color-yiq($color) { @function color-yiq($color) {
$r: red($color); $r: red($color);
$g: green($color); $g: green($color);
$b: blue($color); $b: blue($color);
@ -57,9 +57,9 @@
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= 150) { @if ($yiq >= 150) {
color: #111; @return #111;
} @else { } @else {
color: #fff; @return #fff;
} }
} }
@ -72,7 +72,7 @@
@return map-get($theme-colors, $key); @return map-get($theme-colors, $key);
} }
@function grayscale($key: "100") { @function gray($key: "100") {
@return map-get($grays, $key); @return map-get($grays, $key);
} }
@ -80,11 +80,7 @@
@function theme-color-level($color-name: "primary", $level: 0) { @function theme-color-level($color-name: "primary", $level: 0) {
$color: theme-color($color-name); $color: theme-color($color-name);
$color-base: if($level > 0, #000, #fff); $color-base: if($level > 0, #000, #fff);
$level: abs($level);
@if $level < 0 { @return mix($color-base, $color, $level * $theme-color-interval);
// Lighter values need a quick double negative for the Sass math to work
@return mix($color-base, $color, $level * -1 * $theme-color-interval);
} @else {
@return mix($color-base, $color, $level * $theme-color-interval);
}
} }

View File

@ -16,7 +16,6 @@
@if $enable-grid-classes { @if $enable-grid-classes {
.container-fluid { .container-fluid {
width: 100%;
@include make-container(); @include make-container();
} }
} }

View File

@ -1,3 +1,5 @@
// stylelint-disable selector-no-qualifying-type
// //
// Base styles // Base styles
// //
@ -5,6 +7,7 @@
.input-group { .input-group {
position: relative; position: relative;
display: flex; display: flex;
align-items: stretch;
width: 100%; width: 100%;
.form-control { .form-control {
@ -28,10 +31,8 @@
.input-group-addon, .input-group-addon,
.input-group-btn, .input-group-btn,
.input-group .form-control { .input-group .form-control {
// Vertically centers the content of the addons within the input group
display: flex; display: flex;
align-items: center; align-items: center;
&:not(:first-child):not(:last-child) { &:not(:first-child):not(:last-child) {
@include border-radius(0); @include border-radius(0);
} }
@ -40,7 +41,6 @@
.input-group-addon, .input-group-addon,
.input-group-btn { .input-group-btn {
white-space: nowrap; white-space: nowrap;
vertical-align: middle; // Match the inputs
} }
@ -74,7 +74,6 @@
color: $input-group-addon-color; color: $input-group-addon-color;
text-align: center; text-align: center;
background-color: $input-group-addon-bg; background-color: $input-group-addon-bg;
background-clip: padding-box;
border: $input-btn-border-width solid $input-group-addon-border-color; border: $input-btn-border-width solid $input-group-addon-border-color;
@include border-radius($input-border-radius); @include border-radius($input-border-radius);
@ -91,13 +90,11 @@
@include border-radius($input-border-radius-lg); @include border-radius($input-border-radius-lg);
} }
// scss-lint:disable QualifyingElement
// Nuke default margins from checkboxes and radios to vertically center within. // Nuke default margins from checkboxes and radios to vertically center within.
input[type="radio"], input[type="radio"],
input[type="checkbox"] { input[type="checkbox"] {
margin-top: 0; margin-top: 0;
} }
// scss-lint:enable QualifyingElement
} }
@ -136,6 +133,7 @@
.input-group-btn { .input-group-btn {
position: relative; position: relative;
align-items: stretch;
// Jankily prevent input button groups from wrapping with `white-space` and // Jankily prevent input button groups from wrapping with `white-space` and
// `font-size` in combination with `inline-block` on buttons. // `font-size` in combination with `inline-block` on buttons.
font-size: 0; font-size: 0;
@ -145,8 +143,6 @@
// element above the siblings. // element above the siblings.
> .btn { > .btn {
position: relative; position: relative;
background-clip: padding-box;
border: $input-btn-border-width solid $input-group-btn-border-color;
+ .btn { + .btn {
margin-left: (-$input-btn-border-width); margin-left: (-$input-btn-border-width);
@ -158,6 +154,10 @@
} }
} }
&:first-child > .btn + .btn {
margin-left: 0;
}
// Negative margin to only have a single, shared border between the two // Negative margin to only have a single, shared border between the two
&:not(:last-child) { &:not(:last-child) {
> .btn, > .btn,
@ -169,7 +169,14 @@
> .btn, > .btn,
> .btn-group { > .btn-group {
z-index: 2; z-index: 2;
margin-left: (-$input-btn-border-width); // remove nagative margin ($input-btn-border-width) to solve overlapping issue with button.
margin-left: 0;
// When input is first, overlap the right side of it with the button(-group)
&:first-child {
margin-left: (-$input-btn-border-width);
}
// Because specificity // Because specificity
@include hover-focus-active { @include hover-focus-active {
z-index: 3; z-index: 3;

View File

@ -19,6 +19,7 @@
// // Components // // Components
@import "mixins/alert"; @import "mixins/alert";
@import "mixins/buttons"; @import "mixins/buttons";
@import "mixins/caret";
@import "mixins/pagination"; @import "mixins/pagination";
@import "mixins/lists"; @import "mixins/lists";
@import "mixins/list-group"; @import "mixins/list-group";

View File

@ -43,6 +43,8 @@
position: relative; position: relative;
width: auto; width: auto;
margin: $modal-dialog-margin; margin: $modal-dialog-margin;
// allow clicks to pass through for custom click handling to close modal
pointer-events: none;
} }
// Actual modal // Actual modal
@ -50,6 +52,8 @@
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
// counteract the pointer-events: none; in the .modal-dialog
pointer-events: auto;
background-color: $modal-content-bg; background-color: $modal-content-bg;
background-clip: padding-box; background-clip: padding-box;
border: $modal-content-border-width solid $modal-content-border-color; border: $modal-content-border-width solid $modal-content-border-color;
@ -78,13 +82,16 @@
// Top section of the modal w/ title and dismiss // Top section of the modal w/ title and dismiss
.modal-header { .modal-header {
display: flex; display: flex;
align-items: center; // vertically center it align-items: flex-start; // so the close btn always stays on the upper right corner
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: $modal-header-padding; padding: $modal-header-padding;
border-bottom: $modal-header-border-width solid $modal-header-border-color; border-bottom: $modal-header-border-width solid $modal-header-border-color;
@include border-top-radius($border-radius-lg);
.close { .close {
margin-left: auto; // Force icon to the right even when there's no .modal-title padding: $modal-header-padding;
// auto on the left force icon to the right even when there is no .modal-title
margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
} }
} }

View File

@ -74,12 +74,12 @@
.nav-pills { .nav-pills {
.nav-link { .nav-link {
@include border-radius($nav-pills-border-radius); @include border-radius($nav-pills-border-radius);
}
&.active, .nav-link.active,
.show > & { .show > .nav-link {
color: $nav-pills-link-active-color; color: $nav-pills-link-active-color;
background-color: $nav-pills-link-active-bg; background-color: $nav-pills-link-active-bg;
}
} }
} }

View File

@ -98,6 +98,7 @@
// on the `.navbar` parent. // on the `.navbar` parent.
.navbar-collapse { .navbar-collapse {
flex-basis: 100%; flex-basis: 100%;
flex-grow: 1;
// For always expanded or extra full navbars, ensure content aligns itself // For always expanded or extra full navbars, ensure content aligns itself
// properly vertically. Can be easily overridden with flex utilities. // properly vertically. Can be easily overridden with flex utilities.
align-items: center; align-items: center;
@ -146,8 +147,7 @@
} }
@include media-breakpoint-up($next) { @include media-breakpoint-up($next) {
flex-direction: row; flex-flow: row nowrap;
flex-wrap: nowrap;
justify-content: flex-start; justify-content: flex-start;
.navbar-nav { .navbar-nav {
@ -174,15 +174,23 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
// scss-lint:disable ImportantRule
.navbar-collapse { .navbar-collapse {
display: flex !important; display: flex !important; // stylelint-disable-line declaration-no-important
// Changes flex-bases to auto because of an IE10 bug
flex-basis: auto;
} }
// scss-lint:enable ImportantRule
.navbar-toggler { .navbar-toggler {
display: none; display: none;
} }
.dropup {
.dropdown-menu {
top: auto;
bottom: 100%;
}
}
} }
} }
} }
@ -235,6 +243,13 @@
.navbar-text { .navbar-text {
color: $navbar-light-color; color: $navbar-light-color;
a {
color: $navbar-light-active-color;
@include hover-focus {
color: $navbar-light-active-color;
}
}
} }
} }
@ -280,5 +295,12 @@
.navbar-text { .navbar-text {
color: $navbar-dark-color; color: $navbar-dark-color;
a {
color: $navbar-dark-active-color;
@include hover-focus {
color: $navbar-dark-active-color;
}
}
} }
} }

View File

@ -1,8 +1,6 @@
.pagination { .pagination {
display: flex; display: flex;
// 1-2: Disable browser default list styles @include list-unstyled();
padding-left: 0; // 1
list-style: none; // 2
@include border-radius(); @include border-radius();
} }
@ -38,7 +36,7 @@
position: relative; position: relative;
display: block; display: block;
padding: $pagination-padding-y $pagination-padding-x; padding: $pagination-padding-y $pagination-padding-x;
margin-left: -1px; margin-left: -$pagination-border-width;
line-height: $pagination-line-height; line-height: $pagination-line-height;
color: $pagination-color; color: $pagination-color;
background-color: $pagination-bg; background-color: $pagination-bg;

View File

@ -5,7 +5,6 @@
z-index: $zindex-popover; z-index: $zindex-popover;
display: block; display: block;
max-width: $popover-max-width; max-width: $popover-max-width;
padding: $popover-inner-padding;
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. // 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. // So reset our font and text properties to avoid inheriting weird values.
@include reset-text(); @include reset-text();
@ -39,11 +38,11 @@
.arrow::before { .arrow::before {
content: ""; content: "";
border-width: $popover-arrow-outer-width; border-width: $popover-arrow-width;
} }
.arrow::after { .arrow::after {
content: ""; content: "";
border-width: $popover-arrow-outer-width; border-width: $popover-arrow-width;
} }
// Popover directions // Popover directions
@ -61,14 +60,14 @@
} }
.arrow::before { .arrow::before {
bottom: -$popover-arrow-outer-width; bottom: -$popover-arrow-width;
margin-left: -($popover-arrow-outer-width - 5); margin-left: -$popover-arrow-width;
border-top-color: $popover-arrow-outer-color; border-top-color: $popover-arrow-outer-color;
} }
.arrow::after { .arrow::after {
bottom: -($popover-arrow-outer-width - 1); bottom: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
margin-left: -($popover-arrow-outer-width - 5); margin-left: -$popover-arrow-width;
border-top-color: $popover-arrow-color; border-top-color: $popover-arrow-color;
} }
} }
@ -82,17 +81,17 @@
.arrow::before, .arrow::before,
.arrow::after { .arrow::after {
margin-top: -($popover-arrow-outer-width - 3); margin-top: -$popover-arrow-width;
border-left-width: 0; border-left-width: 0;
} }
.arrow::before { .arrow::before {
left: -$popover-arrow-outer-width; left: -$popover-arrow-width;
border-right-color: $popover-arrow-outer-color; border-right-color: $popover-arrow-outer-color;
} }
.arrow::after { .arrow::after {
left: -($popover-arrow-outer-width - 1); left: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
border-right-color: $popover-arrow-color; border-right-color: $popover-arrow-color;
} }
} }
@ -106,17 +105,17 @@
.arrow::before, .arrow::before,
.arrow::after { .arrow::after {
margin-left: -($popover-arrow-width - 3); margin-left: -$popover-arrow-width;
border-top-width: 0; border-top-width: 0;
} }
.arrow::before { .arrow::before {
top: -$popover-arrow-outer-width; top: -$popover-arrow-width;
border-bottom-color: $popover-arrow-outer-color; border-bottom-color: $popover-arrow-outer-color;
} }
.arrow::after { .arrow::after {
top: -($popover-arrow-outer-width - 1); top: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
border-bottom-color: $popover-arrow-color; border-bottom-color: $popover-arrow-color;
} }
@ -129,7 +128,7 @@
width: 20px; width: 20px;
margin-left: -10px; margin-left: -10px;
content: ""; content: "";
border-bottom: 1px solid $popover-header-bg; border-bottom: $popover-border-width solid $popover-header-bg;
} }
} }
@ -142,17 +141,17 @@
.arrow::before, .arrow::before,
.arrow::after { .arrow::after {
margin-top: -($popover-arrow-outer-width - 3); margin-top: -$popover-arrow-width;
border-right-width: 0; border-right-width: 0;
} }
.arrow::before { .arrow::before {
right: -$popover-arrow-outer-width; right: -$popover-arrow-width;
border-left-color: $popover-arrow-outer-color; border-left-color: $popover-arrow-outer-color;
} }
.arrow::after { .arrow::after {
right: -($popover-arrow-outer-width - 1); right: calc((#{$popover-arrow-width} - #{$popover-border-width}) * -1);
border-left-color: $popover-arrow-color; border-left-color: $popover-arrow-color;
} }
} }

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement // stylelint-disable declaration-no-important, selector-no-qualifying-type
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css // Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
@ -14,8 +14,7 @@
*::before, *::before,
*::after { *::after {
// Bootstrap specific; comment out `color` and `background` // Bootstrap specific; comment out `color` and `background`
//color: #000 !important; // Black prints faster: //color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
// http://www.sanbeiji.com/archives/953
text-shadow: none !important; text-shadow: none !important;
//background: transparent !important; //background: transparent !important;
box-shadow: none !important; box-shadow: none !important;

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement, DuplicateProperty, VendorPrefix // stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
// Reboot // Reboot
// //
@ -35,13 +35,17 @@ html {
// IE10+ doesn't honor `<meta name="viewport">` in some cases. // IE10+ doesn't honor `<meta name="viewport">` in some cases.
@at-root { @at-root {
@-ms-viewport { width: device-width; } @-ms-viewport {
width: device-width;
}
} }
// stylelint-disable selector-list-comma-newline-after
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers) // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block; display: block;
} }
// stylelint-enable selector-list-comma-newline-after
// Body // Body
// //
@ -91,10 +95,12 @@ hr {
// //
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
// margin for easier control within type scales as it avoids margin collapsing. // margin for easier control within type scales as it avoids margin collapsing.
// stylelint-disable selector-list-comma-newline-after
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
margin-top: 0; margin-top: 0;
margin-bottom: .5rem; margin-bottom: $headings-margin-bottom;
} }
// stylelint-enable selector-list-comma-newline-after
// Reset margins on paragraphs // Reset margins on paragraphs
// //
@ -157,10 +163,12 @@ dfn {
font-style: italic; // Add the correct font style in Android 4.3- font-style: italic; // Add the correct font style in Android 4.3-
} }
// stylelint-disable font-weight-notation
b, b,
strong { strong {
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
} }
// stylelint-enable font-weight-notation
small { small {
font-size: 80%; // Add the correct font size in all browsers font-size: 80%; // Add the correct font size in all browsers
@ -224,6 +232,7 @@ a:not([href]):not([tabindex]) {
// Code // Code
// //
// stylelint-disable font-family-no-duplicate-names
pre, pre,
code, code,
kbd, kbd,
@ -231,6 +240,7 @@ samp {
font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers. font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
font-size: 1em; // Correct the odd `em` font sizing in all browsers. font-size: 1em; // Correct the odd `em` font sizing in all browsers.
} }
// stylelint-enable font-family-no-duplicate-names
pre { pre {
// Remove browser default top margin // Remove browser default top margin
@ -239,6 +249,9 @@ pre {
margin-bottom: 1rem; margin-bottom: 1rem;
// Don't allow content to break outside // Don't allow content to break outside
overflow: auto; overflow: auto;
// We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
-ms-overflow-style: scrollbar;
} }
@ -272,15 +285,15 @@ svg:not(:root) {
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present. // 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`. // However, they DO support removing the click delay via `touch-action: manipulation`.
// See: // See:
// * https://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch // * https://getbootstrap.com/docs/4.0/content/reboot/#click-delay-optimization-for-touch
// * http://caniuse.com/#feat=css-touch-action // * https://caniuse.com/#feat=css-touch-action
// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay // * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
a, a,
area, area,
button, button,
[role="button"], [role="button"],
input, input:not([type="range"]),
label, label,
select, select,
summary, summary,
@ -322,6 +335,13 @@ label {
margin-bottom: .5rem; margin-bottom: .5rem;
} }
// Remove the default `border-radius` that macOS Chrome adds.
//
// Details at https://github.com/twbs/bootstrap/issues/24093
button {
border-radius: 0;
}
// Work around a Firefox/IE bug where the transparent `button` background // Work around a Firefox/IE bug where the transparent `button` background
// results in a loss of the default `button` focus styles. // results in a loss of the default `button` focus styles.
// //

View File

@ -0,0 +1,19 @@
:root {
// Custom variable values only support SassScript inside `#{}`.
@each $color, $value in $colors {
--#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
--#{$color}: #{$value};
}
@each $bp, $value in $grid-breakpoints {
--breakpoint-#{$bp}: #{$value};
}
// Use `inspect` for lists so that quoted items keep the quotes.
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
--font-family-sans-serif: #{inspect($font-family-sans-serif)};
--font-family-monospace: #{inspect($font-family-monospace)};
}

View File

@ -99,32 +99,37 @@
@include table-row-variant(active, $table-active-bg); @include table-row-variant(active, $table-active-bg);
// Inverse styles // Dark styles
// //
// Same table markup, but inverted color scheme: dark background and light text. // Same table markup, but inverted color scheme: dark background and light text.
.thead-inverse { // stylelint-disable-next-line no-duplicate-selectors
th { .table {
color: $table-inverse-color; .thead-dark {
background-color: $table-inverse-bg; th {
color: $table-dark-color;
background-color: $table-dark-bg;
border-color: $table-dark-border-color;
}
}
.thead-light {
th {
color: $table-head-color;
background-color: $table-head-bg;
border-color: $table-border-color;
}
} }
} }
.thead-default { .table-dark {
th { color: $table-dark-color;
color: $table-head-color; background-color: $table-dark-bg;
background-color: $table-head-bg;
}
}
.table-inverse {
color: $table-inverse-color;
background-color: $table-inverse-bg;
th, th,
td, td,
thead th { thead th {
border-color: $table-inverse-border-color; border-color: $table-dark-border-color;
} }
&.table-bordered { &.table-bordered {
@ -133,14 +138,14 @@
&.table-striped { &.table-striped {
tbody tr:nth-of-type(odd) { tbody tr:nth-of-type(odd) {
background-color: $table-inverse-accent-bg; background-color: $table-dark-accent-bg;
} }
} }
&.table-hover { &.table-hover {
tbody tr { tbody tr {
@include hover { @include hover {
background-color: $table-inverse-hover-bg; background-color: $table-dark-hover-bg;
} }
} }
} }
@ -149,20 +154,27 @@
// Responsive tables // Responsive tables
// //
// Add `.table-responsive` to `.table`s and we'll make them mobile friendly by // Generate series of `.table-responsive-*` classes for configuring the screen
// enabling horizontal scrolling. Only applies <768px. Everything above that // size of where your table will overflow.
// will display normally.
.table-responsive { .table-responsive {
@include media-breakpoint-down(md) { @each $breakpoint in map-keys($grid-breakpoints) {
display: block; $next: breakpoint-next($breakpoint, $grid-breakpoints);
width: 100%; $infix: breakpoint-infix($next, $grid-breakpoints);
overflow-x: auto;
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
// Prevent double border on horizontal scroll due to use of `display: block;` &#{$infix} {
&.table-bordered { @include media-breakpoint-down($breakpoint) {
border: 0; display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
// Prevent double border on horizontal scroll due to use of `display: block;`
&.table-bordered {
border: 0;
}
}
} }
} }
} }

View File

@ -21,6 +21,12 @@
height: $tooltip-arrow-height; height: $tooltip-arrow-height;
} }
.arrow::before {
position: absolute;
border-color: transparent;
border-style: solid;
}
&.bs-tooltip-top { &.bs-tooltip-top {
padding: $tooltip-arrow-width 0; padding: $tooltip-arrow-width 0;
.arrow { .arrow {
@ -88,12 +94,6 @@
@extend .bs-tooltip-left; @extend .bs-tooltip-left;
} }
} }
.arrow::before {
position: absolute;
border-color: transparent;
border-style: solid;
}
} }
// Wrapper for the tooltip content // Wrapper for the tooltip content

View File

@ -1,3 +1,5 @@
// stylelint-disable selector-no-qualifying-type
.fade { .fade {
opacity: 0; opacity: 0;
@include transition($transition-fade); @include transition($transition-fade);

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important, selector-list-comma-newline-after
// //
// Headings // Headings
// //

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,12 @@
// Bootstrap Grid only /*!
// * Bootstrap Grid v4.0.0-beta.2 (https://getbootstrap.com)
// Includes relevant variables and mixins for the flexbox grid * Copyright 2011-2017 The Bootstrap Authors
// system, as well as the generated predefined classes (e.g., `.col-sm-4`). * Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
// */
// Box sizing, responsive, and more
//
@at-root { @at-root {
@-ms-viewport { width: device-width; } @-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
} }
html { html {

View File

@ -1,9 +1,12 @@
// Bootstrap Reboot only /*!
// * Bootstrap Reboot v4.0.0-beta.2 (https://getbootstrap.com)
// Includes only Normalize and our custom Reboot reset. * Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 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)
*/
@import "functions"; @import "functions";
@import "variables"; @import "variables";
@import "mixins"; @import "mixins";
@import "reboot"; @import "reboot";

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v4.0.0-beta (https://getbootstrap.com) * Bootstrap v4.0.0-beta.2 (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors * Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc. * Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
@ -8,6 +8,7 @@
@import "functions"; @import "functions";
@import "variables"; @import "variables";
@import "mixins"; @import "mixins";
@import "root";
@import "print"; @import "print";
@import "reboot"; @import "reboot";
@import "type"; @import "type";

View File

@ -1,6 +1,6 @@
@mixin alert-variant($background, $border, $color) { @mixin alert-variant($background, $border, $color) {
color: $color; color: $color;
background-color: $background; @include gradient-bg($background);
border-color: $border; border-color: $border;
hr { hr {

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Contextual backgrounds // Contextual backgrounds
@mixin bg-variant($parent, $color) { @mixin bg-variant($parent, $color) {
@ -10,3 +12,9 @@
} }
} }
} }
@mixin bg-gradient-variant($parent, $color) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
}
}

View File

@ -1,10 +1,10 @@
@mixin badge-variant($bg) { @mixin badge-variant($bg) {
@include color-yiq($bg); color: color-yiq($bg);
background-color: $bg; background-color: $bg;
&[href] { &[href] {
@include hover-focus { @include hover-focus {
@include color-yiq($bg); color: color-yiq($bg);
text-decoration: none; text-decoration: none;
background-color: darken($bg, 10%); background-color: darken($bg, 10%);
} }

View File

@ -81,8 +81,18 @@
$min: breakpoint-min($lower, $breakpoints); $min: breakpoint-min($lower, $breakpoints);
$max: breakpoint-max($upper, $breakpoints); $max: breakpoint-max($upper, $breakpoints);
@media (min-width: $min) and (max-width: $max) { @if $min != null and $max != null {
@content; @media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if $max == null {
@include media-breakpoint-up($lower) {
@content;
}
} @else if $min == null {
@include media-breakpoint-down($upper) {
@content;
}
} }
} }
@ -98,8 +108,12 @@
@content; @content;
} }
} @else if $max == null { } @else if $max == null {
@include media-breakpoint-up($name) @include media-breakpoint-up($name) {
@content;
}
} @else if $min == null { } @else if $min == null {
@include media-breakpoint-down($name) @include media-breakpoint-down($name) {
@content;
}
} }
} }

View File

@ -3,25 +3,25 @@
// Easily pump out default styles, as well as :hover, :focus, :active, // Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons // and disabled options for all buttons
@mixin button-variant($background, $border, $active-background: darken($background, 7.5%), $active-border: darken($border, 10%)) { @mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
@include color-yiq($background); color: color-yiq($background);
background-color: $background; @include gradient-bg($background);
border-color: $border; border-color: $border;
@include box-shadow($btn-box-shadow); @include box-shadow($btn-box-shadow);
&:hover { @include hover {
@include color-yiq($background); color: color-yiq($hover-background);
background-color: $active-background; @include gradient-bg($hover-background);
border-color: $active-border; border-color: $hover-border;
} }
&:focus, &:focus,
&.focus { &.focus {
// Avoid using mixin so we can pass custom focus shadow properly // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows { @if $enable-shadows {
box-shadow: $btn-box-shadow, 0 0 0 3px rgba($border, .5); box-shadow: $btn-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
} @else { } @else {
box-shadow: 0 0 0 3px rgba($border, .5); box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
} }
} }
@ -32,13 +32,22 @@
border-color: $border; border-color: $border;
} }
&:active, &:not([disabled]):not(.disabled):active,
&.active, &:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle { .show > &.dropdown-toggle {
color: color-yiq($active-background);
background-color: $active-background; background-color: $active-background;
background-image: none; // Remove the gradient for the pressed/active state @if $enable-gradients {
background-image: none; // Remove the gradient for the pressed/active state
}
border-color: $active-border; border-color: $active-border;
@include box-shadow($btn-active-box-shadow);
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $btn-active-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
} @else {
box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
}
} }
} }
@ -56,7 +65,7 @@
&:focus, &:focus,
&.focus { &.focus {
box-shadow: 0 0 0 3px rgba($color, .5); box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
} }
&.disabled, &.disabled,
@ -65,12 +74,14 @@
background-color: transparent; background-color: transparent;
} }
&:active, &:not([disabled]):not(.disabled):active,
&.active, &:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle { .show > &.dropdown-toggle {
color: $color-hover; color: $color-hover;
background-color: $color; background-color: $color;
border-color: $color; border-color: $color;
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
} }
} }

View File

@ -0,0 +1,35 @@
@mixin caret-down {
border-top: $caret-width solid;
border-right: $caret-width solid transparent;
border-bottom: 0;
border-left: $caret-width solid transparent;
}
@mixin caret-up {
border-top: 0;
border-right: $caret-width solid transparent;
border-bottom: $caret-width solid;
border-left: $caret-width solid transparent;
}
@mixin caret($direction: down) {
@if $enable-caret {
&::after {
display: inline-block;
width: 0;
height: 0;
margin-left: $caret-width * .85;
vertical-align: $caret-width * .85;
content: "";
@if $direction == down {
@include caret-down;
} @else if $direction == up {
@include caret-up;
}
}
&:empty::after {
margin-left: 0;
}
}
}

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
@mixin float-left { @mixin float-left {
float: left !important; float: left !important;
} }

View File

@ -1,7 +1,7 @@
// Form control focus state // Form control focus state
// //
// Generate a customized focus state and for any input with the specified color, // Generate a customized focus state and for any input with the specified color,
// which defaults to the `@input-border-color-focus` variable. // which defaults to the `$input-focus-border-color` variable.
// //
// We highly encourage you to not customize the default value, but instead use // We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on // this to tweak colors on an as-needed basis. This aesthetic change is based on
@ -16,13 +16,40 @@
background-color: $input-focus-bg; background-color: $input-focus-bg;
border-color: $input-focus-border-color; border-color: $input-focus-border-color;
outline: none; outline: none;
@include box-shadow($input-focus-box-shadow); // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $input-box-shadow, $input-btn-focus-box-shadow;
} @else {
box-shadow: $input-btn-focus-box-shadow;
}
} }
} }
@mixin form-validation-state($state, $color) { @mixin form-validation-state($state, $color) {
.#{$state}-feedback {
display: none;
margin-top: .25rem;
font-size: .875rem;
color: $color;
}
.#{$state}-tooltip {
position: absolute;
top: 100%;
z-index: 5;
display: none;
width: 250px;
padding: .5rem;
margin-top: .1rem;
font-size: .875rem;
line-height: 1;
color: #fff;
background-color: rgba($color,.8);
border-radius: .2rem;
}
.form-control, .form-control,
.custom-select { .custom-select {
.was-validated &:#{$state}, .was-validated &:#{$state},
@ -33,8 +60,8 @@
box-shadow: 0 0 0 .2rem rgba($color,.25); box-shadow: 0 0 0 .2rem rgba($color,.25);
} }
~ .invalid-feedback, ~ .#{$state}-feedback,
~ .invalid-tooltip { ~ .#{$state}-tooltip {
display: block; display: block;
} }
} }

View File

@ -1,5 +1,13 @@
// Gradients // Gradients
@mixin gradient-bg($color) {
@if $enable-gradients {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
} @else {
background-color: $color;
}
}
// Horizontal gradient, from left to right // Horizontal gradient, from left to right
// //
// Creates two color stops, start and end, by specifying a color and position for each color stop. // Creates two color stops, start and end, by specifying a color and position for each color stop.

View File

@ -10,7 +10,7 @@
width: 100%; width: 100%;
min-height: 1px; // Prevent columns from collapsing when empty min-height: 1px; // Prevent columns from collapsing when empty
padding-right: ($gutter / 2); padding-right: ($gutter / 2);
padding-left: ($gutter / 2); padding-left: ($gutter / 2);
} }
@each $breakpoint in map-keys($breakpoints) { @each $breakpoint in map-keys($breakpoints) {
@ -46,11 +46,24 @@
} }
} }
.order#{$infix}-first {
order: -1;
}
@for $i from 1 through $columns { @for $i from 1 through $columns {
.order#{$infix}-#{$i} { .order#{$infix}-#{$i} {
order: $i; order: $i;
} }
} }
// `$columns - 1` because offsetting by the width of an entire row isn't possible
@for $i from 0 through ($columns - 1) {
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
.offset#{$infix}-#{$i} {
@include make-col-offset($i, $columns);
}
}
}
} }
} }
} }

View File

@ -3,11 +3,11 @@
// Generate semantic grid columns with these mixins. // Generate semantic grid columns with these mixins.
@mixin make-container() { @mixin make-container() {
width: 100%;
padding-right: ($grid-gutter-width / 2);
padding-left: ($grid-gutter-width / 2);
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
padding-right: ($grid-gutter-width / 2);
padding-left: ($grid-gutter-width / 2);
width: 100%;
} }
@ -24,7 +24,7 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-right: ($grid-gutter-width / -2); margin-right: ($grid-gutter-width / -2);
margin-left: ($grid-gutter-width / -2); margin-left: ($grid-gutter-width / -2);
} }
@mixin make-col-ready() { @mixin make-col-ready() {
@ -35,7 +35,7 @@
width: 100%; width: 100%;
min-height: 1px; // Prevent collapsing min-height: 1px; // Prevent collapsing
padding-right: ($grid-gutter-width / 2); padding-right: ($grid-gutter-width / 2);
padding-left: ($grid-gutter-width / 2); padding-left: ($grid-gutter-width / 2);
} }
@mixin make-col($size, $columns: $grid-columns) { @mixin make-col($size, $columns: $grid-columns) {
@ -45,3 +45,8 @@
// do not appear to require this. // do not appear to require this.
max-width: percentage($size / $columns); max-width: percentage($size / $columns);
} }
@mixin make-col-offset($size, $columns: $grid-columns) {
$num: $size / $columns;
margin-left: if($num == 0, 0, percentage($num));
}

View File

@ -1,3 +1,4 @@
// stylelint-disable indentation
@mixin hover { @mixin hover {
// TODO: re-enable along with mq4-hover-shim // TODO: re-enable along with mq4-hover-shim
// @if $enable-hover-media-query { // @if $enable-hover-media-query {
@ -8,21 +9,21 @@
// } // }
// } // }
// @else { // @else {
// scss-lint:disable Indentation &:hover { @content; }
&:hover { @content }
// scss-lint:enable Indentation
// } // }
} }
@mixin hover-focus { @mixin hover-focus {
@if $enable-hover-media-query { @if $enable-hover-media-query {
&:focus { @content } &:focus {
@include hover { @content } @content;
}
@include hover { @content; }
} @else { } @else {
&:focus, &:focus,
&:hover { &:hover {
@content @content;
} }
} }
} }
@ -31,14 +32,14 @@
@if $enable-hover-media-query { @if $enable-hover-media-query {
&, &,
&:focus { &:focus {
@content @content;
} }
@include hover { @content } @include hover { @content; }
} @else { } @else {
&, &,
&:focus, &:focus,
&:hover { &:hover {
@content @content;
} }
} }
} }
@ -47,14 +48,14 @@
@if $enable-hover-media-query { @if $enable-hover-media-query {
&:focus, &:focus,
&:active { &:active {
@content @content;
} }
@include hover { @content } @include hover { @content; }
} @else { } @else {
&:focus, &:focus,
&:active, &:active,
&:hover { &:hover {
@content @content;
} }
} }
} }

View File

@ -20,15 +20,15 @@
// //
// Short retina mixin for setting background-image and -size. // Short retina mixin for setting background-image and -size.
// stylelint-disable indentation, media-query-list-comma-newline-after
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
background-image: url($file-1x); background-image: url($file-1x);
// Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
// but doesn't convert dppx=>dpi. // but doesn't convert dppx=>dpi.
// There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
// Compatibility info: http://caniuse.com/#feat=css-media-resolution // Compatibility info: https://caniuse.com/#feat=css-media-resolution
@media @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
only screen and (min-resolution: 2dppx) { // Standardized only screen and (min-resolution: 2dppx) { // Standardized
background-image: url($file-2x); background-image: url($file-2x);
background-size: $width-1x $height-1x; background-size: $width-1x $height-1x;

View File

@ -6,7 +6,6 @@
background-color: $background; background-color: $background;
} }
//scss-lint:disable QualifyingElement
a.list-group-item-#{$state}, a.list-group-item-#{$state},
button.list-group-item-#{$state} { button.list-group-item-#{$state} {
color: $color; color: $color;
@ -22,5 +21,4 @@
border-color: $color; border-color: $color;
} }
} }
// scss-lint:enable QualifyingElement
} }

View File

@ -1,7 +1,8 @@
// Navbar vertical align // Navbar vertical align
// //
// Vertically center elements in the navbar. // Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);`
// to calculate the appropriate top margin.
// @mixin navbar-vertical-align($element-height) { // @mixin navbar-vertical-align($element-height) {
// margin-top: (($navbar-height - $element-height) / 2); // margin-top: (($navbar-height - $element-height) / 2);

View File

@ -1,4 +1,3 @@
// scss-lint:disable DuplicateProperty
@mixin reset-text { @mixin reset-text {
font-family: $font-family-base; font-family: $font-family-base;
// We deliberately do NOT reset font-size or word-wrap. // We deliberately do NOT reset font-size or word-wrap.
@ -6,7 +5,7 @@
font-weight: $font-weight-normal; font-weight: $font-weight-normal;
line-height: $line-height-base; line-height: $line-height-base;
text-align: left; // Fallback for where `start` is not supported text-align: left; // Fallback for where `start` is not supported
text-align: start; text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties
text-decoration: none; text-decoration: none;
text-shadow: none; text-shadow: none;
text-transform: none; text-transform: none;

View File

@ -1,7 +1,7 @@
// Only display content to screen readers // Only display content to screen readers
// //
// See: http://a11yproject.com/posts/how-to-hide-content // See: http://a11yproject.com/posts/how-to-hide-content/
// See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/ // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
@mixin sr-only { @mixin sr-only {
position: absolute; position: absolute;

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Typography // Typography
@mixin text-emphasis-variant($parent, $color) { @mixin text-emphasis-variant($parent, $color) {

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Visibility // Visibility
@mixin invisible($visibility) { @mixin invisible($visibility) {

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
.align-baseline { vertical-align: baseline !important; } // Browser default .align-baseline { vertical-align: baseline !important; } // Browser default
.align-top { vertical-align: top !important; } .align-top { vertical-align: top !important; }
.align-middle { vertical-align: middle !important; } .align-middle { vertical-align: middle !important; }

View File

@ -1,6 +1,19 @@
// stylelint-disable declaration-no-important
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
@include bg-variant('.bg-#{$color}', $value); @include bg-variant(".bg-#{$color}", $value);
} }
.bg-white { background-color: $white !important; } @if $enable-gradients {
.bg-transparent { background-color: transparent !important; } @each $color, $value in $theme-colors {
@include bg-gradient-variant(".bg-gradient-#{$color}", $value);
}
}
.bg-white {
background-color: $white !important;
}
.bg-transparent {
background-color: transparent !important;
}

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// //
// Border // Border
// //
@ -44,9 +46,9 @@
} }
.rounded-circle { .rounded-circle {
border-radius: 50%; border-radius: 50% !important;
} }
.rounded-0 { .rounded-0 {
border-radius: 0; border-radius: 0 !important;
} }

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// //
// Utilities for common `display` values // Utilities for common `display` values
// //
@ -11,6 +13,7 @@
.d#{$infix}-inline-block { display: inline-block !important; } .d#{$infix}-inline-block { display: inline-block !important; }
.d#{$infix}-block { display: block !important; } .d#{$infix}-block { display: block !important; }
.d#{$infix}-table { display: table !important; } .d#{$infix}-table { display: table !important; }
.d#{$infix}-table-row { display: table-row !important; }
.d#{$infix}-table-cell { display: table-cell !important; } .d#{$infix}-table-cell { display: table-cell !important; }
.d#{$infix}-flex { display: flex !important; } .d#{$infix}-flex { display: flex !important; }
.d#{$infix}-inline-flex { display: inline-flex !important; } .d#{$infix}-inline-flex { display: inline-flex !important; }

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Flex variation // Flex variation
// //
// Custom styles for additional flex alignment options. // Custom styles for additional flex alignment options.

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Common values // Common values
// Sass list not in variables since it's not intended for customization. // Sass list not in variables since it's not intended for customization.

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Width and height // Width and height
@each $prop, $abbrev in (width: w, height: h) { @each $prop, $abbrev in (width: w, height: h) {

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Margin and Padding // Margin and Padding
@each $breakpoint in map-keys($grid-breakpoints) { @each $breakpoint in map-keys($grid-breakpoints) {
@ -7,7 +9,7 @@
@each $prop, $abbrev in (margin: m, padding: p) { @each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $length in $spacers { @each $size, $length in $spacers {
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
.#{$abbrev}t#{$infix}-#{$size}, .#{$abbrev}t#{$infix}-#{$size},
.#{$abbrev}y#{$infix}-#{$size} { .#{$abbrev}y#{$infix}-#{$size} {
#{$prop}-top: $length !important; #{$prop}-top: $length !important;
@ -28,7 +30,7 @@
} }
// Some special margin utils // Some special margin utils
.m#{$infix}-auto { margin: auto !important; } .m#{$infix}-auto { margin: auto !important; }
.mt#{$infix}-auto, .mt#{$infix}-auto,
.my#{$infix}-auto { .my#{$infix}-auto {
margin-top: auto !important; margin-top: auto !important;

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// //
// Text // Text
// //
@ -38,7 +40,7 @@
.text-white { color: #fff !important; } .text-white { color: #fff !important; }
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
@include text-emphasis-variant('.text-#{$color}', $value); @include text-emphasis-variant(".text-#{$color}", $value);
} }
.text-muted { color: $text-muted !important; } .text-muted { color: $text-muted !important; }

View File

@ -15,7 +15,7 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.1.0 * @version 3.2.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
@ -42,10 +42,11 @@ do_action( 'woocommerce_before_mini_cart' ); ?>
<li class="woocommerce-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>"> <li class="woocommerce-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>">
<?php <?php
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
esc_attr__( 'Remove this item', 'woocommerce' ), __( 'Remove this item', 'woocommerce' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $cart_item_key ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );
?> ?>

View File

@ -13,13 +13,24 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.1.0 * @version 3.2.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly exit;
}
if ( $max_value && $min_value === $max_value ) {
?>
<div class="quantity hidden">
<input type="hidden" id="<?php echo esc_attr( $input_id ); ?>" class="qty" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $min_value ); ?>" />
</div>
<?php
} else {
?>
<div class="quantity">
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></label>
<input type="number" id="<?php echo esc_attr( $input_id ); ?>" class="input-text qty text" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $input_value ); ?>" title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ) ?>" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" />
</div>
<?php
} }
?>
<div class="quantity">
<input type="number" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( $max_value ); ?>" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $input_value ); ?>" title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ) ?>" class="input-text qty text form-control" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" />
</div>

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Downloads * Downloads
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability. *
* Shows downloads on the account page. * Shows downloads on the account page.
* *
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/downloads.php. * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/downloads.php.
@ -15,7 +15,7 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.1.0 * @version 3.2.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@ -31,67 +31,10 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
<?php do_action( 'woocommerce_before_available_downloads' ); ?> <?php do_action( 'woocommerce_before_available_downloads' ); ?>
<table class="woocommerce-MyAccount-downloads shop_table shop_table_responsive"> <?php do_action( 'woocommerce_available_downloads', $downloads ); ?>
<thead>
<tr>
<?php foreach ( wc_get_account_downloads_columns() as $column_id => $column_name ) : ?>
<th class="<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<?php foreach ( $downloads as $download ) : ?>
<tr>
<?php foreach ( wc_get_account_downloads_columns() as $column_id => $column_name ) : ?>
<td class="<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
<?php
if ( has_action( 'woocommerce_account_downloads_column_' . $column_id ) ) {
do_action( 'woocommerce_account_downloads_column_' . $column_id, $download );
} else {
switch ( $column_id ) {
case 'download-product' : ?>
<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>">
<?php echo esc_html( $download['product_name'] ); ?>
</a>
<?php break;
case 'download-file' : ?>
<a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file">
<?php echo esc_html( $download['file']['name'] ); ?>
</a>
<?php break;
case 'download-remaining' :
echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : __( '&infin;', 'woocommerce' );
break;
case 'download-expires' : ?>
<?php if ( ! empty( $download['access_expires'] ) ) : ?>
<time datetime="<?php echo date( 'Y-m-d', strtotime( $download['access_expires'] ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ); ?></time>
<?php else : ?>
<?php _e( 'Never', 'woocommerce' ); ?>
<?php endif; ?>
<?php break;
case 'download-actions' : ?>
<?php
$actions = array(
'download' => array(
'url' => $download['download_url'],
'name' => __( 'Download', 'woocommerce' ),
),
);
if ( $actions = apply_filters( 'woocommerce_account_download_actions', $actions, $download ) ) {
foreach ( $actions as $key => $action ) {
echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-outline-primary' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
}
}
?>
<?php break;
}
}
?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>
<?php do_action( 'woocommerce_after_available_downloads' ); ?> <?php do_action( 'woocommerce_after_available_downloads' ); ?>
<?php else : ?> <?php else : ?>
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info"> <div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
<a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"> <a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">

View File

@ -13,7 +13,7 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.1.0 * @version 3.2.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@ -36,17 +36,17 @@ if ( ! defined( 'ABSPATH' ) ) {
<h2><?php _e( 'Login', 'woocommerce' ); ?></h2> <h2><?php _e( 'Login', 'woocommerce' ); ?></h2>
<form method="post" class="login"> <form class="woocommerce-form woocommerce-form-login login" method="post">
<?php do_action( 'woocommerce_login_form_start' ); ?> <?php do_action( 'woocommerce_login_form_start' ); ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide"> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label> <label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" /> <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
</p> </p>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide"> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label> <label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="password" name="password" id="password" /> <input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" />
</p> </p>
<?php do_action( 'woocommerce_login_form' ); ?> <?php do_action( 'woocommerce_login_form' ); ?>
@ -54,8 +54,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<p class="form-row"> <p class="form-row">
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?> <?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
<label for="rememberme" class="inline"> <label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
<input class="woocommerce-Input woocommerce-Input--checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'woocommerce' ); ?> <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php _e( 'Remember me', 'woocommerce' ); ?></span>
</label> </label>
</p> </p>
<p class="woocommerce-LostPassword lost_password"> <p class="woocommerce-LostPassword lost_password">
@ -80,34 +80,30 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?> <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide"> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label> <label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" /> <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
</p> </p>
<?php endif; ?> <?php endif; ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide"> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label> <label for="reg_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php if ( ! empty( $_POST['email'] ) ) echo esc_attr( $_POST['email'] ); ?>" /> <input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
</p> </p>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?> <?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide"> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label> <label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" /> <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
</p> </p>
<?php endif; ?> <?php endif; ?>
<!-- Spam Trap -->
<div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>
<?php do_action( 'woocommerce_register_form' ); ?> <?php do_action( 'woocommerce_register_form' ); ?>
<?php do_action( 'register_form' ); ?>
<p class="woocomerce-FormRow form-row"> <p class="woocommerce-FormRow form-row">
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?> <?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
<input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>" /> <input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>" />
</p> </p>

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Orders * Orders
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability. *
* Shows orders on the account page. * Shows orders on the account page.
* *
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/orders.php. * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/orders.php.
@ -15,7 +15,7 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.1.0 * @version 3.2.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@ -26,7 +26,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
<?php if ( $has_orders ) : ?> <?php if ( $has_orders ) : ?>
<table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table table-hover table-striped"> <table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">
<thead> <thead>
<tr> <tr>
<?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?> <?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?>
@ -65,34 +65,13 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
<?php elseif ( 'order-actions' === $column_id ) : ?> <?php elseif ( 'order-actions' === $column_id ) : ?>
<?php <?php
$actions = array( $actions = wc_get_account_orders_actions( $order );
'pay' => array(
'url' => $order->get_checkout_payment_url(),
'name' => __( 'Pay', 'woocommerce' )
),
'view' => array(
'url' => $order->get_view_order_url(),
'name' => __( 'View', 'woocommerce' )
),
'cancel' => array(
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
'name' => __( 'Cancel', 'woocommerce' )
)
);
if ( ! $order->needs_payment() ) { if ( ! empty( $actions ) ) {
unset( $actions['pay'] ); foreach ( $actions as $key => $action ) {
} echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
if ( ! in_array( $order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) {
unset( $actions['cancel'] );
}
if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
foreach ( $actions as $key => $action ) {
echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
}
} }
}
?> ?>
<?php endif; ?> <?php endif; ?>
</td> </td>