├── test
├── dummy_rails
│ ├── log
│ │ └── .keep
│ ├── public
│ │ └── favicon.ico
│ ├── app
│ │ ├── assets
│ │ │ ├── images
│ │ │ │ └── .keep
│ │ │ ├── stylesheets
│ │ │ │ ├── .browserslistrc
│ │ │ │ └── application.sass
│ │ │ ├── config
│ │ │ │ └── manifest.js
│ │ │ └── javascripts
│ │ │ │ └── application.js
│ │ ├── helpers
│ │ │ └── application_helper.rb
│ │ ├── controllers
│ │ │ ├── pages_controller.rb
│ │ │ └── application_controller.rb
│ │ └── views
│ │ │ ├── layouts
│ │ │ └── application.html.erb
│ │ │ └── pages
│ │ │ └── root.html
│ ├── config
│ │ ├── locales
│ │ │ ├── es.yml
│ │ │ └── en.yml
│ │ ├── routes.rb
│ │ ├── initializers
│ │ │ ├── session_store.rb
│ │ │ ├── filter_parameter_logging.rb
│ │ │ ├── mime_types.rb
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── wrap_parameters.rb
│ │ │ ├── inflections.rb
│ │ │ └── secret_token.rb
│ │ ├── environment.rb
│ │ ├── boot.rb
│ │ ├── application.rb
│ │ └── environments
│ │ │ ├── development.rb
│ │ │ ├── test.rb
│ │ │ └── production.rb
│ ├── README.rdoc
│ ├── config.ru
│ └── Rakefile
├── gemfiles
│ ├── rails_5_0.gemfile
│ ├── rails_5_1.gemfile
│ ├── rails_5_2.gemfile
│ ├── rails_6_0.gemfile
│ ├── rails_6_1.gemfile
│ ├── rails_7_0_sassc.gemfile
│ ├── rails_7_0_dartsass.gemfile
│ └── rails_4_2.gemfile
├── test_helper_rails.rb
├── rails_test.rb
├── support
│ ├── reporting.rb
│ └── dummy_rails_integration.rb
└── test_helper.rb
├── assets
├── stylesheets
│ ├── bootstrap
│ │ ├── helpers
│ │ │ ├── _clearfix.scss
│ │ │ ├── _text-truncation.scss
│ │ │ ├── _visually-hidden.scss
│ │ │ ├── _vr.scss
│ │ │ ├── _stretched-link.scss
│ │ │ ├── _stacks.scss
│ │ │ ├── _focus-ring.scss
│ │ │ ├── _color-bg.scss
│ │ │ ├── _ratio.scss
│ │ │ ├── _icon-link.scss
│ │ │ ├── _position.scss
│ │ │ └── _colored-links.scss
│ │ ├── mixins
│ │ │ ├── _clearfix.scss
│ │ │ ├── _lists.scss
│ │ │ ├── _color-scheme.scss
│ │ │ ├── _text-truncate.scss
│ │ │ ├── _resize.scss
│ │ │ ├── _banner.scss
│ │ │ ├── _backdrop.scss
│ │ │ ├── _pagination.scss
│ │ │ ├── _container.scss
│ │ │ ├── _image.scss
│ │ │ ├── _box-shadow.scss
│ │ │ ├── _color-mode.scss
│ │ │ ├── _reset-text.scss
│ │ │ ├── _alert.scss
│ │ │ ├── _deprecate.scss
│ │ │ ├── _list-group.scss
│ │ │ ├── _transition.scss
│ │ │ ├── _table-variants.scss
│ │ │ ├── _visually-hidden.scss
│ │ │ ├── _caret.scss
│ │ │ ├── _gradients.scss
│ │ │ ├── _border-radius.scss
│ │ │ ├── _buttons.scss
│ │ │ ├── _utilities.scss
│ │ │ ├── _breakpoints.scss
│ │ │ ├── _forms.scss
│ │ │ └── _grid.scss
│ │ ├── forms
│ │ │ ├── _form-text.scss
│ │ │ ├── _validation.scss
│ │ │ ├── _labels.scss
│ │ │ ├── _form-select.scss
│ │ │ ├── _floating-labels.scss
│ │ │ ├── _form-range.scss
│ │ │ └── _input-group.scss
│ │ ├── _forms.scss
│ │ ├── _helpers.scss
│ │ ├── _transitions.scss
│ │ ├── _grid.scss
│ │ ├── _mixins.scss
│ │ ├── _placeholders.scss
│ │ ├── _badge.scss
│ │ ├── _images.scss
│ │ ├── _containers.scss
│ │ ├── _breadcrumb.scss
│ │ ├── utilities
│ │ │ └── _api.scss
│ │ ├── _type.scss
│ │ ├── _progress.scss
│ │ ├── _close.scss
│ │ ├── _alert.scss
│ │ ├── _spinners.scss
│ │ ├── _toasts.scss
│ │ ├── _button-group.scss
│ │ ├── _pagination.scss
│ │ └── _tooltip.scss
│ ├── _bootstrap-reboot.scss
│ ├── _bootstrap-utilities.scss
│ ├── _bootstrap.scss
│ └── _bootstrap-grid.scss
└── javascripts
│ ├── bootstrap-global-this-undefine.js
│ ├── bootstrap-global-this-define.js
│ ├── bootstrap-sprockets.js
│ └── bootstrap
│ ├── util
│ ├── component-functions.js
│ ├── config.js
│ ├── focustrap.js
│ ├── sanitizer.js
│ ├── backdrop.js
│ ├── swipe.js
│ ├── scrollbar.js
│ └── template-factory.js
│ ├── dom
│ ├── data.js
│ ├── manipulator.js
│ └── selector-engine.js
│ ├── button.js
│ ├── popover.js
│ ├── base-component.js
│ └── alert.js
├── lib
├── bootstrap
│ ├── version.rb
│ └── engine.rb
└── bootstrap.rb
├── Gemfile
├── .gitignore
├── .gitattributes
├── tasks
├── updater
│ ├── scss.rb
│ ├── logger.rb
│ ├── js.rb
│ └── network.rb
└── updater.rb
├── LICENSE
├── CHANGELOG.md
├── bootstrap.gemspec
├── .github
└── workflows
│ └── ci.yml
└── Rakefile
/test/dummy_rails/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy_rails/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/assets/stylesheets/.browserslistrc:
--------------------------------------------------------------------------------
1 | Chrome >= 25
2 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/locales/es.yml:
--------------------------------------------------------------------------------
1 | es:
2 | dummy:
3 | hello: Hola
--------------------------------------------------------------------------------
/test/dummy_rails/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | dummy:
3 | hello: Hello
4 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/test/dummy_rails/README.rdoc:
--------------------------------------------------------------------------------
1 | == README
2 |
3 | This is a minimal Rails app for testing
4 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_clearfix.scss:
--------------------------------------------------------------------------------
1 | .clearfix {
2 | @include clearfix();
3 | }
4 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/routes.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.routes.draw do
2 | root to: 'pages#root'
3 | end
4 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/assets/stylesheets/application.sass:
--------------------------------------------------------------------------------
1 | @import 'bootstrap'
2 |
3 | .test-mixin
4 | +make-container
5 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/controllers/pages_controller.rb:
--------------------------------------------------------------------------------
1 | class PagesController < ApplicationController
2 | def root
3 | end
4 | end
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_text-truncation.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Text truncation
3 | //
4 |
5 | .text-truncate {
6 | @include text-truncate();
7 | }
8 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 |
--------------------------------------------------------------------------------
/assets/javascripts/bootstrap-global-this-undefine.js:
--------------------------------------------------------------------------------
1 | window['globalThis'] = window['bootstrap']._originalGlobalThis;
2 | window['bootstrap']._originalGlobalThis = null;
3 |
--------------------------------------------------------------------------------
/lib/bootstrap/version.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Bootstrap
4 | VERSION = '5.3.5'
5 | BOOTSTRAP_SHA = '85f23534bd2de8041354b297516cf21959091b31'
6 | end
7 |
--------------------------------------------------------------------------------
/test/dummy_rails/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_5_0.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 5.0.0'
4 | gem 'activesupport', '~> 5.0.0'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_5_1.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 5.1.0'
4 | gem 'activesupport', '~> 5.1.0'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_5_2.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 5.2.8'
4 | gem 'activesupport', '~> 5.2.8'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_6_0.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 6.0.3'
4 | gem 'activesupport', '~> 6.0.3'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_6_1.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 6.1.3'
4 | gem 'activesupport', '~> 6.1.3'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/test_helper_rails.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] = ENV['RACK_ENV'] = 'test'
2 |
3 | require 'test_helper'
4 | require 'dummy_rails/config/environment'
5 | require 'rails/test_help'
6 | require 'capybara/rails'
7 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Dummy::Application.initialize!
6 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_7_0_sassc.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 7.0.4'
4 | gem 'activesupport', '~> 7.0.4'
5 | gem 'sassc-rails', '~> 2.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_7_0_dartsass.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 7.0.4'
4 | gem 'activesupport', '~> 7.0.4'
5 | gem 'dartsass-sprockets', '~> 3.0'
6 |
7 | gemspec path: '../../'
8 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Visually hidden
3 | //
4 |
5 | .visually-hidden,
6 | .visually-hidden-focusable:not(:focus):not(:focus-within) {
7 | @include visually-hidden();
8 | }
9 |
--------------------------------------------------------------------------------
/test/gemfiles/rails_4_2.gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'actionpack', '~> 4.2.7'
4 | gem 'activesupport', '~> 4.2.7'
5 | gem 'sassc-rails', '~> 2.0'
6 | gem 'bigdecimal', '1.3.5'
7 |
8 | gemspec path: '../../'
9 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_vr.scss:
--------------------------------------------------------------------------------
1 | .vr {
2 | display: inline-block;
3 | align-self: stretch;
4 | width: $vr-border-width;
5 | min-height: 1em;
6 | background-color: currentcolor;
7 | opacity: $hr-opacity;
8 | }
9 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | // scss-docs-start clearfix
2 | @mixin clearfix() {
3 | &::after {
4 | display: block;
5 | clear: both;
6 | content: "";
7 | }
8 | }
9 | // scss-docs-end clearfix
10 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_lists.scss:
--------------------------------------------------------------------------------
1 | // Lists
2 |
3 | // Unstyled keeps list items block level, just removes default browser padding and list-style
4 | @mixin list-unstyled {
5 | padding-left: 0;
6 | list-style: none;
7 | }
8 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_color-scheme.scss:
--------------------------------------------------------------------------------
1 | // scss-docs-start mixin-color-scheme
2 | @mixin color-scheme($name) {
3 | @media (prefers-color-scheme: #{$name}) {
4 | @content;
5 | }
6 | }
7 | // scss-docs-end mixin-color-scheme
8 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_text-truncate.scss:
--------------------------------------------------------------------------------
1 | // Text truncate
2 | // Requires inline-block or block for proper styling
3 |
4 | @mixin text-truncate() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gemspec
4 |
5 | group :development do
6 | gem 'popper_js', '>= 1.12.3'
7 | gem 'dartsass-sprockets'
8 | end
9 |
10 | group :debug do
11 | gem 'byebug', platforms: [:mri], require: false
12 | end
13 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_resize.scss:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | @mixin resizable($direction) {
4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5 | resize: $direction; // Options: horizontal, vertical, both
6 | }
7 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 | end
6 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3 |
4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5 | $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
6 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_banner.scss:
--------------------------------------------------------------------------------
1 | @mixin bsBanner($file) {
2 | /*!
3 | * Bootstrap #{$file} v5.3.5 (https://getbootstrap.com/)
4 | * Copyright 2011-2025 The Bootstrap Authors
5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6 | */
7 | }
8 |
--------------------------------------------------------------------------------
/test/dummy_rails/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Dummy::Application.load_tasks
7 |
--------------------------------------------------------------------------------
/assets/javascripts/bootstrap-global-this-define.js:
--------------------------------------------------------------------------------
1 | // Set a `globalThis` so that bootstrap components are defined on window.bootstrap instead of window.
2 | window['bootstrap'] = {
3 | "@popperjs/core": window.Popper,
4 | _originalGlobalThis: window['globalThis']
5 | };
6 | window['globalThis'] = window['bootstrap'];
7 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/forms/_form-text.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Form text
3 | //
4 |
5 | .form-text {
6 | margin-top: $form-text-margin-top;
7 | @include font-size($form-text-font-size);
8 | font-style: $form-text-font-style;
9 | font-weight: $form-text-font-weight;
10 | color: $form-text-color;
11 | }
12 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_forms.scss:
--------------------------------------------------------------------------------
1 | @import "forms/labels";
2 | @import "forms/form-text";
3 | @import "forms/form-control";
4 | @import "forms/form-select";
5 | @import "forms/form-check";
6 | @import "forms/form-range";
7 | @import "forms/floating-labels";
8 | @import "forms/input-group";
9 | @import "forms/validation";
10 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | //= require popper.js
2 | //= require bootstrap-sprockets
3 |
4 | document.addEventListener('DOMContentLoaded', () => {
5 | for (const tooltipTriggerEl of document.querySelectorAll('[data-bs-toggle="tooltip"]')) {
6 | new bootstrap.Tooltip(tooltipTriggerEl)
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_stretched-link.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Stretched link
3 | //
4 |
5 | .stretched-link {
6 | &::#{$stretched-link-pseudo-element} {
7 | position: absolute;
8 | top: 0;
9 | right: 0;
10 | bottom: 0;
11 | left: 0;
12 | z-index: $stretched-link-z-index;
13 | content: "";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/assets/stylesheets/_bootstrap-reboot.scss:
--------------------------------------------------------------------------------
1 | @import "bootstrap/mixins/banner";
2 | @include bsBanner(Reboot);
3 |
4 | @import "bootstrap/functions";
5 | @import "bootstrap/variables";
6 | @import "bootstrap/variables-dark";
7 | @import "bootstrap/maps";
8 | @import "bootstrap/mixins";
9 | @import "bootstrap/root";
10 | @import "bootstrap/reboot";
11 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_stacks.scss:
--------------------------------------------------------------------------------
1 | // scss-docs-start stacks
2 | .hstack {
3 | display: flex;
4 | flex-direction: row;
5 | align-items: center;
6 | align-self: stretch;
7 | }
8 |
9 | .vstack {
10 | display: flex;
11 | flex: 1 1 auto;
12 | flex-direction: column;
13 | align-self: stretch;
14 | }
15 | // scss-docs-end stacks
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.gem
2 | .sass-cache
3 | bootstrap.css
4 | bootstrap-responsive.css
5 | Gemfile.lock
6 | *.gemfile.lock
7 | .rvmrc
8 | .rbenv-version
9 |
10 | # Ignore bundler config
11 | /.bundle
12 | /vendor/cache
13 | /vendor/bundle
14 | tmp/
15 | test/screenshots/
16 | test/dummy_rails/log/*.log
17 | test/dummy_rails/public/assets/
18 | .DS_Store
19 | node_modules
20 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | .* text eol=lf
2 | Gemfile text eol=lf
3 | LICENSE text eol=lf
4 | Rakefile text eol=lf
5 | *.gemfile text eol=lf
6 | *.gemspec text eol=lf
7 | *.html.erb text eol=lf
8 | *.html.slim text eol=lf
9 | *.js text eol=lf
10 | *.rb text eol=lf
11 | *.ru text eol=lf
12 | *.sass text eol=lf
13 | *.scss text eol=lf
14 | *.yml text eol=lf
15 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_backdrop.scss:
--------------------------------------------------------------------------------
1 | // Shared between modals and offcanvases
2 | @mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
3 | position: fixed;
4 | top: 0;
5 | left: 0;
6 | z-index: $zindex;
7 | width: 100vw;
8 | height: 100vh;
9 | background-color: $backdrop-bg;
10 |
11 | // Fade for backdrop
12 | &.fade { opacity: 0; }
13 | &.show { opacity: $backdrop-opacity; }
14 | }
15 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_helpers.scss:
--------------------------------------------------------------------------------
1 | @import "helpers/clearfix";
2 | @import "helpers/color-bg";
3 | @import "helpers/colored-links";
4 | @import "helpers/focus-ring";
5 | @import "helpers/icon-link";
6 | @import "helpers/ratio";
7 | @import "helpers/position";
8 | @import "helpers/stacks";
9 | @import "helpers/visually-hidden";
10 | @import "helpers/stretched-link";
11 | @import "helpers/text-truncation";
12 | @import "helpers/vr";
13 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_focus-ring.scss:
--------------------------------------------------------------------------------
1 | .focus-ring:focus {
2 | outline: 0;
3 | // By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
4 | box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
5 | }
6 |
--------------------------------------------------------------------------------
/test/rails_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper_rails'
2 |
3 | class RailsTest < ActionDispatch::IntegrationTest
4 | include ::DummyRailsIntegration
5 |
6 | def test_visit_root
7 | visit root_path
8 | # ^ will raise on JS errors
9 |
10 | assert_equal 200, page.status_code
11 |
12 | screenshot!
13 | end
14 |
15 | def test_precompile
16 | Dummy::Application.load_tasks
17 | Rake::Task['assets:precompile'].invoke
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_color-bg.scss:
--------------------------------------------------------------------------------
1 | // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
2 | @each $color, $value in $theme-colors {
3 | .text-bg-#{$color} {
4 | color: color-contrast($value) if($enable-important-utilities, !important, null);
5 | background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_pagination.scss:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | // scss-docs-start pagination-mixin
4 | @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
5 | --#{$prefix}pagination-padding-x: #{$padding-x};
6 | --#{$prefix}pagination-padding-y: #{$padding-y};
7 | @include rfs($font-size, --#{$prefix}pagination-font-size);
8 | --#{$prefix}pagination-border-radius: #{$border-radius};
9 | }
10 | // scss-docs-end pagination-mixin
11 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_container.scss:
--------------------------------------------------------------------------------
1 | // Container mixins
2 |
3 | @mixin make-container($gutter: $container-padding-x) {
4 | --#{$prefix}gutter-x: #{$gutter};
5 | --#{$prefix}gutter-y: 0;
6 | width: 100%;
7 | padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
8 | padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
9 | margin-right: auto;
10 | margin-left: auto;
11 | }
12 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_image.scss:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 |
10 | @mixin img-fluid {
11 | // Part 1: Set a maximum relative to the parent
12 | max-width: 100%;
13 | // Part 2: Override the height to auto, otherwise images will be stretched
14 | // when setting a width and height attribute on the img element.
15 | height: auto;
16 | }
17 |
--------------------------------------------------------------------------------
/test/dummy_rails/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | bootstrap Dummy App
6 |
7 | <%= stylesheet_link_tag 'application', media: "all", 'data-turbolinks-track' => true %>
8 | <%= csrf_meta_tags %>
9 |
10 |
11 |
12 | <%= yield %>
13 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_box-shadow.scss:
--------------------------------------------------------------------------------
1 | @mixin box-shadow($shadow...) {
2 | @if $enable-shadows {
3 | $result: ();
4 |
5 | @each $value in $shadow {
6 | @if $value != null {
7 | $result: append($result, $value, "comma");
8 | }
9 | @if $value == none and length($shadow) > 1 {
10 | @warn "The keyword 'none' must be used as a single argument.";
11 | }
12 | }
13 |
14 | @if (length($result) > 0) {
15 | box-shadow: $result;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/assets/stylesheets/_bootstrap-utilities.scss:
--------------------------------------------------------------------------------
1 | @import "bootstrap/mixins/banner";
2 | @include bsBanner(Utilities);
3 |
4 | // Configuration
5 | @import "bootstrap/functions";
6 | @import "bootstrap/variables";
7 | @import "bootstrap/variables-dark";
8 | @import "bootstrap/maps";
9 | @import "bootstrap/mixins";
10 | @import "bootstrap/utilities";
11 |
12 | // Layout & components
13 | @import "bootstrap/root";
14 |
15 | // Helpers
16 | @import "bootstrap/helpers";
17 |
18 | // Utilities
19 | @import "bootstrap/utilities/api";
20 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_ratio.scss:
--------------------------------------------------------------------------------
1 | // Credit: Nicolas Gallagher and SUIT CSS.
2 |
3 | .ratio {
4 | position: relative;
5 | width: 100%;
6 |
7 | &::before {
8 | display: block;
9 | padding-top: var(--#{$prefix}aspect-ratio);
10 | content: "";
11 | }
12 |
13 | > * {
14 | position: absolute;
15 | top: 0;
16 | left: 0;
17 | width: 100%;
18 | height: 100%;
19 | }
20 | }
21 |
22 | @each $key, $ratio in $aspect-ratios {
23 | .ratio-#{$key} {
24 | --#{$prefix}aspect-ratio: #{$ratio};
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/forms/_validation.scss:
--------------------------------------------------------------------------------
1 | // Form validation
2 | //
3 | // Provide feedback to users when form field values are valid or invalid. Works
4 | // primarily for client-side validation via scoped `:invalid` and `:valid`
5 | // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
6 | // server-side validation.
7 |
8 | // scss-docs-start form-validation-states-loop
9 | @each $state, $data in $form-validation-states {
10 | @include form-validation-state($state, $data...);
11 | }
12 | // scss-docs-end form-validation-states-loop
13 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_transitions.scss:
--------------------------------------------------------------------------------
1 | .fade {
2 | @include transition($transition-fade);
3 |
4 | &:not(.show) {
5 | opacity: 0;
6 | }
7 | }
8 |
9 | // scss-docs-start collapse-classes
10 | .collapse {
11 | &:not(.show) {
12 | display: none;
13 | }
14 | }
15 |
16 | .collapsing {
17 | height: 0;
18 | overflow: hidden;
19 | @include transition($transition-collapse);
20 |
21 | &.collapse-horizontal {
22 | width: 0;
23 | height: auto;
24 | @include transition($transition-collapse-width);
25 | }
26 | }
27 | // scss-docs-end collapse-classes
28 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_color-mode.scss:
--------------------------------------------------------------------------------
1 | // scss-docs-start color-mode-mixin
2 | @mixin color-mode($mode: light, $root: false) {
3 | @if $color-mode-type == "media-query" {
4 | @if $root == true {
5 | @media (prefers-color-scheme: $mode) {
6 | :root {
7 | @content;
8 | }
9 | }
10 | } @else {
11 | @media (prefers-color-scheme: $mode) {
12 | @content;
13 | }
14 | }
15 | } @else {
16 | [data-bs-theme="#{$mode}"] {
17 | @content;
18 | }
19 | }
20 | }
21 | // scss-docs-end color-mode-mixin
22 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_reset-text.scss:
--------------------------------------------------------------------------------
1 | @mixin reset-text {
2 | font-family: $font-family-base;
3 | // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
4 | font-style: normal;
5 | font-weight: $font-weight-normal;
6 | line-height: $line-height-base;
7 | text-align: left; // Fallback for where `start` is not supported
8 | text-align: start;
9 | text-decoration: none;
10 | text-shadow: none;
11 | text-transform: none;
12 | letter-spacing: normal;
13 | word-break: normal;
14 | white-space: normal;
15 | word-spacing: normal;
16 | line-break: auto;
17 | }
18 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_alert.scss:
--------------------------------------------------------------------------------
1 | @include deprecate("`alert-variant()`", "v5.3.0", "v6.0.0");
2 |
3 | // scss-docs-start alert-variant-mixin
4 | @mixin alert-variant($background, $border, $color) {
5 | --#{$prefix}alert-color: #{$color};
6 | --#{$prefix}alert-bg: #{$background};
7 | --#{$prefix}alert-border-color: #{$border};
8 | --#{$prefix}alert-link-color: #{shade-color($color, 20%)};
9 |
10 | @if $enable-gradients {
11 | background-image: var(--#{$prefix}gradient);
12 | }
13 |
14 | .alert-link {
15 | color: var(--#{$prefix}alert-link-color);
16 | }
17 | }
18 | // scss-docs-end alert-variant-mixin
19 |
--------------------------------------------------------------------------------
/test/support/reporting.rb:
--------------------------------------------------------------------------------
1 | module Kernel
2 | def silence_stdout_if(cond, &run)
3 | silence_stream_if(cond, STDOUT, &run)
4 | end
5 |
6 | def silence_stderr_if(cond, &run)
7 | silence_stream_if(cond, STDERR, &run)
8 | end
9 |
10 | def silence_stream_if(cond, stream, &run)
11 | if cond
12 | silence_stream(stream, &run)
13 | else
14 | run.call
15 | end
16 | end
17 |
18 | def silence_stream(stream)
19 | old_stream = stream.dup
20 | stream.reopen(File::NULL)
21 | stream.sync = true
22 | yield
23 | ensure
24 | stream.reopen(old_stream)
25 | old_stream.close
26 | end unless method_defined?(:silence_stream)
27 | end
28 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_deprecate.scss:
--------------------------------------------------------------------------------
1 | // Deprecate mixin
2 | //
3 | // This mixin can be used to deprecate mixins or functions.
4 | // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5 | // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6 | @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7 | @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8 | @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_list-group.scss:
--------------------------------------------------------------------------------
1 | @include deprecate("`list-group-item-variant()`", "v5.3.0", "v6.0.0");
2 |
3 | // List Groups
4 |
5 | // scss-docs-start list-group-mixin
6 | @mixin list-group-item-variant($state, $background, $color) {
7 | .list-group-item-#{$state} {
8 | color: $color;
9 | background-color: $background;
10 |
11 | &.list-group-item-action {
12 | &:hover,
13 | &:focus {
14 | color: $color;
15 | background-color: shade-color($background, 10%);
16 | }
17 |
18 | &.active {
19 | color: $white;
20 | background-color: $color;
21 | border-color: $color;
22 | }
23 | }
24 | }
25 | }
26 | // scss-docs-end list-group-mixin
27 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_icon-link.scss:
--------------------------------------------------------------------------------
1 | .icon-link {
2 | display: inline-flex;
3 | gap: $icon-link-gap;
4 | align-items: center;
5 | text-decoration-color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, .5));
6 | text-underline-offset: $icon-link-underline-offset;
7 | backface-visibility: hidden;
8 |
9 | > .bi {
10 | flex-shrink: 0;
11 | width: $icon-link-icon-size;
12 | height: $icon-link-icon-size;
13 | fill: currentcolor;
14 | @include transition($icon-link-icon-transition);
15 | }
16 | }
17 |
18 | .icon-link-hover {
19 | &:hover,
20 | &:focus-visible {
21 | > .bi {
22 | transform: var(--#{$prefix}icon-link-transform, $icon-link-icon-transform);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_transition.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable property-disallowed-list
2 | @mixin transition($transition...) {
3 | @if length($transition) == 0 {
4 | $transition: $transition-base;
5 | }
6 |
7 | @if length($transition) > 1 {
8 | @each $value in $transition {
9 | @if $value == null or $value == none {
10 | @warn "The keyword 'none' or 'null' must be used as a single argument.";
11 | }
12 | }
13 | }
14 |
15 | @if $enable-transitions {
16 | @if nth($transition, 1) != null {
17 | transition: $transition;
18 | }
19 |
20 | @if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
21 | @media (prefers-reduced-motion: reduce) {
22 | transition: none;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/helpers/_position.scss:
--------------------------------------------------------------------------------
1 | // Shorthand
2 |
3 | .fixed-top {
4 | position: fixed;
5 | top: 0;
6 | right: 0;
7 | left: 0;
8 | z-index: $zindex-fixed;
9 | }
10 |
11 | .fixed-bottom {
12 | position: fixed;
13 | right: 0;
14 | bottom: 0;
15 | left: 0;
16 | z-index: $zindex-fixed;
17 | }
18 |
19 | // Responsive sticky top and bottom
20 | @each $breakpoint in map-keys($grid-breakpoints) {
21 | @include media-breakpoint-up($breakpoint) {
22 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
23 |
24 | .sticky#{$infix}-top {
25 | position: sticky;
26 | top: 0;
27 | z-index: $zindex-sticky;
28 | }
29 |
30 | .sticky#{$infix}-bottom {
31 | position: sticky;
32 | bottom: 0;
33 | z-index: $zindex-sticky;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/test/support/dummy_rails_integration.rb:
--------------------------------------------------------------------------------
1 | require 'capybara/dsl'
2 | require 'fileutils'
3 | module DummyRailsIntegration
4 | include Capybara::DSL
5 |
6 | def setup
7 | super
8 | cleanup_dummy_rails_files
9 | end
10 |
11 | def teardown
12 | super
13 | cleanup_dummy_rails_files
14 | Capybara.reset_sessions!
15 | Capybara.use_default_driver
16 | end
17 |
18 | def screenshot!
19 | path = "tmp/#{name}.png"
20 | full_path = File.join(GEM_PATH, path)
21 | FileUtils.mkdir_p(File.dirname(full_path))
22 | page.driver.render(full_path, full: true)
23 | STDERR.puts "Screenshot saved to #{path}"
24 | end
25 |
26 | private
27 | def cleanup_dummy_rails_files
28 | FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
29 | FileUtils.rm Dir.glob('test/dummy_rails/public/assets/{.[^\.]*,*}')
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_grid.scss:
--------------------------------------------------------------------------------
1 | // Row
2 | //
3 | // Rows contain your columns.
4 |
5 | :root {
6 | @each $name, $value in $grid-breakpoints {
7 | --#{$prefix}breakpoint-#{$name}: #{$value};
8 | }
9 | }
10 |
11 | @if $enable-grid-classes {
12 | .row {
13 | @include make-row();
14 |
15 | > * {
16 | @include make-col-ready();
17 | }
18 | }
19 | }
20 |
21 | @if $enable-cssgrid {
22 | .grid {
23 | display: grid;
24 | grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
25 | grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
26 | gap: var(--#{$prefix}gap, #{$grid-gutter-width});
27 |
28 | @include make-cssgrid();
29 | }
30 | }
31 |
32 |
33 | // Columns
34 | //
35 | // Common styles for small and large grid columns
36 |
37 | @if $enable-grid-classes {
38 | @include make-grid-columns();
39 | }
40 |
--------------------------------------------------------------------------------
/lib/bootstrap/engine.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | begin
4 | require 'dartsass-sprockets'
5 | rescue LoadError
6 | begin
7 | require 'sassc-rails'
8 | rescue LoadError
9 | begin
10 | require 'dartsass-rails'
11 | rescue LoadError
12 | begin
13 | require 'cssbundling-rails'
14 | rescue LoadError
15 | raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets, sassc-rails, dartsass-rails or cssbundling-rails to your dependencies.")
16 | end
17 | end
18 | end
19 | end
20 |
21 | module Bootstrap
22 | module Rails
23 | class Engine < ::Rails::Engine
24 | initializer 'bootstrap.assets' do |app|
25 | %w(stylesheets javascripts).each do |sub|
26 | app.config.assets.paths << root.join('assets', sub).to_s
27 | end
28 | end
29 | end
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure your secret_key_base is kept private
11 | # if you're sharing your code publicly.
12 | token = '4380f36fda304251bf48f12ad4474b6d11447f1f959bd5b77a5d56c92b97f4c403ee0ae13d31a85ed88058ff8795bf31ec17e70e5c229b3707a77a2ee7e81cc'
13 |
14 | if Dummy::Application.config.respond_to?(:secret_key_base=)
15 | Dummy::Application.config.secret_key_base = token
16 | else
17 | Dummy::Application.config.secret_token = token
18 | end
--------------------------------------------------------------------------------
/test/dummy_rails/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails'
4 |
5 | %w(
6 | action_controller
7 | action_view
8 | sprockets
9 | ).each do |framework|
10 | require "#{framework}/railtie"
11 | end
12 |
13 | require 'uglifier'
14 | require 'bootstrap'
15 |
16 | module Dummy
17 | class Application < Rails::Application
18 | config.assets.enabled = true if config.assets.respond_to?(:enabled)
19 | if Rails::VERSION::MAJOR > 4
20 | # Rails 4 precompiles application.css|js by default, but future version of Rails do not.
21 | config.assets.precompile += %w( application.css application.js )
22 | end
23 | config.to_prepare do
24 | if ENV['VERBOSE']
25 | STDERR.puts "Loaded Rails #{Rails::VERSION::STRING}, Sprockets #{Sprockets::VERSION}",
26 | "Asset paths: #{Rails.application.config.assets.paths}"
27 | end
28 | end
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/test/dummy_rails/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Print deprecation notices to the Rails logger.
17 | config.active_support.deprecation = :log
18 |
19 | # Debug mode disables concatenation and preprocessing of assets.
20 | # This option may cause significant delays in view rendering with a large
21 | # number of complex assets.
22 | config.assets.debug = true
23 | end
24 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Toggles
2 | //
3 | // Used in conjunction with global variables to enable certain theme features.
4 |
5 | // Vendor
6 | @import "vendor/rfs";
7 |
8 | // Deprecate
9 | @import "mixins/deprecate";
10 |
11 | // Helpers
12 | @import "mixins/breakpoints";
13 | @import "mixins/color-mode";
14 | @import "mixins/color-scheme";
15 | @import "mixins/image";
16 | @import "mixins/resize";
17 | @import "mixins/visually-hidden";
18 | @import "mixins/reset-text";
19 | @import "mixins/text-truncate";
20 |
21 | // Utilities
22 | @import "mixins/utilities";
23 |
24 | // Components
25 | @import "mixins/backdrop";
26 | @import "mixins/buttons";
27 | @import "mixins/caret";
28 | @import "mixins/pagination";
29 | @import "mixins/lists";
30 | @import "mixins/forms";
31 | @import "mixins/table-variants";
32 |
33 | // Skins
34 | @import "mixins/border-radius";
35 | @import "mixins/box-shadow";
36 | @import "mixins/gradients";
37 | @import "mixins/transition";
38 |
39 | // Layout
40 | @import "mixins/clearfix";
41 | @import "mixins/container";
42 | @import "mixins/grid";
43 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_placeholders.scss:
--------------------------------------------------------------------------------
1 | .placeholder {
2 | display: inline-block;
3 | min-height: 1em;
4 | vertical-align: middle;
5 | cursor: wait;
6 | background-color: currentcolor;
7 | opacity: $placeholder-opacity-max;
8 |
9 | &.btn::before {
10 | display: inline-block;
11 | content: "";
12 | }
13 | }
14 |
15 | // Sizing
16 | .placeholder-xs {
17 | min-height: .6em;
18 | }
19 |
20 | .placeholder-sm {
21 | min-height: .8em;
22 | }
23 |
24 | .placeholder-lg {
25 | min-height: 1.2em;
26 | }
27 |
28 | // Animation
29 | .placeholder-glow {
30 | .placeholder {
31 | animation: placeholder-glow 2s ease-in-out infinite;
32 | }
33 | }
34 |
35 | @keyframes placeholder-glow {
36 | 50% {
37 | opacity: $placeholder-opacity-min;
38 | }
39 | }
40 |
41 | .placeholder-wave {
42 | mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
43 | mask-size: 200% 100%;
44 | animation: placeholder-wave 2s linear infinite;
45 | }
46 |
47 | @keyframes placeholder-wave {
48 | 100% {
49 | mask-position: -200% 0%;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/tasks/updater/scss.rb:
--------------------------------------------------------------------------------
1 | class Updater
2 | module Scss
3 | def update_scss_assets
4 | log_status 'Updating scss...'
5 | save_to = @save_to[:scss]
6 | contents = {}
7 | bootstrap_scss_files = get_paths_by_type('scss', /\.scss$/).reject { |p| p.start_with?('tests/') }
8 | read_files('scss', bootstrap_scss_files).each do |name, file|
9 | contents[name] = file
10 | save_file("#{save_to}/#{name}", file)
11 | end
12 | log_processed "#{bootstrap_scss_files * ' '}"
13 |
14 | log_status 'Updating scss main files'
15 | %w(bootstrap bootstrap-grid bootstrap-reboot bootstrap-utilities).each do |name|
16 | # Compass treats non-partials as targets to copy into the main project, so make them partials.
17 | # Also move them up a level to clearly indicate entry points.
18 | from = "#{save_to}/#{name}.scss"
19 | to = "#{save_to}/../_#{name}.scss"
20 | FileUtils.mv from, to
21 | # As we moved the files, adjust imports accordingly.
22 | File.write to, File.read(to).gsub(/ "/, ' "bootstrap/')
23 | end
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-2016 Twitter, Inc
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/assets/javascripts/bootstrap-sprockets.js:
--------------------------------------------------------------------------------
1 | //= require ./bootstrap-global-this-define
2 | //= require ./bootstrap/dom/data
3 | //= require ./bootstrap/util/index
4 | //= require ./bootstrap/dom/event-handler
5 | //= require ./bootstrap/dom/manipulator
6 | //= require ./bootstrap/util/config
7 | //= require ./bootstrap/base-component
8 | //= require ./bootstrap/button
9 | //= require ./bootstrap/dom/selector-engine
10 | //= require ./bootstrap/scrollspy
11 | //= require ./bootstrap/util/scrollbar
12 | //= require ./bootstrap/util/sanitizer
13 | //= require ./bootstrap/util/swipe
14 | //= require ./bootstrap/carousel
15 | //= require ./bootstrap/collapse
16 | //= require ./bootstrap/util/backdrop
17 | //= require ./bootstrap/util/component-functions
18 | //= require ./bootstrap/util/focustrap
19 | //= require ./bootstrap/modal
20 | //= require ./bootstrap/alert
21 | //= require ./bootstrap/util/template-factory
22 | //= require ./bootstrap/tooltip
23 | //= require ./bootstrap/popover
24 | //= require ./bootstrap/offcanvas
25 | //= require ./bootstrap/toast
26 | //= require ./bootstrap/dropdown
27 | //= require ./bootstrap/tab
28 | //= require ./bootstrap-global-this-undefine
29 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_table-variants.scss:
--------------------------------------------------------------------------------
1 | // scss-docs-start table-variant
2 | @mixin table-variant($state, $background) {
3 | .table-#{$state} {
4 | $color: color-contrast(opaque($body-bg, $background));
5 | $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
6 | $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
7 | $active-bg: mix($color, $background, percentage($table-active-bg-factor));
8 | $table-border-color: mix($color, $background, percentage($table-border-factor));
9 |
10 | --#{$prefix}table-color: #{$color};
11 | --#{$prefix}table-bg: #{$background};
12 | --#{$prefix}table-border-color: #{$table-border-color};
13 | --#{$prefix}table-striped-bg: #{$striped-bg};
14 | --#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
15 | --#{$prefix}table-active-bg: #{$active-bg};
16 | --#{$prefix}table-active-color: #{color-contrast($active-bg)};
17 | --#{$prefix}table-hover-bg: #{$hover-bg};
18 | --#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
19 |
20 | color: var(--#{$prefix}table-color);
21 | border-color: var(--#{$prefix}table-border-color);
22 | }
23 | }
24 | // scss-docs-end table-variant
25 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable declaration-no-important
2 |
3 | // Hide content visually while keeping it accessible to assistive technologies
4 | //
5 | // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6 | // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7 |
8 | @mixin visually-hidden() {
9 | width: 1px !important;
10 | height: 1px !important;
11 | padding: 0 !important;
12 | margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
13 | overflow: hidden !important;
14 | clip: rect(0, 0, 0, 0) !important;
15 | white-space: nowrap !important;
16 | border: 0 !important;
17 |
18 | // Fix for positioned table caption that could become anonymous cells
19 | &:not(caption) {
20 | position: absolute !important;
21 | }
22 | }
23 |
24 | // Use to only display content when it's focused, or one of its child elements is focused
25 | // (i.e. when focus is within the element/container that the class was applied to)
26 | //
27 | // Useful for "Skip to main content" links; see https://www.w3.org/WAI/WCAG22/Techniques/general/G1.html
28 |
29 | @mixin visually-hidden-focusable() {
30 | &:not(:focus):not(:focus-within) {
31 | @include visually-hidden();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/_badge.scss:
--------------------------------------------------------------------------------
1 | // Base class
2 | //
3 | // Requires one of the contextual, color modifier classes for `color` and
4 | // `background-color`.
5 |
6 | .badge {
7 | // scss-docs-start badge-css-vars
8 | --#{$prefix}badge-padding-x: #{$badge-padding-x};
9 | --#{$prefix}badge-padding-y: #{$badge-padding-y};
10 | @include rfs($badge-font-size, --#{$prefix}badge-font-size);
11 | --#{$prefix}badge-font-weight: #{$badge-font-weight};
12 | --#{$prefix}badge-color: #{$badge-color};
13 | --#{$prefix}badge-border-radius: #{$badge-border-radius};
14 | // scss-docs-end badge-css-vars
15 |
16 | display: inline-block;
17 | padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
18 | @include font-size(var(--#{$prefix}badge-font-size));
19 | font-weight: var(--#{$prefix}badge-font-weight);
20 | line-height: 1;
21 | color: var(--#{$prefix}badge-color);
22 | text-align: center;
23 | white-space: nowrap;
24 | vertical-align: baseline;
25 | @include border-radius(var(--#{$prefix}badge-border-radius));
26 | @include gradient-bg();
27 |
28 | // Empty badges collapse automatically
29 | &:empty {
30 | display: none;
31 | }
32 | }
33 |
34 | // Quick fix for badges in buttons
35 | .btn .badge {
36 | position: relative;
37 | top: -1px;
38 | }
39 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | The changelog is tracked here but also in [the Releases section of the GitHub project](https://github.com/twbs/bootstrap-rubygem/releases).
4 | The changelog only includes changes specific to the RubyGem.
5 |
6 | The Bootstrap framework changes can be found in [the Releases section of twbs/bootstrap](https://github.com/twbs/bootstrap/releases).
7 | Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release of Bootstrap.
8 |
9 | # 5.3.4
10 |
11 | * Autoprefixer is now optional.
12 | [#283](https://github.com/twbs/bootstrap-rubygem/pull/283)
13 |
14 | # 5.3.3
15 |
16 | * Adds support for other Sass engines: dartsass-sprockets, dartsass-rails, and cssbundling-rails.
17 |
18 | # 4.2.1
19 |
20 | * Bootstrap rubygem now depends on SassC instead of Sass.
21 |
22 | # 4.0.0.beta2.1
23 |
24 | Fixes an extraneous `sourceMappingURL` in `bootstrap.js`.
25 | [#124](https://github.com/twbs/bootstrap-rubygem/issues/124)
26 |
27 | # 4.0.0.beta2
28 |
29 | Compass is no longer supported. Minimum required Sass version is now v3.5.2.
30 | [#122](https://github.com/twbs/bootstrap-rubygem/pull/122)
31 |
32 | # 4.0.0.alpha3.1
33 |
34 | This release corresponds to the upstream Bootstrap 4 Alpha 3.
35 |
--------------------------------------------------------------------------------
/assets/stylesheets/bootstrap/forms/_labels.scss:
--------------------------------------------------------------------------------
1 | //
2 | // Labels
3 | //
4 |
5 | .form-label {
6 | margin-bottom: $form-label-margin-bottom;
7 | @include font-size($form-label-font-size);
8 | font-style: $form-label-font-style;
9 | font-weight: $form-label-font-weight;
10 | color: $form-label-color;
11 | }
12 |
13 | // For use with horizontal and inline forms, when you need the label (or legend)
14 | // text to align with the form controls.
15 | .col-form-label {
16 | padding-top: add($input-padding-y, $input-border-width);
17 | padding-bottom: add($input-padding-y, $input-border-width);
18 | margin-bottom: 0; // Override the `