2023-03-04
This commit is contained in:
78
src/scss/components/_border-radius.scss
Normal file
78
src/scss/components/_border-radius.scss
Normal file
@@ -0,0 +1,78 @@
|
||||
// stylelint-disable property-disallowed-list
|
||||
// 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;
|
||||
}
|
||||
|
||||
// scss-docs-start border-radius-mixins
|
||||
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
||||
@if $enable-rounded {
|
||||
border-radius: valid-radius($radius);
|
||||
}
|
||||
@else if $fallback-border-radius != false {
|
||||
border-radius: $fallback-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-end-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-start-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-start-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-end-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-end-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-start-radius($radius: $border-radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
// scss-docs-end border-radius-mixins
|
||||
18
src/scss/components/_box-shadow.scss
Normal file
18
src/scss/components/_box-shadow.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
@mixin box-shadow($shadow...) {
|
||||
@if $enable-shadows {
|
||||
$result: ();
|
||||
|
||||
@each $value in $shadow {
|
||||
@if $value != null {
|
||||
$result: append($result, $value, "comma");
|
||||
}
|
||||
@if $value == none and length($shadow) > 1 {
|
||||
@warn "The keyword 'none' must be used as a single argument.";
|
||||
}
|
||||
}
|
||||
|
||||
@if (length($result) > 0) {
|
||||
box-shadow: $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
src/scss/components/_progress.scss
Normal file
72
src/scss/components/_progress.scss
Normal file
@@ -0,0 +1,72 @@
|
||||
|
||||
|
||||
$progress-height: 1rem;
|
||||
$progress-font-size: $tu-base-fontSize * .75;
|
||||
$progress-bg: $color-grey-200;
|
||||
$progress-border-radius: $border-radius-small;
|
||||
$progress-box-shadow: $inset-box-shadow-small;
|
||||
$progress-bar-color: $ts-white;
|
||||
$progress-bar-bg: $ts-green;
|
||||
$progress-bar-animation-timing: 1s linear infinite;
|
||||
$progress-bar-transition: width .6s ease;
|
||||
$prefix: "";
|
||||
|
||||
// Disable animation if transitions are disabled
|
||||
|
||||
// scss-docs-start progress-keyframes
|
||||
// @if $enable-transitions {
|
||||
// @keyframes progress-bar-stripes {
|
||||
// 0% { background-position-x: $progress-height; }
|
||||
// }
|
||||
// }
|
||||
// scss-docs-end progress-keyframes
|
||||
|
||||
.progress {
|
||||
// scss-docs-start progress-css-vars
|
||||
--#{$prefix}progress-height: #{$progress-height};
|
||||
// @include rfs($progress-font-size, --#{$prefix}progress-font-size);
|
||||
--#{$prefix}progress-bg: #{$progress-bg};
|
||||
--#{$prefix}progress-border-radius: #{$progress-border-radius};
|
||||
--#{$prefix}progress-box-shadow: #{$progress-box-shadow};
|
||||
--#{$prefix}progress-bar-color: #{$progress-bar-color};
|
||||
--#{$prefix}progress-bar-bg: #{$progress-bar-bg};
|
||||
--#{$prefix}progress-bar-transition: #{$progress-bar-transition};
|
||||
// scss-docs-end progress-css-vars
|
||||
|
||||
display: flex;
|
||||
height: var(--#{$prefix}progress-height);
|
||||
overflow: hidden; // force rounded corners by cropping it
|
||||
// @include font-size(var(--#{$prefix}progress-font-size));
|
||||
background-color: var(--#{$prefix}progress-bg);
|
||||
// @include border-radius(var(--#{$prefix}progress-border-radius));
|
||||
// @include box-shadow(var(--#{$prefix}progress-box-shadow));
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
color: var(--#{$prefix}progress-bar-color);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: var(--#{$prefix}progress-bar-bg);
|
||||
// @include transition(var(--#{$prefix}progress-bar-transition));
|
||||
}
|
||||
|
||||
.progress-bar-striped {
|
||||
// @include gradient-striped();
|
||||
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
||||
}
|
||||
|
||||
// @if $enable-transitions {
|
||||
// .progress-bar-animated {
|
||||
// animation: $progress-bar-animation-timing progress-bar-stripes;
|
||||
|
||||
// @if $enable-reduced-motion {
|
||||
// @media (prefers-reduced-motion: reduce) {
|
||||
// animation: none;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user