-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: solving problems with bootstrap
- Loading branch information
1 parent
b01abee
commit adef627
Showing
41 changed files
with
961 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import "@edx/brand-openedx/paragon/fonts"; | ||
@import "@edx/brand-openedx/paragon/variables"; | ||
@import "@edx/paragon/scss/core/core"; | ||
@import "~@edx/paragon/scss/core/core"; | ||
@import "@edx/brand-openedx/paragon/overrides"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@import "variables"; | ||
@import "~bootstrap/scss/badge"; | ||
@import "badge-bootstrap"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.badge { | ||
display: inline-block; | ||
padding: var(--pgn-badge-padding-y) var(--pgn-badge-padding-x-base); | ||
|
||
@include font-size(var(--pgn-badge-font-size)); | ||
|
||
font-weight: var(--pgn-badge-font-weight); | ||
line-height: 1; | ||
text-align: center; | ||
white-space: nowrap; | ||
vertical-align: baseline; | ||
|
||
@include border-radius(var(--pgn-badge-border-radius-base)); | ||
@include transition(var(--pgn-badge-transition)); | ||
|
||
@at-root a#{&} { | ||
@include hover-focus() { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
&:empty { | ||
display: none; | ||
} | ||
} | ||
|
||
.btn .badge { | ||
position: relative; | ||
top: -1px; | ||
} | ||
|
||
.badge-pill { | ||
padding-right: var(--pgn-badge-padding-x-pill); | ||
padding-left: var(--pgn-badge-padding-x-pill); | ||
|
||
@include border-radius(var(--pgn-badge-border-radius-pill)); | ||
} | ||
|
||
@each $color, $value in $theme-colors { | ||
.badge-#{$color} { | ||
@include badge-variant($value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
.btn-group, | ||
.btn-group-vertical { | ||
position: relative; | ||
display: inline-flex; | ||
vertical-align: middle; | ||
|
||
> .btn { | ||
position: relative; | ||
flex: 1 1 auto; | ||
|
||
@include hover() { | ||
z-index: 1; | ||
} | ||
|
||
&:focus, | ||
&:active, | ||
&.active { | ||
z-index: 1; | ||
} | ||
} | ||
} | ||
|
||
.btn-toolbar { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
|
||
.input-group { | ||
width: auto; | ||
} | ||
} | ||
|
||
.btn-group { | ||
> .btn:not(:first-child), | ||
> .btn-group:not(:first-child) { | ||
margin-left: calc(var(--pgn-btn-border-width) * -1); | ||
} | ||
|
||
> .btn:not(:last-child):not(.dropdown-toggle), | ||
> .btn-group:not(:last-child) > .btn { | ||
@include border-right-radius(0); | ||
} | ||
|
||
> .btn:not(:first-child), | ||
> .btn-group:not(:first-child) > .btn { | ||
@include border-left-radius(0); | ||
} | ||
} | ||
|
||
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */ | ||
.btn-group-sm > .btn { @extend .btn-sm; } | ||
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */ | ||
.btn-group-lg > .btn { @extend .btn-lg; } | ||
|
||
.dropdown-toggle-split { | ||
padding-right: calc(var(--pgn-btn-padding-x) * .75); | ||
padding-left: calc(var(--pgn-btn-padding-x) * .75); | ||
|
||
&::after, | ||
.dropup &::after, | ||
.dropright &::after { | ||
margin-left: 0; | ||
} | ||
|
||
.dropleft &::before { | ||
margin-right: 0; | ||
} | ||
} | ||
|
||
.btn-sm + .dropdown-toggle-split { | ||
padding-right: calc(var(--pgn-btn-padding-x-sm) * .75); | ||
padding-left: calc(var(--pgn-btn-padding-x-sm) * .75); | ||
} | ||
|
||
.btn-lg + .dropdown-toggle-split { | ||
padding-right: calc(var(--pgn-btn-padding-x-lg) * .75); | ||
padding-left: calc(var(--pgn-btn-padding-x-lg) * .75); | ||
} | ||
|
||
.btn-group.show .dropdown-toggle { | ||
@include box-shadow(var(--pgn-btn-box-shadow-active)); | ||
|
||
&.btn-link { | ||
@include box-shadow(none); | ||
} | ||
} | ||
|
||
.btn-group-vertical { | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: center; | ||
|
||
> .btn, | ||
> .btn-group { | ||
width: 100%; | ||
} | ||
|
||
> .btn:not(:first-child), | ||
> .btn-group:not(:first-child) { | ||
margin-top: calc(var(--pgn-btn-border-width) * -1); | ||
} | ||
|
||
> .btn:not(:last-child):not(.dropdown-toggle), | ||
> .btn-group:not(:last-child) > .btn { | ||
@include border-bottom-radius(0); | ||
} | ||
|
||
> .btn:not(:first-child), | ||
> .btn-group:not(:first-child) > .btn { | ||
@include border-top-radius(0); | ||
} | ||
} | ||
|
||
.btn-group-toggle { | ||
> .btn, | ||
> .btn-group > .btn { | ||
margin-bottom: 0; | ||
|
||
input[type="radio"], | ||
input[type="checkbox"] { | ||
position: absolute; | ||
clip: rect(0, 0, 0, 0); | ||
pointer-events: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import "variables"; | ||
@import "~bootstrap/scss/card"; | ||
@import "card-bootstrap"; | ||
|
||
.pgn__card, | ||
.pgn__card-body { | ||
|
Oops, something went wrong.