-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): theme change functionality added (#239)
- Loading branch information
1 parent
074e97a
commit 433d5fe
Showing
14 changed files
with
122 additions
and
119 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
packages/docs/src/app/components/component-viewer/_component-overview-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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
@mixin mc-component-viewer-theme($theme) { | ||
$second: map-get($theme, second); | ||
$foreground: map-get($theme, foreground); | ||
$text: mc-color($foreground, text); | ||
|
||
.title{ | ||
color: map-get($second, 700); | ||
color: $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
6 changes: 6 additions & 0 deletions
6
packages/docs/src/app/components/main-layout/main-layout-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,6 @@ | ||
@mixin mc-main-layout-theme($theme) { | ||
$background: map-get($theme, background); | ||
$background-color: mc-color($background, background); | ||
|
||
.main { background-color: $background-color; } | ||
} |
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
12 changes: 8 additions & 4 deletions
12
packages/docs/src/app/components/sidenav/_sidenav-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
62 changes: 11 additions & 51 deletions
62
packages/docs/src/app/shared/example-viewer/_example-viewer-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 |
---|---|---|
@@ -1,59 +1,19 @@ | ||
@mixin example-viewer-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
$is-dark: map-get($theme, is-dark); | ||
$color: mc-color($primary); | ||
$color_hover: mc-color($primary, if($is-dark, lighter, darker)); | ||
$divider: mc-color($foreground, divider); | ||
$hint-text: mc-color($foreground, hint-text); | ||
|
||
example-viewer { | ||
.docs-example-viewer-wrapper { | ||
border: 1px solid rgba(mc-color($foreground, secondary-text), 0.03); | ||
box-shadow: 0 2px 2px rgba(0,0,0,0.24), 0 0 2px rgba(0,0,0,0.12); | ||
margin: 4px; | ||
} | ||
|
||
.docs-example-viewer-title { | ||
color: mc-color($foreground, secondary-text); | ||
background: rgba(mc-color($foreground, secondary-text), 0.03); | ||
} | ||
|
||
.docs-example-source-copy { | ||
color: mc-color($foreground, hint-text); | ||
right: 8px; | ||
|
||
[dir='rtl'] & { | ||
right: auto; | ||
left: 8px; | ||
} | ||
} | ||
|
||
.docs-example-source { | ||
border-bottom: 1px solid mc-color($foreground, divider); | ||
overflow: auto; | ||
} | ||
|
||
.docs-example-viewer-body { | ||
border: 1px solid mc-color($foreground, divider); | ||
} | ||
|
||
.docs-example-source_copy { | ||
color: $color; | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
.docs-example-source-shadow { | ||
background: linear-gradient(0deg, rgba($divider,1) 0%, rgba($divider,0.5) 50%, rgba($divider,0) 100%); | ||
} | ||
|
||
&:visited { | ||
color: $color; | ||
} | ||
.docs-example-numbers { | ||
background-color: fade_out($divider, 0.5); | ||
color: $hint-text; | ||
} | ||
|
||
&:hover { | ||
color: $color_hover; | ||
} | ||
.docs-example-source { | ||
background-color: $divider; | ||
|
||
} | ||
} | ||
} |
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
Oops, something went wrong.