-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(theme): bring back the theme in the project
- Loading branch information
Showing
28 changed files
with
579 additions
and
11 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
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
2 changes: 1 addition & 1 deletion
2
.../pages/portal/panels/feature/feature-custom-details/feature-custom-details.component.scss
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
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,2 @@ | ||
@forward './base'; | ||
@forward './components'; |
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,4 @@ | ||
@forward './breakpoints'; | ||
@forward './colors' as colors-*; | ||
@forward './palette'; | ||
@forward './typography'; |
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,57 @@ | ||
@use 'sass:map'; | ||
|
||
// There is no standard for breakpoints for the Quebec.ca theme | ||
// This is the Material breakpoint design by devices | ||
$device-breakpoints: ( | ||
mobile: ( | ||
max: 599px | ||
), | ||
tablet: ( | ||
min: 600px, | ||
max: 1239px | ||
), | ||
laptop: ( | ||
min: 1240px, | ||
max: 1439px | ||
), | ||
desktop: ( | ||
min: 1440px | ||
) | ||
); | ||
|
||
// Source: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_breakpoints.scss | ||
@function breakpoint-min($name, $breakpoints: $device-breakpoints) { | ||
$min: map.get($breakpoints, $name, min); | ||
@return if($min != 0, $min, null); | ||
} | ||
|
||
@function breakpoint-max($name, $breakpoints: $device-breakpoints) { | ||
$max: map.get($breakpoints, $name, max); | ||
@return if($max and $max > 0, $max, null); | ||
} | ||
|
||
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint. | ||
// Makes the @content apply to the given breakpoint and wider. | ||
@mixin media-breakpoint-up($name, $breakpoints: $device-breakpoints) { | ||
$min: breakpoint-min($name, $breakpoints); | ||
@if $min { | ||
@media (min-width: $min) { | ||
@content; | ||
} | ||
} @else { | ||
@content; | ||
} | ||
} | ||
|
||
// Media of at most the maximum breakpoint width. No query for the largest breakpoint. | ||
// Makes the @content apply to the given breakpoint and narrower. | ||
@mixin media-breakpoint-down($name, $breakpoints: $device-breakpoints) { | ||
$max: breakpoint-max($name, $breakpoints); | ||
@if $max { | ||
@media (max-width: $max) { | ||
@content; | ||
} | ||
} @else { | ||
@content; | ||
} | ||
} |
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,40 @@ | ||
@use 'sass:map'; | ||
|
||
// https://design.quebec.ca/bases/couleurs#c118192 | ||
$colors: ( | ||
blue: ( | ||
light: #dae6f0, | ||
light-2: #4a98d9, | ||
normal: #1472bf, | ||
normal-piv: #095797, | ||
medium: #19406c, | ||
dark: #223654 | ||
), | ||
grey: ( | ||
light: #f1f1f2, | ||
light-2: #c5cad2, | ||
normal: #8893a2, | ||
medium: #6b778a, | ||
dark: #4e5662 | ||
), | ||
red: ( | ||
pink-light: #ffdbd6, | ||
pink: #e58271, | ||
normal: #cb381f, | ||
dark: #692519 | ||
), | ||
green: ( | ||
light: #d7f0bb, | ||
normal: #4f813d, | ||
dark: #2c4024 | ||
), | ||
yellow: ( | ||
light: #f8e69a, | ||
normal: #e0ad03, | ||
dark: #ad781c | ||
) | ||
); | ||
|
||
@function get($color, $name) { | ||
@return map.get($colors, $color, $name); | ||
} |
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,50 @@ | ||
@use 'sass:map'; | ||
@use 'sass:color'; | ||
@use './colors'; | ||
|
||
$blue-light: colors.get(blue, light); | ||
$blue-light-2: colors.get(blue, light-2); | ||
$blue-normal: colors.get(blue, normal); | ||
$blue-normal-piv: colors.get(blue, normal-piv); | ||
$blue-medium: colors.get(blue, medium); | ||
$blue-dark: colors.get(blue, dark); | ||
|
||
// Design Quebec colors | ||
$primary: $blue-normal-piv; | ||
$accent: colors.get(red, pink); | ||
|
||
$dark-primary-text: $blue-dark; | ||
$light-primary-text: white; | ||
|
||
$palette: ( | ||
50: $blue-light, | ||
100: color.adjust($blue-light-2, $lightness: 20%), | ||
200: color.adjust($blue-light-2, $lightness: 10%), | ||
300: $blue-light-2, | ||
400: $blue-normal, | ||
500: $primary, | ||
600: color.adjust($primary, $lightness: -10%), | ||
700: $blue-medium, | ||
800: color.adjust($blue-medium, $lightness: -10%), | ||
900: $blue-dark, | ||
A100: $blue-normal, | ||
A200: color.adjust($blue-normal, $lightness: 10%), | ||
A400: colors.get(grey, light-2), | ||
A700: colors.get(grey, light), | ||
contrast: ( | ||
50: $dark-primary-text, | ||
100: $dark-primary-text, | ||
200: $dark-primary-text, | ||
300: $dark-primary-text, | ||
400: $dark-primary-text, | ||
500: $light-primary-text, | ||
600: $light-primary-text, | ||
700: $light-primary-text, | ||
800: $light-primary-text, | ||
900: $light-primary-text, | ||
A100: $dark-primary-text, | ||
A200: $light-primary-text, | ||
A400: $light-primary-text, | ||
A700: $light-primary-text | ||
) | ||
); |
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,2 @@ | ||
@forward './typography' as typo-*; | ||
@forward './typography.utils'; |
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,138 @@ | ||
@use 'sass:map'; | ||
@use '@angular/material' as mat; | ||
@use '../palette'; | ||
@use '../breakpoints'; | ||
@use './typography.utils' as typo-utils; | ||
|
||
// https://design.quebec.ca/bases/polices-caracteres | ||
// https://design.quebec.ca/bases/niveaux-titres | ||
// https://material.angular.io/guide/typography | ||
$typography: mat.define-typography-config( | ||
$font-family: '"Open Sans", sans-serif', | ||
$headline-1: mat.define-typography-level(110px, 110px, 500), | ||
$headline-2: mat.define-typography-level(54px, 54px, 500), | ||
$headline-3: mat.define-typography-level(43px, 46px, 500), | ||
$headline-4: mat.define-typography-level(32px, 38px, 500), | ||
// h1 | ||
$headline-5: mat.define-typography-level(48px, 56px, bold), | ||
// h2 | ||
$headline-6: mat.define-typography-level(36px, 40px, bold), | ||
// h3 | ||
$subtitle-1: mat.define-typography-level(28px, 32px, bold), | ||
// h4 | ||
$subtitle-2: mat.define-typography-level(21px, 24px, bold), | ||
$body-1: mat.define-typography-level(16px, 24px, 400), | ||
$body-2: mat.define-typography-level(12px, 18px, 400), | ||
$caption: mat.define-typography-level(12px, 18px, 400), | ||
$button: mat.define-typography-level(13px, 13px, 500) | ||
); | ||
|
||
$typography-mobile: mat.define-typography-config( | ||
// h1 | ||
$headline-5: mat.define-typography-level(36px, 40px, bold), | ||
// h2 | ||
$headline-6: mat.define-typography-level(28px, 32px, bold), | ||
// h3 | ||
$subtitle-1: mat.define-typography-level(25px, 32px, bold) | ||
); | ||
|
||
$font-color: map.get(palette.$palette, 900); | ||
|
||
@mixin set-base-styles { | ||
body { | ||
color: $font-color; | ||
} | ||
|
||
a { | ||
word-break: break-word; | ||
overflow-wrap: break-word; | ||
cursor: pointer; | ||
color: palette.$primary; | ||
text-decoration: underline; | ||
background-color: transparent; | ||
} | ||
|
||
p, | ||
ul, | ||
li, | ||
u, | ||
.text { | ||
color: $font-color; | ||
font-size: 16px; | ||
line-height: 24px; | ||
} | ||
|
||
p { | ||
margin-bottom: 24px; | ||
} | ||
|
||
strong { | ||
font-weight: 600; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
.h1, | ||
.h2, | ||
.h3, | ||
.h4, | ||
.h5, | ||
.h6 { | ||
font-family: Roboto, sans-serif !important; | ||
color: $font-color; | ||
} | ||
|
||
h1 { | ||
margin-top: 72px !important; | ||
margin-bottom: 32px !important; | ||
|
||
@include typo-utils.title-border; | ||
|
||
@include breakpoints.media-breakpoint-down(tablet) { | ||
margin-top: 48px !important; | ||
margin-bottom: 16px !important; | ||
} | ||
} | ||
|
||
h2 { | ||
margin-top: 48px !important; | ||
margin-bottom: 16px !important; | ||
} | ||
|
||
h3 { | ||
margin-top: 24px !important; | ||
margin-bottom: 16px !important; | ||
} | ||
|
||
// WORKAROUND, mat-typography area of intersection h4 is using mat-body-1 | ||
// https://github.com/angular/components/issues/26351 | ||
h4 { | ||
@include typo-utils.title-level-4; | ||
} | ||
|
||
h4 { | ||
margin-top: 24px !important; | ||
margin-bottom: 8px !important; | ||
} | ||
|
||
h5 { | ||
font-size: 19px !important; | ||
line-height: 24px !important; | ||
} | ||
|
||
h6 { | ||
font-size: 16px !important; | ||
line-height: 20px !important; | ||
} | ||
|
||
h5, | ||
h6 { | ||
font-weight: bold !important; | ||
margin-top: 16px !important; | ||
margin-bottom: 0px !important; | ||
} | ||
} |
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,18 @@ | ||
@use '../palette'; | ||
|
||
@mixin title-border { | ||
&:after { | ||
content: ''; | ||
display: block; | ||
margin: 0; | ||
width: 48px; | ||
padding-top: 4px; | ||
border-bottom: 4px solid palette.$accent; | ||
} | ||
} | ||
|
||
@mixin title-level-4 { | ||
font-size: 21px !important; | ||
line-height: 24px !important; | ||
font-weight: bold !important; | ||
} |
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,10 @@ | ||
@use './button'; | ||
@use './dialog'; | ||
@use './form-field'; | ||
@use './input'; | ||
@use './list'; | ||
@use './panel'; | ||
@use './search-bar'; | ||
@use './scrollbar'; | ||
|
||
@forward './_index.theme' as all-component-*; |
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,5 @@ | ||
@use './search-bar.theme' as search-bar; | ||
|
||
@mixin themes($theme) { | ||
@include search-bar.theme($theme); | ||
} |
Oops, something went wrong.