Skip to content

Commit

Permalink
feat(docs-infra): create module theme files (angular#41129)
Browse files Browse the repository at this point in the history
creates theming files for the module styles in aio; done as part of the effor to make aio themeable

PR Close angular#41129
  • Loading branch information
AleksanderBodurri authored and AndrewKushnir committed May 27, 2021
1 parent ab7e8dc commit 8d9d1c2
Show file tree
Hide file tree
Showing 65 changed files with 1,659 additions and 629 deletions.
16 changes: 8 additions & 8 deletions aio/src/styles/1-layouts/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
LAYOUT STYLES
============================== */

@forward 'content-layout/content-layout';
@forward 'doc-viewer/doc-viewer';
@forward 'footer/footer';
@forward 'layout-global/layout-global';
@forward 'marketing-layout/marketing-layout';
@forward 'not-found/not-found';
@forward 'sidenav/sidenav';
@forward 'top-menu/top-menu';
@forward 'content-layout/content-layout';
@forward 'doc-viewer/doc-viewer';
@forward 'footer/footer';
@forward 'layout-global/layout-global';
@forward 'marketing-layout/marketing-layout';
@forward 'not-found/not-found';
@forward 'sidenav/sidenav';
@forward 'top-menu/top-menu';
67 changes: 0 additions & 67 deletions aio/src/styles/2-modules/_alert.scss

This file was deleted.

31 changes: 0 additions & 31 deletions aio/src/styles/2-modules/_api-symbols.scss

This file was deleted.

57 changes: 0 additions & 57 deletions aio/src/styles/2-modules/_callout.scss

This file was deleted.

7 changes: 0 additions & 7 deletions aio/src/styles/2-modules/_hr.scss

This file was deleted.

58 changes: 29 additions & 29 deletions aio/src/styles/2-modules/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
MODULE STYLES
============================== */

@forward 'alert';
@forward 'api-list';
@forward 'api-pages';
@forward 'api-symbols';
@forward 'buttons';
@forward 'callout';
@forward 'card';
@forward 'cli-pages';
@forward 'code';
@forward 'contribute';
@forward 'contributor';
@forward 'deploy-theme';
@forward 'details';
@forward 'errors';
@forward 'features';
@forward 'filetree';
@forward 'guides';
@forward 'heading-anchors';
@forward 'hr';
@forward 'images';
@forward 'label';
@forward 'notification';
@forward 'progress-bar';
@forward 'presskit';
@forward 'resources';
@forward 'search-results';
@forward 'select-menu';
@forward 'table';
@forward 'toc';
@forward 'alert/alert';
@forward 'api-list/api-list';
@forward 'api-pages/api-pages';
@forward 'api-symbols/api-symbols';
@forward 'buttons/buttons';
@forward 'callout/callout';
@forward 'card/card';
@forward 'cli-pages/cli-pages';
@forward 'code/code';
@forward 'contribute/contribute';
@forward 'contributor/contributor';
@forward 'deploy-theme/deploy-theme';
@forward 'details/details';
@forward 'errors/errors';
@forward 'features/features';
@forward 'filetree/filetree';
@forward 'guides/guides';
@forward 'heading-anchors/heading-anchors';
@forward 'hr/hr';
@forward 'images/images';
@forward 'label/label';
@forward 'notification/notification';
@forward 'progress-bar/progress-bar';
@forward 'presskit/presskit';
@forward 'resources/resources';
@forward 'search-results/search-results';
@forward 'select-menu/select-menu';
@forward 'table/table';
@forward 'toc/toc';
51 changes: 51 additions & 0 deletions aio/src/styles/2-modules/_theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@use 'alert/alert-theme' as *;
@use 'api-list/api-list-theme' as *;
@use 'api-pages/api-pages-theme' as *;
@use 'api-symbols/api-symbols-theme' as *;
@use 'buttons/buttons-theme' as *;
@use 'callout/callout-theme' as *;
@use 'card/card-theme' as *;
@use 'code/code-theme' as *;
@use 'contributor/contributor-theme' as *;
@use 'details/details-theme' as *;
@use 'errors/errors-theme' as *;
@use 'filetree/filetree-theme' as *;
@use 'guides/guides-theme' as *;
@use 'heading-anchors/heading-anchors-theme' as *;
@use 'hr/hr-theme' as *;
@use 'images/images-theme' as *;
@use 'label/label-theme' as *;
@use 'notification/notification-theme' as *;
@use 'presskit/presskit-theme' as *;
@use 'resources/resources-theme' as *;
@use 'search-results/search-results-theme' as *;
@use 'select-menu/select-menu-theme' as *;
@use 'table/table-theme' as *;
@use 'toc/toc-theme' as *;

@mixin module-themes($theme) {
@include alert-theme($theme);
@include api-list-theme($theme);
@include api-symbols-theme($theme);
@include buttons-theme($theme);
@include callout-theme($theme);
@include card-theme($theme);
@include code-theme($theme);
@include contributor-theme($theme);
@include deploy-theme($theme);
@include details-theme($theme);
@include errors-theme($theme);
@include filetree-theme($theme);
@include guides-theme($theme);
@include heading-anchors-theme($theme);
@include hr-theme($theme);
@include images-theme($theme);
@include label-theme($theme);
@include notification-theme($theme);
@include presskit-theme($theme);
@include resources-theme($theme);
@include search-results-theme($theme);
@include select-menu-theme($theme);
@include table-theme($theme);
@include toc-theme($theme);
}
67 changes: 67 additions & 0 deletions aio/src/styles/2-modules/alert/_alert-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@use '../../constants' as *;
@use '~@angular/material/theming' as *;

@mixin alert-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);

.alert {
color: if($is-dark-theme, $offwhite, $darkgray);

&.is-critical {
border-left: 8px solid $brightred;
background-color: if($is-dark-theme, $deepgray, rgba($brightred, 0.05));

h1,
h2,
h3,
h4,
h5,
h6 {
color: $brightred;
}
}

&.is-important {
border-left: 8px solid $orange;
background-color: if($is-dark-theme, $deepgray, rgba($orange, 0.05));

h1,
h2,
h3,
h4,
h5,
h6 {
color: $orange;
}
}

&.is-helpful {
border-left: 8px solid $blue;
background-color: if($is-dark-theme, $deepgray, rgba($blue, 0.05));

h1,
h2,
h3,
h4,
h5,
h6 {
color: $blue;
}
}

&.archive-warning {
background-color: if($is-dark-theme, $deepgray, $darkred);

* {
color: $white;
}

a {
color: $white;
}
}
}
}
Loading

0 comments on commit 8d9d1c2

Please sign in to comment.