mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +02:00
Remove add, subtract functions
This commit is contained in:
@@ -219,45 +219,45 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|||||||
// scss-docs-end color-functions
|
// scss-docs-end color-functions
|
||||||
|
|
||||||
// Return valid calc
|
// Return valid calc
|
||||||
@function add($value1, $value2, $return-calc: true) {
|
// @function add($value1, $value2, $return-calc: true) {
|
||||||
@if $value1 == null {
|
// @if $value1 == null {
|
||||||
@return $value2;
|
// @return $value2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if $value2 == null {
|
// @if $value2 == null {
|
||||||
@return $value1;
|
// @return $value1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
// @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
||||||
@return $value1 + $value2;
|
// @return $value1 + $value2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
// @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@function subtract($value1, $value2, $return-calc: true) {
|
// @function subtract($value1, $value2, $return-calc: true) {
|
||||||
@if $value1 == null and $value2 == null {
|
// @if $value1 == null and $value2 == null {
|
||||||
@return null;
|
// @return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if $value1 == null {
|
// @if $value1 == null {
|
||||||
@return -$value2;
|
// @return -$value2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if $value2 == null {
|
// @if $value2 == null {
|
||||||
@return $value1;
|
// @return $value1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
// @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
||||||
@return $value1 - $value2;
|
// @return $value1 - $value2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@if type-of($value2) != number {
|
// @if type-of($value2) != number {
|
||||||
$value2: unquote("(") + $value2 + unquote(")");
|
// $value2: unquote("(") + $value2 + unquote(")");
|
||||||
}
|
// }
|
||||||
|
|
||||||
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
// @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@function divide($dividend, $divisor, $precision: 10) {
|
@function divide($dividend, $divisor, $precision: 10) {
|
||||||
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
||||||
|
@@ -922,13 +922,13 @@ $input-plaintext-color: var(--#{$prefix}body-color) !default;
|
|||||||
|
|
||||||
$input-height-border: calc(#{$input-border-width} * 2) !default; // stylelint-disable-line function-disallowed-list
|
$input-height-border: calc(#{$input-border-width} * 2) !default; // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;
|
$input-height-inner: calc(#{$input-line-height} * 1em + #{$input-padding-y} * 2) !default;
|
||||||
$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;
|
$input-height-inner-half: calc(#{$input-line-height} * .5em + #{$input-padding-y}) !default;
|
||||||
$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;
|
$input-height-inner-quarter: calc(#{$input-line-height} * .25em + #{$input-padding-y} * .5) !default;
|
||||||
|
|
||||||
$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;
|
$input-height: calc(#{$input-line-height} * 1em + #{$input-padding-y} * 2 + #{$input-height-border}) !default;
|
||||||
$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;
|
$input-height-sm: calc(#{$input-line-height} * 1em + #{$input-padding-y-sm} * 2 + #{$input-height-border}) !default;
|
||||||
$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
|
$input-height-lg: calc(#{$input-line-height} * 1em + #{$input-padding-y-lg} * 2 + #{$input-height-border}) !default;
|
||||||
|
|
||||||
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
|
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
|
||||||
|
|
||||||
@@ -1068,7 +1068,7 @@ $form-file-button-hover-bg: var(--#{$prefix}secondary-bg) !default;
|
|||||||
// scss-docs-end form-file-variables
|
// scss-docs-end form-file-variables
|
||||||
|
|
||||||
// scss-docs-start form-floating-variables
|
// scss-docs-start form-floating-variables
|
||||||
$form-floating-height: add(3.5rem, $input-height-border) !default;
|
$form-floating-height: calc(3.5rem + #{$input-height-border}) !default;
|
||||||
$form-floating-line-height: 1.25 !default;
|
$form-floating-line-height: 1.25 !default;
|
||||||
$form-floating-padding-x: $input-padding-x !default;
|
$form-floating-padding-x: $input-padding-x !default;
|
||||||
$form-floating-padding-y: 1rem !default;
|
$form-floating-padding-y: 1rem !default;
|
||||||
@@ -1348,7 +1348,7 @@ $card-border-width: var(--#{$prefix}border-width) !default;
|
|||||||
$card-border-color: var(--#{$prefix}border-color-translucent) !default;
|
$card-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||||
$card-border-radius: var(--#{$prefix}border-radius) !default;
|
$card-border-radius: var(--#{$prefix}border-radius) !default;
|
||||||
$card-box-shadow: null !default;
|
$card-box-shadow: null !default;
|
||||||
$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;
|
$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
|
||||||
$card-cap-padding-y: $card-spacer-y * .5 !default;
|
$card-cap-padding-y: $card-spacer-y * .5 !default;
|
||||||
$card-cap-padding-x: $card-spacer-x !default;
|
$card-cap-padding-x: $card-spacer-x !default;
|
||||||
$card-cap-bg: rgba(var(--#{$prefix}body-color-rgb), .03) !default;
|
$card-cap-bg: rgba(var(--#{$prefix}body-color-rgb), .03) !default;
|
||||||
@@ -1370,7 +1370,7 @@ $accordion-bg: var(--#{$prefix}body-bg) !default;
|
|||||||
$accordion-border-width: var(--#{$prefix}border-width) !default;
|
$accordion-border-width: var(--#{$prefix}border-width) !default;
|
||||||
$accordion-border-color: var(--#{$prefix}border-color) !default;
|
$accordion-border-color: var(--#{$prefix}border-color) !default;
|
||||||
$accordion-border-radius: var(--#{$prefix}border-radius) !default;
|
$accordion-border-radius: var(--#{$prefix}border-radius) !default;
|
||||||
$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;
|
$accordion-inner-border-radius: calc(#{$accordion-border-radius} - #{$accordion-border-width}) !default;
|
||||||
|
|
||||||
$accordion-body-padding-y: $accordion-padding-y !default;
|
$accordion-body-padding-y: $accordion-padding-y !default;
|
||||||
$accordion-body-padding-x: $accordion-padding-x !default;
|
$accordion-body-padding-x: $accordion-padding-x !default;
|
||||||
@@ -1512,7 +1512,7 @@ $modal-content-bg: var(--#{$prefix}body-bg) !default;
|
|||||||
$modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;
|
$modal-content-border-color: var(--#{$prefix}border-color-translucent) !default;
|
||||||
$modal-content-border-width: var(--#{$prefix}border-width) !default;
|
$modal-content-border-width: var(--#{$prefix}border-width) !default;
|
||||||
$modal-content-border-radius: var(--#{$prefix}border-radius-lg) !default;
|
$modal-content-border-radius: var(--#{$prefix}border-radius-lg) !default;
|
||||||
$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;
|
$modal-content-inner-border-radius: calc(#{$modal-content-border-radius} - #{$modal-content-border-width}) !default;
|
||||||
$modal-content-box-shadow-xs: var(--#{$prefix}box-shadow-sm) !default;
|
$modal-content-box-shadow-xs: var(--#{$prefix}box-shadow-sm) !default;
|
||||||
$modal-content-box-shadow-sm-up: var(--#{$prefix}box-shadow) !default;
|
$modal-content-box-shadow-sm-up: var(--#{$prefix}box-shadow) !default;
|
||||||
|
|
||||||
|
62
scss/bootstrap-grid.scss
vendored
62
scss/bootstrap-grid.scss
vendored
@@ -1,62 +0,0 @@
|
|||||||
@import "mixins/banner";
|
|
||||||
@include bsBanner(Grid);
|
|
||||||
|
|
||||||
$include-column-box-sizing: true !default;
|
|
||||||
|
|
||||||
@import "functions";
|
|
||||||
@import "variables";
|
|
||||||
@import "variables-dark";
|
|
||||||
@import "maps";
|
|
||||||
|
|
||||||
@import "mixins/breakpoints";
|
|
||||||
@import "mixins/container";
|
|
||||||
@import "mixins/grid";
|
|
||||||
@import "mixins/utilities";
|
|
||||||
|
|
||||||
@import "vendor/rfs";
|
|
||||||
|
|
||||||
@import "containers";
|
|
||||||
@import "grid";
|
|
||||||
|
|
||||||
@import "utilities";
|
|
||||||
// Only use the utilities we need
|
|
||||||
// stylelint-disable-next-line scss/dollar-variable-default
|
|
||||||
$utilities: map-get-multiple(
|
|
||||||
$utilities,
|
|
||||||
(
|
|
||||||
"display",
|
|
||||||
"order",
|
|
||||||
"flex",
|
|
||||||
"flex-direction",
|
|
||||||
"flex-grow",
|
|
||||||
"flex-shrink",
|
|
||||||
"flex-wrap",
|
|
||||||
"justify-content",
|
|
||||||
"align-items",
|
|
||||||
"align-content",
|
|
||||||
"align-self",
|
|
||||||
"margin",
|
|
||||||
"margin-x",
|
|
||||||
"margin-y",
|
|
||||||
"margin-top",
|
|
||||||
"margin-end",
|
|
||||||
"margin-bottom",
|
|
||||||
"margin-start",
|
|
||||||
"negative-margin",
|
|
||||||
"negative-margin-x",
|
|
||||||
"negative-margin-y",
|
|
||||||
"negative-margin-top",
|
|
||||||
"negative-margin-end",
|
|
||||||
"negative-margin-bottom",
|
|
||||||
"negative-margin-start",
|
|
||||||
"padding",
|
|
||||||
"padding-x",
|
|
||||||
"padding-y",
|
|
||||||
"padding-top",
|
|
||||||
"padding-end",
|
|
||||||
"padding-bottom",
|
|
||||||
"padding-start",
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
@import "utilities/api";
|
|
10
scss/bootstrap-reboot.scss
vendored
10
scss/bootstrap-reboot.scss
vendored
@@ -1,10 +0,0 @@
|
|||||||
@import "mixins/banner";
|
|
||||||
@include bsBanner(Reboot);
|
|
||||||
|
|
||||||
@import "functions";
|
|
||||||
@import "variables";
|
|
||||||
@import "variables-dark";
|
|
||||||
@import "maps";
|
|
||||||
@import "mixins";
|
|
||||||
@import "root";
|
|
||||||
@import "reboot";
|
|
19
scss/bootstrap-utilities.scss
vendored
19
scss/bootstrap-utilities.scss
vendored
@@ -1,19 +0,0 @@
|
|||||||
@import "mixins/banner";
|
|
||||||
@include bsBanner(Utilities);
|
|
||||||
|
|
||||||
// Configuration
|
|
||||||
@import "functions";
|
|
||||||
@import "variables";
|
|
||||||
@import "variables-dark";
|
|
||||||
@import "maps";
|
|
||||||
@import "mixins";
|
|
||||||
@import "utilities";
|
|
||||||
|
|
||||||
// Layout & components
|
|
||||||
@import "root";
|
|
||||||
|
|
||||||
// Helpers
|
|
||||||
@import "helpers";
|
|
||||||
|
|
||||||
// Utilities
|
|
||||||
@import "utilities/api";
|
|
8
scss/bootstrap.scss
vendored
8
scss/bootstrap.scss
vendored
@@ -1,6 +1,8 @@
|
|||||||
@import "mixins/banner";
|
/*!
|
||||||
@include bsBanner("");
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2024 The Bootstrap Authors
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
|
||||||
// scss-docs-start import-stack
|
// scss-docs-start import-stack
|
||||||
// Configuration
|
// Configuration
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.form-range {
|
.form-range {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
|
height: calc(#{$form-range-thumb-height} + #{$form-range-thumb-focus-box-shadow-width} * 2);
|
||||||
padding: 0; // Need to reset padding
|
padding: 0; // Need to reset padding
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
// For use with horizontal and inline forms, when you need the label (or legend)
|
// For use with horizontal and inline forms, when you need the label (or legend)
|
||||||
// text to align with the form controls.
|
// text to align with the form controls.
|
||||||
.col-form-label {
|
.col-form-label {
|
||||||
padding-top: add($input-padding-y, $input-border-width);
|
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
|
||||||
padding-bottom: add($input-padding-y, $input-border-width);
|
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
|
||||||
margin-bottom: 0; // Override the `<legend>` default
|
margin-bottom: 0; // Override the `<legend>` default
|
||||||
@include font-size(inherit); // Override the `<legend>` default
|
@include font-size(inherit); // Override the `<legend>` default
|
||||||
font-style: $form-label-font-style;
|
font-style: $form-label-font-style;
|
||||||
@@ -24,13 +24,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.col-form-label-lg {
|
.col-form-label-lg {
|
||||||
padding-top: add($input-padding-y-lg, $input-border-width);
|
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||||
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||||
@include font-size($input-font-size-lg);
|
@include font-size($input-font-size-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-form-label-sm {
|
.col-form-label-sm {
|
||||||
padding-top: add($input-padding-y-sm, $input-border-width);
|
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||||
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||||
@include font-size($input-font-size-sm);
|
@include font-size($input-font-size-sm);
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@
|
|||||||
.form-control-color {
|
.form-control-color {
|
||||||
@include form-validation-state-selector($state) {
|
@include form-validation-state-selector($state) {
|
||||||
@if $enable-validation-icons {
|
@if $enable-validation-icons {
|
||||||
width: add($form-color-width, $input-height-inner);
|
width: calc(#{$form-color-width} + #{$input-height-inner});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
// Override collapse behaviors
|
// Override collapse behaviors
|
||||||
// stylelint-disable-next-line declaration-no-important
|
// stylelint-disable-next-line declaration-no-important
|
||||||
display: block !important;
|
display: block !important;
|
||||||
height: subtract(100vh, 6rem);
|
height: calc(100vh - 6rem);
|
||||||
// Prevent focus styles to be cut off:
|
// Prevent focus styles to be cut off:
|
||||||
padding-left: .25rem;
|
padding-left: .25rem;
|
||||||
margin-left: -.25rem;
|
margin-left: -.25rem;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
top: 5rem;
|
top: 5rem;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
height: subtract(100vh, 7rem);
|
height: calc(100vh - 7rem);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user