Skip to content

Commit

Permalink
[BD-46] resolve bootstrap conflicts with design tokens (#1800)
Browse files Browse the repository at this point in the history
* feat: resolve some Bootstrap conflicts with design tokens

Co-authored-by: Peter Kulko <[email protected]>
  • Loading branch information
2 people authored and adamstankiewicz committed Feb 17, 2023
1 parent 3ee0dd1 commit 15bcfc5
Show file tree
Hide file tree
Showing 93 changed files with 4,129 additions and 1,874 deletions.
27 changes: 27 additions & 0 deletions scss/core/bootstrap-override/mixins/_background-variant.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// stylelint-disable declaration-no-important

// Contextual backgrounds

@mixin bg-variant($parent, $color, $ignore-warning: false) {
#{$parent} {
background-color: $color !important;
}

a#{$parent},
button#{$parent} {
@include hover-focus() {
background-color: $color !important;
filter: brightness(10%);
}
}

@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
}

@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);
}
20 changes: 20 additions & 0 deletions scss/core/bootstrap-override/mixins/_text-emphasis.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// stylelint-disable declaration-no-important

// Typography

@mixin text-emphasis-variant($parent, $color, $ignore-warning: false) {
#{$parent} {
color: $color !important;
}

@if $emphasized-link-hover-darken-percentage != 0 {
a#{$parent} {
@include hover-focus() {
color: $color !important;
filter: brightness($emphasized-link-hover-darken-percentage);
}
}
}

@include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning);
}
553 changes: 505 additions & 48 deletions scss/core/tokens.css

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/Annotation/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ $annotation-light-bg: var(--pgn-color-annotation-bg-light) !default;
$annotation-dark-color: var(--pgn-color-annotation-text-dark) !default;
$annotation-dark-bg: var(--pgn-color-annotation-bg-dark) !default;

$annotation-success-color: var(--pgn-annotation-color-text-success) !default;
$annotation-success-bg: var(--pgn-annotation-color-bg-success) !default;

$annotation-warning-color: var(--pgn-annotation-color-text-warning) !default;
$annotation-warning-bg: var(--pgn-annotation-color-bg-warning) !default;

$annotation-error-color: var(--pgn-annotation-color-text-error) !default;
$annotation-error-bg: var(--pgn-annotation-color-bg-error) !default;

$annotation-light-color: var(--pgn-annotation-color-text-light) !default;
$annotation-light-bg: var(--pgn-annotation-color-bg-light) !default;

$annotation-dark-color: var(--pgn-annotation-color-text-dark) !default;
$annotation-dark-bg: var(--pgn-annotation-color-bg-dark) !default;

$annotation-variants: (
"success": ( "background-color": $annotation-success-bg, "color": $annotation-success-color ),
"warning": ( "background-color": $annotation-warning-bg, "color": $annotation-warning-color ),
Expand Down
43 changes: 0 additions & 43 deletions src/Badge/badge-bootstrap.scss

This file was deleted.

8 changes: 8 additions & 0 deletions src/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
opacity: $btn-disabled-opacity;
}

&:not(:disabled):not(.disabled):not(.btn-link):active,
&:not(:disabled):not(.disabled):not(.btn-link).active,
.show > &.dropdown-toggle {
color: var(--pgn-btn-active-color, inherit);
background-color: var(--pgn-btn-active-bg, inherit);
border-color: var(--pgn-btn-active-border-color, transparent);
}

// Button Icon Sizes

.btn-icon-before {
Expand Down
126 changes: 0 additions & 126 deletions src/Button/button-bootstrap.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/CloseButton/CloseButton.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import "variables";
@import "close-button-bootstrap";
@import "~bootstrap/scss/close";
32 changes: 0 additions & 32 deletions src/CloseButton/close-button-bootstrap.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/Code/Code.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import "variables";
@import "code-bootstrap";
@import "~bootstrap/scss/code";
56 changes: 0 additions & 56 deletions src/Code/code-bootstrap.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/DataTable/DataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
display: flex;
align-items: flex-start;

// TODO CSS variables cannot be used as media breakpoints
@media (max-width: $max-width-xl) {
overflow-x: scroll;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fieldset/Fieldset.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.paragon-fieldset {
margin-bottom: calc($spacer * 1.5);
margin-bottom: calc(#{$spacer} * 1.5);

.form-control {
height: auto;
Expand Down
2 changes: 0 additions & 2 deletions src/Modal/_ModalDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
&::before {
content: "";
background-color: transparent;
// TODO needs a decision
background-image: linear-gradient(#605C5C, #B8BEBE, transparent 50%);
display: block;
height: 20px;
Expand All @@ -154,7 +153,6 @@
&::after {
content: "";
background-color: transparent;
// TODO needs a decision
background-image:
linear-gradient(
360deg,
Expand Down
Loading

0 comments on commit 15bcfc5

Please sign in to comment.