Files
frontend-app-learning/src/index.scss
David Joy 86d28136de Paragon 10: Updating Dropdown and Button usages. (#187)
* Updating Dropdown and Button.

* Fixing broken tests and test warnings.

* Remove comment block.

* Using variant=“link” on the Tabs Dropdown.Toggle.

* Fixing some merge conflicts.
2020-08-20 13:46:44 -04:00

341 lines
6.8 KiB
SCSS
Executable File

$primary: #1176B2;
@import '~@edx/paragon/scss/edx/theme.scss';
@import "~@edx/frontend-component-header/dist/index";
@import "~@edx/frontend-component-footer/dist/footer";
// TODO: Fix .btn-outline-light style in paragon
.btn-outline-light {
&:hover, &:focus {
color: $primary;
border-color: $white;
background-color: $white;
}
&:not(:disabled):not(.disabled):active {
border-color: $white;
}
}
// TODO: Fix .container-fluid for mobile in paragon
.container-fluid {
@media (max-width: -1 + map-get($grid-breakpoints, 'sm')) {
padding-left: $grid-gutter-width/2;
padding-right: $grid-gutter-width/2;
}
}
#root {
display: flex;
flex-direction: column;
min-height: 100vh;
main {
flex-grow: 1;
}
header {
flex: 0 0 auto;
.logo {
display: block;
box-sizing: content-box;
position: relative;
top: .10em;
height: 1.75rem;
margin-right: 1rem;
img {
display: block;
height: 100%;
}
}
}
footer {
flex: 0;
}
}
.course-header {
min-width: 0;
.course-title-lockup {
min-width: 0;
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.user-dropdown {
.btn {
height: 3rem;
@media (max-width: -1 + map-get($grid-breakpoints, 'sm')) {
padding: 0 .5rem;
}
}
}
}
.course-tabs-navigation {
border-bottom: solid 1px #EAEAEA;
}
.nav-underline-tabs {
margin: 0 0 -1px;
.nav-link {
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
color: theme-color('gray', 400);
// temporary until we can remove .btn class from dropdowns
border-left: 0;
border-right: 0;
border-radius: 0;
&:hover,
&:focus,
&.active {
font-weight: $font-weight-normal;
color: theme-color('primary', 500);
border-bottom-color: theme-color('primary', 500);
}
}
}
.sequence-container {
display: flex;
flex-direction: column;
flex-grow: 1;
margin-bottom: 4rem;
// On mobile, the unit container will be responsible
// for container padding.
@media (min-width: map-get($grid-breakpoints, 'sm')) {
max-width: 1440px;
width: 100%;
margin-right: auto;
margin-left: auto;
}
}
.sequence {
@media (min-width: map-get($grid-breakpoints, 'sm')) {
border: solid 1px #EAEAEA;
border-radius: 4px;
}
}
.sequence-navigation {
display: flex;
@media (min-width: map-get($grid-breakpoints, 'sm')) {
margin: -1px -1px 0;
}
.btn {
flex-grow: 1;
display: inline-flex;
border-radius: 0;
border: solid 1px #EAEAEA;
border-left-width: 0;
position: relative;
font-weight: 400;
padding: 0 .375rem;
height: 3rem;
justify-content: center;
align-items: center;
color: theme-color('gray', 400);
white-space: nowrap;
&:hover,
&:focus,
&.active {
color: theme-color('gray', 700);
}
&:focus {
z-index: 1;
}
&.active {
&:after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background: $primary;
}
}
&.complete {
background-color: #EEF7E5;
color: $success;
}
&:first-child {
border-left-width: 0;
}
&:last-child {
border-right-width: 0;
}
}
.sequence-navigation-tabs-container {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 100%;
display: flex;
// min-width 0 prevents the flex item from overflowing the parent container
// https://dev.to/martyhimmel/quick-tip-to-stop-flexbox-from-overflowing-peb
min-width: 0;
}
.sequence-navigation-tabs {
.btn {
flex-basis: 100%;
min-width: 2rem;
}
}
.sequence-navigation-dropdown {
.dropdown-menu .btn {
flex-basis: 100%;
min-width: 4rem;
padding-left: 1rem;
padding-right: 1rem;
display: inline-flex;
align-items: center;
justify-content: flex-start;
border-right: 0;
& + .btn {
border-top: 0;
}
.unit-title {
flex-grow: 1;
text-align: left;
overflow: hidden;
min-width: 0;
margin: 0 1rem;
text-overflow: ellipsis;
}
&.active {
&:after {
content: '';
position: absolute;
bottom: 0px;
left: -1px;
top: 0;
right: auto;
width: 2px;
height: auto;
background: $primary;
}
}
}
.dropdown-item {
&.active {
// This is un-doing the default react-bootstrap styling for active dropdown-item elements.
background-color: transparent;
}
}
}
.previous-btn, .next-btn {
min-width: 4rem;
color: theme-color('gray', 700);
display: inline-flex;
justify-content: center;
align-items: center;
@media (max-width: -1 + map-get($grid-breakpoints, 'sm')) {
padding-top: 1rem;
padding-bottom: 1rem;
span {
@include sr-only();
}
}
@media (min-width: map-get($grid-breakpoints, 'sm')) {
min-width: 10rem;
}
}
.previous-btn {
border-left-width: 0;
margin-left: 0;
@media (min-width: map-get($grid-breakpoints, 'sm')) {
border-left-width: 1px;
border-top-left-radius: 4px;
}
}
.next-btn {
border-left-width: 1px;
border-right-width: 0;
@media (min-width: map-get($grid-breakpoints, 'sm')) {
border-top-right-radius: 4px;
border-right-width: 1px;
}
}
}
.sequence-footer .course-license a:hover {
color: theme-color('primary', 500) !important;
}
.unit-container {
padding: 0 $grid-gutter-width 2rem;
max-width: 1024px;
margin-left: auto;
margin-right: auto;
@media (min-width: 830px) {
padding-left: 40px;
padding-right: 40px;
}
}
.unit-iframe-wrapper {
margin: 0 -20px 2rem;
@media (min-width: 830px) {
margin: 0 -40px 2rem;
}
}
#unit-iframe {
width: 100%;
border: none;
display: block;
}
.unit-navigation {
display: flex;
justify-content: center;
max-width: 640px;
margin: 0 auto;
.previous-button,
.next-button {
white-space: nowrap;
border-radius: 4px;
&:focus:before {
border-radius: 6px;
}
}
.next-button {
flex-basis: 75%;
}
.previous-button {
flex-basis: 25%;
}
}
.modal {
max-width: 100%;
height: 100vh;
.modal-dialog {
max-width: 100%;
}
.modal-body {
width: 100%;
iframe {
width: 100%;
min-height:100vh;
}
}
}
// Import component-specific sass files
@import 'courseware/course/celebration/CelebrationModal.scss';
@import 'courseware/course/content-tools/calculator/calculator.scss';
@import 'courseware/course/content-tools/contentTools.scss';
@import 'course-home/dates-tab/Badge.scss';
@import 'course-home/dates-tab/Day.scss';