forked from angular/angular
-
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.
feat(docs-infra): create typography and layout theme files (angular#4…
…1129) creates theming files for the aio typography styles; done as part of the effort to make aio themeable PR Close angular#41129
- Loading branch information
1 parent
d429029
commit ab7e8dc
Showing
20 changed files
with
304 additions
and
115 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@use '../constants' as *; | ||
@use '~@angular/material/theming' as *; | ||
|
||
@mixin typography-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
$is-dark-theme: map-get($theme, is-dark); | ||
|
||
body { | ||
color: if($is-dark-theme, $offwhite, $darkgray); | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
color: if($is-dark-theme, $offwhite, $darkgray); | ||
} | ||
|
||
h6 { | ||
color: if($is-dark-theme, $offwhite, $mediumgray); | ||
} | ||
|
||
p, | ||
ol, | ||
ul, | ||
ol, | ||
li, | ||
input, | ||
a { | ||
color: if($is-dark-theme, $white, $darkgray); | ||
} | ||
|
||
.app-toolbar a { | ||
color: if($is-dark-theme, $darkgray, $white); | ||
} | ||
|
||
code { | ||
color: if($is-dark-theme, $white, $darkgray); | ||
} | ||
|
||
.sidenav-content a { | ||
color: if($is-dark-theme, lighten($blue, 20), $blue); | ||
} | ||
|
||
.error-text { | ||
color: $brightred; | ||
} | ||
} |
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,15 @@ | ||
@use 'footer/footer-theme' as *; | ||
@use 'layout-global/layout-global-theme' as *; | ||
@use 'marketing-layout/marketing-layout-theme' as *; | ||
@use 'not-found/not-found-theme' as *; | ||
@use 'sidenav/sidenav-theme' as *; | ||
@use 'top-menu/top-menu-theme' as *; | ||
|
||
@mixin layout-themes($theme) { | ||
@include footer-theme($theme); | ||
@include layout-global-theme($theme); | ||
@include marketing-layout-theme($theme); | ||
@include not-found-theme($theme); | ||
@include sidenav-theme($theme); | ||
@include top-menu-theme($theme); | ||
} |
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
15 changes: 15 additions & 0 deletions
15
aio/src/styles/1-layouts/layout-global/_layout-global-theme.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@use '../../constants' as *; | ||
@use '~@angular/material/theming' as *; | ||
|
||
@mixin layout-global-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
$is-dark-theme: map-get($theme, is-dark); | ||
|
||
html, | ||
body, | ||
.content { | ||
background: if($is-dark-theme, mat-color($background, background), $white); | ||
} | ||
} |
7 changes: 0 additions & 7 deletions
7
aio/src/styles/1-layouts/_layout-global.scss → ...layouts/layout-global/_layout-global.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@use '../../constants' as *; | ||
@use '~@angular/material/theming' as *; | ||
|
||
@mixin not-found-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
$is-dark-theme: map-get($theme, is-dark); | ||
|
||
.nf-response { | ||
h1 { | ||
color: $blue; | ||
} | ||
} | ||
|
||
.nf-icon.material-icons { | ||
color: $blue; | ||
} | ||
} |
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,44 @@ | ||
@use '../../constants' as *; | ||
@use '~@angular/material/theming' as *; | ||
|
||
@mixin sidenav-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
$is-dark-theme: map-get($theme, is-dark); | ||
|
||
mat-sidenav-container.sidenav-container { | ||
background-color: if($is-dark-theme, mat-color($background, background), $white); | ||
|
||
mat-sidenav.sidenav { | ||
background-color: if($is-dark-theme, $deepgray, $superlightgray); | ||
border-right: 1px solid if($is-dark-theme, $darkgray, $lightgray); | ||
|
||
.doc-version { | ||
border-top: 1px solid if($is-dark-theme, $darkgray, $lightgray); | ||
} | ||
} | ||
} | ||
|
||
aio-nav-menu { | ||
aio-nav-item { | ||
.vertical-menu-item { | ||
color: if($is-dark-theme, $offwhite, $darkgray); | ||
|
||
&:hover { | ||
background-color: if($is-dark-theme, $darkgray, $lightgray); | ||
color: if($is-dark-theme, $powderblue, $blue); | ||
text-shadow: 0 0 5px if($is-dark-theme, $black, $white); | ||
|
||
&.selected { | ||
color: if($is-dark-theme, $powderblue, $darkblue); | ||
} | ||
} | ||
|
||
&.selected { | ||
color: if($is-dark-theme, $lightblue, $darkblue); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.