diff --git a/src/core/components/download-refresh/core-download-refresh.html b/src/core/components/download-refresh/core-download-refresh.html index c70f87a0e..4c9c00db2 100644 --- a/src/core/components/download-refresh/core-download-refresh.html +++ b/src/core/components/download-refresh/core-download-refresh.html @@ -8,7 +8,7 @@ + [attr.aria-label]="(statusTranslatable || 'core.refresh') | translate"> diff --git a/src/core/features/grades/pages/course/course.scss b/src/core/features/grades/pages/course/course.scss index 107b3972b..b1d430403 100644 --- a/src/core/features/grades/pages/course/course.scss +++ b/src/core/features/grades/pages/course/course.scss @@ -124,7 +124,7 @@ core-split-view.menu-and-content .core-grades-table .ion-hide-md-down { opacity: 0; } -@media (min-width: $breakpoint-md) { +@include media-breakpoint-down(md) { .core-grades-table td { font-size: 0.85em; diff --git a/src/theme/globals.mixins.ionic.scss b/src/theme/globals.mixins.ionic.scss index 56a82a054..c2d1d23fb 100644 --- a/src/theme/globals.mixins.ionic.scss +++ b/src/theme/globals.mixins.ionic.scss @@ -6,6 +6,31 @@ * https://github.com/ionic-team/ionic-framework/blob/master/core/src/themes/ionic.mixins.scss */ +// Responsive Mixins +// -------------------------------------------------- +// Creates a fixed width for the grid based on the screen size +// --------------------------------------------------------------------------------- +@mixin make-grid-widths($widths: $grid-widths, $breakpoints: $screen-breakpoints) { + @each $breakpoint, $width in $widths { + @include media-breakpoint-up($breakpoint, $breakpoints) { + width: $width; + } + } + + max-width: 100%; +} + +// Adds padding to the element based on breakpoints +// --------------------------------------------------------------------------------- +@mixin make-breakpoint-padding($paddings) { + @each $breakpoint in map-keys($paddings) { + @include media-breakpoint-up($breakpoint) { + $padding: map-get($paddings, $breakpoint); + + @include padding($padding); + } + } +} // Gets the active color's css variable from a variation. Alpha is optional. // -------------------------------------------------------------------------------------------- diff --git a/src/theme/globals.variables.scss b/src/theme/globals.variables.scss index 1b31a84fd..c0c8e0eb4 100644 --- a/src/theme/globals.variables.scss +++ b/src/theme/globals.variables.scss @@ -149,10 +149,15 @@ $core-dd-question-colors: $white, $blue-light, #DCDCDC, #D8BFD8, #87CEFA, #DAA52 * https://ionicframework.com/docs/layout/grid#default-breakpoints */ -$breakpoint-xs: 0px !default; -$breakpoint-sm: 576px !default; -$breakpoint-md: 768px !default; -$breakpoint-lg: 992px !default; -$breakpoint-xl: 1200px !default; +// The minimum dimensions at which your layout will change, +// adapting to different screen sizes, for use in media queries +$screen-breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + tablet: 992px, + xl: 1200px +) !default; -$breakpoint-tablet: $breakpoint-lg !default; +$breakpoint-tablet: map-get($screen-breakpoints, tablet), !default; diff --git a/src/theme/theme.dark.scss b/src/theme/theme.dark.scss index 141723271..c8ab76fec 100644 --- a/src/theme/theme.dark.scss +++ b/src/theme/theme.dark.scss @@ -34,8 +34,8 @@ --ion-color-step-900: #e7e7e7; --ion-color-step-950: #f3f3f3; - --light: var(--black); - --dark: var(--gray-lighter); + --light: #{$dark}; + --dark: #{$light}; @each $color-name, $value in $colors-dark { @include generate-color($color-name); diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss index 9170acbe9..1e7ca7425 100644 --- a/src/theme/theme.light.scss +++ b/src/theme/theme.light.scss @@ -47,16 +47,16 @@ --core-online-color: #{$core-online-color}; // Named Color Variables - --primary: var(--primary); - --secondary: var(--secondary); - --tertiary: var(--tertiary); - --success: var(--success); - --danger: var(--danger); - --warning: var(--warning); - --info: var(--info); - --light: var(--gray-lighter); - --dark: var(--black); - --medium: var(--gray-light); + --primary: #{$primary}; + --secondary: #{$secondary}; + --tertiary: #{$tertiary}; + --success: #{$success}; + --danger: #{$danger}; + --warning: #{$warning}; + --info: #{$info}; + --light: #{$light}; + --dark: #{$dark}; + --medium: #{$medium}; @each $color-name, $value in $colors { @include generate-color($color-name); @@ -65,6 +65,7 @@ --ion-text-color: #{$text-color}; --ion-text-color-rgb: 58,58,58; --ion-card-color: var(--ion-text-color); + --ion-item-background: var(--white); --text-hightlight-background-color: var(--custom-text-hightlight-background-color, #99c1ed);