diff --git a/demo-shell/src/custom-style-dev.scss b/demo-shell/src/custom-style-dev.scss index 77f51c5fe1..7509f6800d 100644 --- a/demo-shell/src/custom-style-dev.scss +++ b/demo-shell/src/custom-style-dev.scss @@ -1,6 +1,7 @@ @use '@angular/material' as mat; @import '../../lib/core/src/lib/styles/index'; -@include mat.core($alfresco-typography); +@import '../../lib/core/src/lib/styles/typography'; +@include mat.core; $primary: mat.define-palette($alfresco-accent-orange); $accent: mat.define-palette($alfresco-accent-purple); @@ -10,21 +11,24 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); @include mat.all-component-themes($theme); @include alfresco-material-theme($theme); +$typography: map-get($theme, typography); + body, html { margin: 0; height: 100%; overflow: hidden; - font-size: mat.font-size($alfresco-typography, body-1); - font-family: mat.font-family($alfresco-typography); - line-height: mat.line-height($alfresco-typography, body-1); + font-size: mat.font-size($typography, body-1); + font-family: mat.font-family($typography); + line-height: mat.line-height($typography, body-1); } body { diff --git a/lib/core/src/lib/styles/_index.scss b/lib/core/src/lib/styles/_index.scss index 0ab200456d..4e089f7fd5 100644 --- a/lib/core/src/lib/styles/_index.scss +++ b/lib/core/src/lib/styles/_index.scss @@ -4,7 +4,8 @@ /* stylelint-disable scss/no-global-function-names */ /* stylelint-disable scss/at-import-partial-extension */ @import './default-class'; -@import './theming'; +@import '../styles/colors'; +@import '../styles/mixins'; @import '../form/components/widgets/form.theme'; @import '../clipboard/clipboard.theme'; @import './snackbar.theme'; @@ -21,6 +22,7 @@ $warn: map-get($theme, warn); $accent: map-get($theme, accent); $primary: map-get($theme, primary); + $typography: map-get($theme, typography); // map SCSS variables to expose as CSS variables $defaults: ( @@ -81,20 +83,20 @@ --theme-unselected-chip-bg-color: mat.get-color-from-palette($background, unselected-chip), --theme-status-bar-bg-color: mat.get-color-from-palette($background, status-bar), // fonts - --theme-font-family: mat.font-family($alfresco-typography), - --theme-body-1-font-size: mat.font-size($alfresco-typography, body-1), - --theme-body-2-font-size: mat.font-size($alfresco-typography, body-2), - --theme-body-1-line-height: mat.line-height($alfresco-typography, body-1), - --theme-display-1-font-size: mat.font-size($alfresco-typography, display-1), - --theme-display-3-font-size: mat.font-size($alfresco-typography, display-3), - --theme-display-4-font-size: mat.font-size($alfresco-typography, display-4), - --theme-caption-font-size: mat.font-size($alfresco-typography, caption), - --theme-title-font-size: mat.font-size($alfresco-typography, title), - --theme-subheading-1-font-size: mat.font-size($alfresco-typography, subheading-1), - --theme-subheading-2-font-size: mat.font-size($alfresco-typography, subheading-2), - --theme-button-font-size: mat.font-size($alfresco-typography, button), - --theme-headline-font-size: mat.font-size($alfresco-typography, headline), - --theme-headline-line-height: mat.line-height($alfresco-typography, headline), + --theme-font-family: mat.font-family($typography), + --theme-body-1-font-size: mat.font-size($typography, body-1), + --theme-body-2-font-size: mat.font-size($typography, body-2), + --theme-body-1-line-height: mat.line-height($typography, body-1), + --theme-display-1-font-size: mat.font-size($typography, display-1), + --theme-display-3-font-size: mat.font-size($typography, display-3), + --theme-display-4-font-size: mat.font-size($typography, display-4), + --theme-caption-font-size: mat.font-size($typography, caption), + --theme-title-font-size: mat.font-size($typography, title), + --theme-subheading-1-font-size: mat.font-size($typography, subheading-1), + --theme-subheading-2-font-size: mat.font-size($typography, subheading-2), + --theme-button-font-size: mat.font-size($typography, button), + --theme-headline-font-size: mat.font-size($typography, headline), + --theme-headline-line-height: mat.line-height($typography, headline), --theme-adf-icon-1-font-size: map-get($custom-css-variables, 'theme-adf-icon-1-font-size'), --theme-adf-picture-1-font-size: map-get($custom-css-variables, 'theme-adf-picture-1-font-size'), diff --git a/lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss b/lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss index 6c4adf74d7..34fddc4c59 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-blue-orange.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette($alfresco-ecm-blue); $accent: mat.define-palette($alfresco-accent-orange); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-blue-purple.scss b/lib/core/src/lib/styles/prebuilt/adf-blue-purple.scss index 45dc967cf4..52b17c8a11 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-blue-purple.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-blue-purple.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette(mat.$pink-palette, 700, 500, 900); $accent: mat.define-palette($alfresco-accent-purple); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-cyan-orange.scss b/lib/core/src/lib/styles/prebuilt/adf-cyan-orange.scss index 6bc36a0a3f..61c9f8e902 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-cyan-orange.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-cyan-orange.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette($alfresco-ecm-cyan); $accent: mat.define-palette($alfresco-accent-orange); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-cyan-purple.scss b/lib/core/src/lib/styles/prebuilt/adf-cyan-purple.scss index 9389d1e1fd..d4e2d15a55 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-cyan-purple.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-cyan-purple.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette($alfresco-ecm-cyan); $accent: mat.define-palette($alfresco-accent-purple); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-green-orange.scss b/lib/core/src/lib/styles/prebuilt/adf-green-orange.scss index fd75c8a49d..9bd7163d87 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-green-orange.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-green-orange.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette($alfresco-bpm-green); $accent: mat.define-palette($alfresco-accent-orange); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-green-purple.scss b/lib/core/src/lib/styles/prebuilt/adf-green-purple.scss index 648f3ad600..81e1c0a36d 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-green-purple.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-green-purple.scss @@ -1,7 +1,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette($alfresco-bpm-green); $accent: mat.define-palette($alfresco-accent-purple); @@ -11,7 +11,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-indigo-pink.scss b/lib/core/src/lib/styles/prebuilt/adf-indigo-pink.scss index 4b627f4d02..aaba218265 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-indigo-pink.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-indigo-pink.scss @@ -2,7 +2,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette(mat.$indigo-palette); $accent: mat.define-palette(mat.$pink-palette, A200, A100, A400); @@ -12,7 +12,8 @@ $theme: mat.define-light-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-pink-bluegrey.scss b/lib/core/src/lib/styles/prebuilt/adf-pink-bluegrey.scss index 7a45856f5c..a107e834de 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-pink-bluegrey.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-pink-bluegrey.scss @@ -2,7 +2,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette(mat.$pink-palette, 700, 500, 900); $accent: mat.define-palette(mat.$blue-grey-palette, A200, A100, A400); @@ -12,7 +12,8 @@ $theme: mat.define-dark-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) ); diff --git a/lib/core/src/lib/styles/prebuilt/adf-purple-green.scss b/lib/core/src/lib/styles/prebuilt/adf-purple-green.scss index aa1b89e6cb..eb8d5aa8d7 100644 --- a/lib/core/src/lib/styles/prebuilt/adf-purple-green.scss +++ b/lib/core/src/lib/styles/prebuilt/adf-purple-green.scss @@ -2,7 +2,7 @@ @use '@angular/material' as mat; @import '../theming'; @import './all-theme'; -@include mat.core($alfresco-typography); +@include mat.core; $primary: mat.define-palette(mat.$purple-palette, 700, 500, 800); $accent: mat.define-palette(mat.$green-palette, A200, A100, A400); @@ -12,7 +12,8 @@ $theme: mat.define-dark-theme( color: ( primary: $primary, accent: $accent, - ) + ), + typography: $alfresco-typography ) );