Merge pull request #1164 from IanDelMar/deps

Update dependencies incl. Bootstrap
This commit is contained in:
UnderstrapFramework 2020-05-18 15:13:23 +01:00 committed by GitHub
commit 6d908a748e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 3209 additions and 2882 deletions

File diff suppressed because one or more lines are too long

8
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

@ -7,6 +7,7 @@
"paths": {
"js": "./js",
"css": "./css",
"fonts": "./fonts",
"img": "./img",
"imgsrc": "./src/img",
"sass": "./sass",

View File

@ -1,261 +1,304 @@
// Defining requirements
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var sass = require('gulp-sass');
var babel = require('gulp-babel');
var postcss = require('gulp-postcss');
var touch = require('gulp-touch-fd');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync').create();
var del = require('del');
var cleanCSS = require('gulp-clean-css');
var replace = require('gulp-replace');
var autoprefixer = require('autoprefixer');
var gulp = require( 'gulp' );
var plumber = require( 'gulp-plumber' );
var sass = require( 'gulp-sass' );
var babel = require( 'gulp-babel' );
var postcss = require( 'gulp-postcss' );
var touch = require( 'gulp-touch-fd' );
var rename = require( 'gulp-rename' );
var concat = require( 'gulp-concat' );
var uglify = require( 'gulp-uglify' );
var imagemin = require( 'gulp-imagemin' );
var sourcemaps = require( 'gulp-sourcemaps' );
var browserSync = require( 'browser-sync' ).create();
var del = require( 'del' );
var cleanCSS = require( 'gulp-clean-css' );
var replace = require( 'gulp-replace' );
var autoprefixer = require( 'autoprefixer' );
// Configuration file to keep your code DRY
var cfg = require('./gulpconfig.json');
var cfg = require( './gulpconfig.json' );
var paths = cfg.paths;
// Run:
// gulp sass
// Compiles SCSS files in CSS
gulp.task('sass', function () {
/**
* Compiles .scss to .css files.
*
* Run: gulp sass
*/
gulp.task( 'sass', function() {
var stream = gulp
.src(paths.sass + '/*.scss')
.src( paths.sass + '/*.scss' )
.pipe(
plumber({
errorHandler: function (err) {
console.log(err);
this.emit('end');
}
})
plumber( {
errorHandler( err ) {
console.log( err );
this.emit( 'end' );
},
} )
)
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(sass({ errLogToConsole: true }))
.pipe(postcss([autoprefixer()]))
.pipe(sourcemaps.write(undefined, { sourceRoot: null }))
.pipe(gulp.dest(paths.css))
.pipe(touch());
.pipe( sourcemaps.init( { loadMaps: true } ) )
.pipe( sass( { errLogToConsole: true } ) )
.pipe( postcss( [ autoprefixer() ] ) )
.pipe( sourcemaps.write( undefined, { sourceRoot: null } ) )
.pipe( gulp.dest( paths.css ) )
.pipe( touch() );
return stream;
});
} );
// Run:
// gulp watch
// Starts watcher. Watcher runs gulp sass task on changes
gulp.task('watch', function () {
gulp.watch([`${paths.sass}/**/*.scss`, `${paths.sass}/*.scss`], gulp.series('styles'));
gulp.task( 'watch', function() {
gulp.watch(
[ paths.sass + '/**/*.scss', paths.sass + '/*.scss' ],
gulp.series( 'styles' )
);
gulp.watch(
[
`${paths.dev}/js/**/*.js`,
paths.dev + '/js/**/*.js',
'js/**/*.js',
'!js/theme.js',
'!js/theme.min.js'
'!js/theme.min.js',
],
gulp.series('scripts')
gulp.series( 'scripts' )
);
//Inside the watch task.
gulp.watch(`${paths.imgsrc}/**`, gulp.series('imagemin-watch'));
});
// Inside the watch task.
gulp.watch( paths.imgsrc + '/**', gulp.series( 'imagemin-watch' ) );
} );
// Run:
// gulp imagemin
// Running image optimizing task
gulp.task('imagemin', function () {
/**
* Optimizes images and copies images from src to dest.
*
* Run: gulp imagemin
*/
gulp.task( 'imagemin', () =>
gulp
.src(`${paths.imgsrc}/**`)
.pipe(imagemin())
.pipe(gulp.dest(paths.img));
});
.src( paths.imgsrc + '/**' )
.pipe(
imagemin(
[
// Bundled plugins
imagemin.gifsicle( {
interlaced: true,
optimizationLevel: 3,
} ),
imagemin.mozjpeg( {
quality: 100,
progressive: true,
} ),
imagemin.optipng(),
imagemin.svgo(),
],
{
verbose: true,
}
)
)
.pipe( gulp.dest( paths.img ) )
);
/**
* Ensures the 'imagemin' task is complete before reloading browsers
* @verbose
*/
gulp.task(
'imagemin-watch',
gulp.series('imagemin', function () {
gulp.series( 'imagemin', function() {
browserSync.reload();
})
} )
);
gulp.task('minifycss', function () {
/**
* Minifies css files.
*
* Run: gulp minifycss
*/
gulp.task( 'minifycss', function() {
return gulp
.src([
`${paths.css}/custom-editor-style.css`,
`${paths.css}/theme.css`,
])
.pipe(sourcemaps.init({
loadMaps: true
}))
.pipe(cleanCSS({
compatibility: '*'
}))
.src( [
paths.css + '/custom-editor-style.css',
paths.css + '/theme.css',
] )
.pipe(
plumber({
errorHandler: function (err) {
console.log(err);
this.emit('end');
}
})
sourcemaps.init( {
loadMaps: true,
} )
)
.pipe(rename({ suffix: '.min' }))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.css))
.pipe(touch());
});
.pipe(
cleanCSS( {
compatibility: '*',
} )
)
.pipe(
plumber( {
errorHandler( err ) {
console.log( err );
this.emit( 'end' );
},
} )
)
.pipe( rename( { suffix: '.min' } ) )
.pipe( sourcemaps.write( './' ) )
.pipe( gulp.dest( paths.css ) )
.pipe( touch() );
} );
/**
* Delete minified CSS files and their maps
*
* Run: gulp cleancss
*/
gulp.task('cleancss', function () {
return del(paths.css + '/*.min.css*');
});
gulp.task( 'cleancss', function() {
return del( paths.css + '/*.min.css*' );
} );
gulp.task('styles', function (callback) {
gulp.series('sass', 'minifycss')(callback);
});
/**
* Compiles .scss to .css minifies css files.
*
* Run: gulp styles
*/
gulp.task( 'styles', function( callback ) {
gulp.series( 'sass', 'minifycss' )( callback );
} );
// Run:
// gulp browser-sync
// Starts browser-sync task for starting the server.
gulp.task('browser-sync', function () {
browserSync.init(cfg.browserSyncWatchFiles, cfg.browserSyncOptions);
});
gulp.task( 'browser-sync', function() {
browserSync.init( cfg.browserSyncWatchFiles, cfg.browserSyncOptions );
} );
// Run:
// gulp scripts.
// Uglifies and concat all JS files into one
gulp.task('scripts', function () {
gulp.task( 'scripts', function() {
var scripts = [
// Start - All BS4 stuff
`${paths.dev}/js/bootstrap4/bootstrap.bundle.js`,
`${paths.dev}/js/themejs/*.js`,
paths.dev + '/js/bootstrap4/bootstrap.bundle.js',
paths.dev + '/js/themejs/*.js',
// End - All BS4 stuff
`${paths.dev}/js/skip-link-focus-fix.js`,
paths.dev + '/js/skip-link-focus-fix.js',
// Adding currently empty javascript file to add on for your own themes´ customizations
// Please add any customizations to this .js file only!
`${paths.dev}/js/custom-javascript.js`
paths.dev + '/js/custom-javascript.js',
];
gulp
.src(scripts, { allowEmpty: true })
.pipe(babel({ presets: ['@babel/preset-env'] }))
.pipe(concat('theme.min.js'))
.pipe(uglify())
.pipe(gulp.dest(paths.js));
.src( scripts, { allowEmpty: true } )
.pipe( babel( { presets: ['@babel/preset-env'] } ) )
.pipe( concat( 'theme.min.js' ) )
.pipe( uglify() )
.pipe( gulp.dest( paths.js ) );
return gulp
.src(scripts, { allowEmpty: true })
.pipe(babel())
.pipe(concat('theme.js'))
.pipe(gulp.dest(paths.js));
});
.src( scripts, { allowEmpty: true } )
.pipe( babel() )
.pipe( concat( 'theme.js' ) )
.pipe( gulp.dest( paths.js ) );
} );
// Deleting any file inside the /src folder
gulp.task('clean-source', function () {
return del(['src/**/*']);
});
gulp.task( 'clean-source', function() {
return del( [ 'src/**/*' ] );
} );
// Run:
// gulp watch-bs
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
gulp.task('watch-bs', gulp.parallel('browser-sync', 'watch'));
gulp.task( 'watch-bs', gulp.parallel( 'browser-sync', 'watch' ) );
// Run:
// gulp copy-assets.
// Copy all needed dependency assets files from node_modules to theme's /js, /scss and /fonts folder. Run this task after npm update
////////////////// All Bootstrap SASS Assets /////////////////////////
gulp.task('copy-assets', function (done) {
gulp.task( 'copy-assets', function( done ) {
////////////////// All Bootstrap 4 Assets /////////////////////////
// Copy all JS files
var stream = gulp
.src(`${paths.node}/bootstrap/dist/js/**/*.js`)
.pipe(gulp.dest(`${paths.dev}/js/bootstrap4`));
.src( paths.node + '/bootstrap/dist/js/**/*.js' )
.pipe( gulp.dest( paths.dev + '/js/bootstrap4' ) );
// Copy all Bootstrap SCSS files
gulp
.src(`${paths.node}/bootstrap/scss/**/*.scss`)
.pipe(gulp.dest(`${paths.dev}/sass/bootstrap4`));
.src( paths.node + '/bootstrap/scss/**/*.scss' )
.pipe( gulp.dest( paths.dev + '/sass/bootstrap4' ) );
////////////////// End Bootstrap 4 Assets /////////////////////////
// Copy all Font Awesome Fonts
gulp
.src(`${paths.node}/font-awesome/fonts/**/*.{ttf,woff,woff2,eot,svg}`)
.pipe(gulp.dest('./fonts'));
.src( paths.node + '/font-awesome/fonts/**/*.{ttf,woff,woff2,eot,svg}' )
.pipe( gulp.dest( paths.fonts ) );
// Copy all Font Awesome SCSS files
gulp
.src(`${paths.node}/font-awesome/scss/*.scss`)
.pipe(gulp.dest(`${paths.dev}/sass/fontawesome`));
.src( paths.node + '/font-awesome/scss/*.scss' )
.pipe( gulp.dest( paths.dev + '/sass/fontawesome' ) );
// _s SCSS files
gulp
.src(`${paths.node}/undescores-for-npm/sass/media/*.scss`)
.pipe(gulp.dest(`${paths.dev}/sass/underscores`));
.src( paths.node + '/undescores-for-npm/sass/media/*.scss' )
.pipe( gulp.dest( paths.dev + '/sass/underscores' ) );
// _s JS files into /src/js
gulp
.src(`${paths.node}/undescores-for-npm/js/skip-link-focus-fix.js`)
.pipe(gulp.dest(`${paths.dev}/js`));
.src( paths.node + '/undescores-for-npm/js/skip-link-focus-fix.js' )
.pipe( gulp.dest( paths.dev + '/js' ) );
done();
});
} );
// Deleting the files distributed by the copy-assets task
gulp.task('clean-vendor-assets', function () {
return del([
`${paths.dev}/js/bootstrap4/**`,
`${paths.dev}/sass/bootstrap4/**`,
'./fonts/*wesome*.{ttf,woff,woff2,eot,svg}',
`${paths.dev}/sass/fontawesome/**`,
`${paths.dev}/sass/underscores/**`,
`${paths.dev}/js/skip-link-focus-fix.js`,
`${paths.js}/**/skip-link-focus-fix.js`,
`${paths.js}/**/popper.min.js`,
`${paths.js}/**/popper.js`,
paths.vendor !== '' ? paths.js + paths.vendor + '/**' : ''
]);
});
gulp.task( 'clean-vendor-assets', function() {
return del( [
paths.dev + '/js/bootstrap4',
paths.dev + '/sass/bootstrap4',
paths.fonts + '/*wesome*.{ttf,woff,woff2,eot,svg}',
paths.dev + '/sass/fontawesome',
paths.dev + '/sass/underscores',
paths.dev + '/js/skip-link-focus-fix.js',
paths.js + '/**/skip-link-focus-fix.js',
paths.js + '/**/popper.min.js',
paths.js + '/**/popper.js',
paths.js + paths.vendor,
] );
} );
// Deleting any file inside the /dist folder
gulp.task('clean-dist', function () {
return del([paths.dist + '/**']);
});
/**
* Deletes all files inside the dist folder and the folder itself.
*
* Run: gulp clean-dist
*/
gulp.task( 'clean-dist', function() {
return del( paths.dist );
} );
// Run
// gulp dist
// Copies the files to the /dist folder for distribution as simple theme
// Copies the files to the dist folder for distribution as simple theme
gulp.task(
'dist',
gulp.series(['clean-dist'], function () {
gulp.series( [ 'clean-dist' ], function() {
return gulp
.src(
[
'**/*',
`!${paths.node}`,
`!${paths.node}/**`,
`!${paths.dev}`,
`!${paths.dev}/**`,
`!${paths.dist}`,
`!${paths.dist}/**`,
`!${paths.distprod}`,
`!${paths.distprod}/**`,
`!${paths.sass}`,
`!${paths.sass}/**`,
`!${paths.composer}`,
`!${paths.composer}/**`,
'!readme.txt',
'!README.md',
'!' + paths.node,
'!' + paths.node + '/**',
'!' + paths.dev,
'!' + paths.dev + '/**',
'!' + paths.dist,
'!' + paths.dist + '/**',
'!' + paths.distprod,
'!' + paths.distprod + '/**',
'!' + paths.sass,
'!' + paths.sass + '/**',
'!' + paths.composer,
'!' + paths.composer + '/**',
'!+(readme|README).+(txt|md)',
'!*.+(json|js|lock|xml)',
'!CHANGELOG.md',
],
@ -269,9 +312,13 @@ gulp.task(
)
)
.pipe(
replace('/js/popper.min.js', '/js' + paths.vendor + '/popper.min.js', {
skipBinary: true
})
replace(
'/js/popper.min.js',
'/js' + paths.vendor + '/popper.min.js',
{
skipBinary: true,
}
)
)
.pipe(
replace(
@ -280,45 +327,49 @@ gulp.task(
{ skipBinary: true }
)
)
.pipe(gulp.dest(paths.dist))
.pipe(touch());
})
.pipe( gulp.dest( paths.dist ) )
.pipe( touch() );
} )
);
// Deleting any file inside the /dist-product folder
gulp.task('clean-dist-product', function () {
return del([paths.distprod + '/**']);
});
/**
* Deletes all files inside the dist-product folder and the folder itself.
*
* Run: gulp clean-dist-product
*/
gulp.task( 'clean-dist-product', function() {
return del( paths.distprod );
} );
// Run
// gulp dist-product
// Copies the files to the /dist-prod folder for distribution as theme with all assets
gulp.task(
'dist-product',
gulp.series(['clean-dist-product'], function () {
gulp.series( [ 'clean-dist-product' ], function() {
return gulp
.src([
.src( [
'**/*',
`!${paths.node}`,
`!${paths.node}/**`,
`!${paths.composer}`,
`!${paths.composer}/**`,
`!${paths.dist}`,
`!${paths.dist}/**`,
`!${paths.distprod}`,
`!${paths.distprod}/**`,
])
.pipe(gulp.dest(paths.distprod))
.pipe(touch());
})
'!' + paths.node,
'!' + paths.node + '/**',
'!' + paths.composer,
'!' + paths.composer + '/**',
'!' + paths.dist,
'!' + paths.dist + '/**',
'!' + paths.distprod,
'!' + paths.distprod + '/**',
] )
.pipe( gulp.dest( paths.distprod ) )
.pipe( touch() );
} )
);
// Run
// gulp compile
// Compiles the styles and scripts and runs the dist task
gulp.task('compile', gulp.series('styles', 'scripts', 'dist'));
gulp.task( 'compile', gulp.series( 'styles', 'scripts', 'dist' ) );
// Run:
// gulp
// Starts watcher (default task)
gulp.task('default', gulp.series('watch'));
gulp.task( 'default', gulp.series( 'watch' ) );

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

1585
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
"postinstall": "gulp copy-assets"
},
"engines": {
"node": ">=10",
"npm": ">=2.1.8"
},
"repository": {
@ -28,21 +29,21 @@
"homepage": "https://understrap.com",
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"autoprefixer": "^9.7.6",
"bootstrap": "^4.4.1",
"@babel/core": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"autoprefixer": "^9.8.0",
"bootstrap": "^4.5.0",
"browser-sync": "^2.26.7",
"del": "^4.1.1",
"del": "^5.1.0",
"font-awesome": "^4.7.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-imagemin": "^5.0.3",
"gulp-imagemin": "^7.1.0",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^1.4.0",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^2.6.5",

View File

@ -1,7 +1,7 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

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

@ -10,6 +10,8 @@
}
.breadcrumb-item {
display: flex;
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
padding-left: $breadcrumb-item-padding;

View File

@ -10,9 +10,9 @@
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
text-decoration: if($link-decoration == none, null, none);
white-space: $btn-white-space;
vertical-align: middle;
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@ -37,12 +37,16 @@
@include box-shadow(none);
}
&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active {
@include box-shadow($btn-active-box-shadow);
&:not(:disabled):not(.disabled) {
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
&:active,
&.active {
@include box-shadow($btn-active-box-shadow);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
}
}
@ -89,7 +93,6 @@ fieldset:disabled a.btn {
&:focus,
&.focus {
text-decoration: $link-hover-decoration;
box-shadow: none;
}
&:disabled,

View File

@ -19,15 +19,18 @@
margin-left: 0;
}
> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
}
}
> .list-group {
border-top: inherit;
border-bottom: inherit;
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
}
&:last-child {
border-bottom-width: 0;
@include border-bottom-radius($card-inner-border-radius);
}
}
}
@ -90,6 +93,7 @@
.card-footer {
padding: $card-spacer-y $card-spacer-x;
color: $card-cap-color;
background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color;

View File

@ -30,7 +30,6 @@ button.close {
padding: 0;
background-color: transparent;
border: 0;
appearance: none;
}
// Future-proof disabling of clicks on `<a>` elements

View File

@ -237,8 +237,9 @@
border-color: $custom-select-focus-border-color;
outline: 0;
@if $enable-shadows {
box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
@include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $custom-select-focus-box-shadow;
}

View File

@ -128,6 +128,7 @@
font-weight: $font-weight-normal;
color: $dropdown-link-color;
text-align: inherit; // For `<button>`s
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap; // prevent links from randomly breaking onto new lines
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
@ -176,7 +177,7 @@
// Dropdown section headers
.dropdown-header {
display: block;
padding: $dropdown-padding-y $dropdown-item-padding-x;
padding: $dropdown-header-padding;
margin-bottom: 0; // for use with heading elements
@include font-size($font-size-sm);
color: $dropdown-header-color;

View File

@ -59,6 +59,15 @@
}
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
&.form-control {
appearance: none; // Fix appearance for date inputs in Safari
}
}
select.form-control {
&:focus::-ms-value {
// Suppress the nested default white text on blue background highlight given to

View File

@ -23,10 +23,12 @@
// Starts at zero
// Used to ensure the min-width of the lowest breakpoint starts at 0.
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
@if length($map) > 0 {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
}
}
}
@ -52,7 +54,12 @@
@function escape-svg($string) {
@if str-index($string, "data:image/svg+xml") {
@each $char, $encoded in $escaped-characters {
$string: str-replace($string, $char, $encoded);
// Do not escape the url brackets
@if str-index($string, "url(") == 1 {
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
} @else {
$string: str-replace($string, $char, $encoded);
}
}
}

View File

@ -25,11 +25,19 @@
max-width: $container-max-width;
}
// Extend each breakpoint which is smaller or equal to the current breakpoint
$extend-breakpoint: true;
@each $name, $width in $grid-breakpoints {
@if ($container-max-width > $width or $breakpoint == $name) {
@if ($extend-breakpoint) {
.container#{breakpoint-infix($name, $grid-breakpoints)} {
@extend %responsive-container-#{$breakpoint};
}
// Once the current breakpoint is reached, stop extending
@if ($breakpoint == $name) {
$extend-breakpoint: false;
}
}
}
}

View File

@ -16,7 +16,8 @@
> .custom-select,
> .custom-file {
position: relative; // For focus state's z-index
flex: 1 1 0%;
flex: 1 1 auto;
width: 1%;
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
margin-bottom: 0;

View File

@ -9,6 +9,7 @@
// No need to set list-style: none; since .list-group-item is block level
padding-left: 0; // reset padding because ul and ol
margin-bottom: 0;
@include border-radius($list-group-border-radius);
}
@ -46,15 +47,16 @@
display: block;
padding: $list-group-item-padding-y $list-group-item-padding-x;
color: $list-group-color;
text-decoration: if($link-decoration == none, null, none);
background-color: $list-group-bg;
border: $list-group-border-width solid $list-group-border-color;
&:first-child {
@include border-top-radius($list-group-border-radius);
@include border-top-radius(inherit);
}
&:last-child {
@include border-bottom-radius($list-group-border-radius);
@include border-bottom-radius(inherit);
}
&.disabled,
@ -94,7 +96,7 @@
.list-group-horizontal#{$infix} {
flex-direction: row;
.list-group-item {
> .list-group-item {
&:first-child {
@include border-bottom-left-radius($list-group-border-radius);
@include border-top-right-radius(0);
@ -130,18 +132,12 @@
// useful within other components (e.g., cards).
.list-group-flush {
.list-group-item {
border-right-width: 0;
border-left-width: 0;
@include border-radius(0);
@include border-radius(0);
&:first-child {
border-top-width: 0;
}
}
> .list-group-item {
border-width: 0 0 $list-group-border-width;
&:last-child {
.list-group-item:last-child {
&:last-child {
border-bottom-width: 0;
}
}

View File

@ -83,6 +83,7 @@
&::before {
display: block; // IE10
height: subtract(100vh, $modal-dialog-margin * 2);
height: min-content; // Reset height to 0 except on IE
content: "";
}
@ -217,6 +218,7 @@
&::before {
height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
height: min-content;
}
}

View File

@ -14,6 +14,7 @@
.nav-link {
display: block;
padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: if($link-decoration == none, null, none);
@include hover-focus() {
text-decoration: none;

View File

@ -11,6 +11,7 @@
margin-left: -$pagination-border-width;
line-height: $pagination-line-height;
color: $pagination-color;
text-decoration: if($link-decoration == none, null, none);
background-color: $pagination-bg;
border: $pagination-border-width solid $pagination-border-color;

View File

@ -10,6 +10,7 @@
display: flex;
height: $progress-height;
overflow: hidden; // force rounded corners by cropping it
line-height: 0;
@include font-size($progress-font-size);
background-color: $progress-bg;
@include border-radius($progress-border-radius);

View File

@ -229,6 +229,9 @@ pre {
margin-bottom: 1rem;
// Don't allow content to break outside
overflow: auto;
// Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
// making it impossible to interact with the content
-ms-overflow-style: scrollbar;
}
@ -330,6 +333,13 @@ select {
text-transform: none; // Remove the inheritance of text transform in Firefox
}
// Set the cursor for non-`<button>` buttons
//
// Details at https://github.com/twbs/bootstrap/pull/30562
[role="button"] {
cursor: pointer;
}
// Remove the inheritance of word-wrap in Safari.
//
// Details at https://github.com/twbs/bootstrap/issues/24990
@ -376,18 +386,6 @@ input[type="checkbox"] {
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
// bug where setting a custom line-height prevents text from being vertically
// centered within the input.
// See https://bugs.webkit.org/show_bug.cgi?id=139848
// and https://github.com/twbs/bootstrap/issues/11266
-webkit-appearance: listbox;
}
textarea {
overflow: auto; // Remove the default vertical scrollbar in IE.
// Textareas should really only resize vertically so they don't break their (horizontal) containers.

View File

@ -34,6 +34,7 @@
}
50% {
opacity: 1;
transform: none;
}
}

View File

@ -6,12 +6,13 @@
@import "utilities/embed";
@import "utilities/flex";
@import "utilities/float";
@import "utilities/interactions";
@import "utilities/overflow";
@import "utilities/position";
@import "utilities/screenreaders";
@import "utilities/shadows";
@import "utilities/sizing";
@import "utilities/stretched-link";
@import "utilities/spacing";
@import "utilities/stretched-link";
@import "utilities/text";
@import "utilities/visibility";

View File

@ -106,6 +106,8 @@ $escaped-characters: (
("<","%3c"),
(">","%3e"),
("#","%23"),
("(","%28"),
(")","%29"),
) !default;
@ -786,6 +788,7 @@ $dropdown-item-padding-y: .25rem !default;
$dropdown-item-padding-x: 1.5rem !default;
$dropdown-header-color: $gray-600 !default;
$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;
// Pagination
@ -1135,6 +1138,7 @@ $pre-scrollable-max-height: 340px !default;
$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
$overflows: auto, hidden !default;
$positions: static, relative, absolute, fixed, sticky !default;
$user-selects: all, auto, none !default;
// Printing

View File

@ -1,7 +1,7 @@
/*!
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Grid v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

View File

@ -1,7 +1,7 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 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)
*/

View File

@ -1,7 +1,7 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

View File

@ -15,8 +15,9 @@
@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
}
@mixin bg-gradient-variant($parent, $color) {
@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
}
@include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
}

View File

@ -1,9 +1,22 @@
// stylelint-disable property-blacklist
// Single side border-radius
// Helper function to replace negative values with 0
@function valid-radius($radius) {
$return: ();
@each $value in $radius {
@if type-of($value) == number {
$return: append($return, max($value, 0));
} @else {
$return: append($return, $value);
}
}
@return $return;
}
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
@if $enable-rounded {
border-radius: $radius;
border-radius: valid-radius($radius);
}
@else if $fallback-border-radius != false {
border-radius: $fallback-border-radius;
@ -12,52 +25,52 @@
@mixin border-top-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-top-right-radius: $radius;
border-top-left-radius: valid-radius($radius);
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-right-radius($radius) {
@if $enable-rounded {
border-top-right-radius: $radius;
border-bottom-right-radius: $radius;
border-top-right-radius: valid-radius($radius);
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-radius($radius) {
@if $enable-rounded {
border-bottom-right-radius: $radius;
border-bottom-left-radius: $radius;
border-bottom-right-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-left-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-bottom-left-radius: $radius;
border-top-left-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-top-left-radius($radius) {
@if $enable-rounded {
border-top-left-radius: $radius;
border-top-left-radius: valid-radius($radius);
}
}
@mixin border-top-right-radius($radius) {
@if $enable-rounded {
border-top-right-radius: $radius;
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-right-radius($radius) {
@if $enable-rounded {
border-bottom-right-radius: $radius;
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-left-radius($radius) {
@if $enable-rounded {
border-bottom-left-radius: $radius;
border-bottom-left-radius: valid-radius($radius);
}
}

View File

@ -20,10 +20,10 @@
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@ -51,10 +51,10 @@
border-color: $active-border;
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@ -90,10 +90,10 @@
border-color: $active-border;
&:focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
}

View File

@ -16,10 +16,10 @@
background-color: $input-focus-bg;
border-color: $input-focus-border-color;
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: $input-box-shadow, $input-focus-box-shadow;
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $input-focus-box-shadow;
}
}

View File

@ -15,12 +15,15 @@
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
// Allow columns to stretch full width below their breakpoints
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@extend %grid-column;
@if $columns > 0 {
// Allow columns to stretch full width below their breakpoints
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@extend %grid-column;
}
}
}
.col#{$infix},
.col#{$infix}-auto {
@extend %grid-column;
@ -31,12 +34,15 @@
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410
max-width: 100%;
}
@for $i from 1 through $grid-row-columns {
.row-cols#{$infix}-#{$i} {
@include row-cols($i);
@if $grid-row-columns > 0 {
@for $i from 1 through $grid-row-columns {
.row-cols#{$infix}-#{$i} {
@include row-cols($i);
}
}
}
@ -44,9 +50,11 @@
@include make-col-auto();
}
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@include make-col($i, $columns);
@if $columns > 0 {
@for $i from 1 through $columns {
.col#{$infix}-#{$i} {
@include make-col($i, $columns);
}
}
}
@ -58,11 +66,13 @@
.order#{$infix}-#{$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);
@if $columns > 0 {
// `$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

@ -1,16 +1,26 @@
// stylelint-disable property-blacklist
@mixin transition($transition...) {
@if $enable-transitions {
@if length($transition) == 0 {
transition: $transition-base;
} @else {
transition: $transition;
@if length($transition) == 0 {
$transition: $transition-base;
}
@if length($transition) > 1 {
@each $value in $transition {
@if $value == null or $value == none {
@warn "The keyword 'none' or 'null' must be used as a single argument.";
}
}
}
@if $enable-prefers-reduced-motion-media-query {
@media (prefers-reduced-motion: reduce) {
transition: none;
@if $enable-transitions {
@if nth($transition, 1) != null {
transition: $transition;
}
@if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
@media (prefers-reduced-motion: reduce) {
transition: none;
}
}
}
}

View File

@ -6,7 +6,7 @@
@if $enable-gradients {
@each $color, $value in $theme-colors {
@include bg-gradient-variant(".bg-gradient-#{$color}", $value);
@include bg-gradient-variant(".bg-gradient-#{$color}", $value, true);
}
}

View File

@ -0,0 +1,5 @@
// stylelint-disable declaration-no-important
@each $value in $user-selects {
.user-select-#{$value} { user-select: $value !important; }
}

View File

@ -63,8 +63,7 @@
.text-decoration-none { text-decoration: none !important; }
.text-break {
word-break: break-word !important; // IE & < Edge 18
overflow-wrap: break-word !important;
word-wrap: break-word !important;
}
// Reset