Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

docs: better support for dark mode in docs and demos #11381

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions docs/app/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ a {
text-decoration: none;
font-weight: 400;
transition: border-bottom 0.35s;
color: #1e88e5;
}
a:visited {
color: #7e57c2;
}
h1, h2, h3, h4, h5, h6 {
margin-bottom: 1rem;
Expand Down Expand Up @@ -432,10 +436,6 @@ a.docs-logo {
font-size: 24px !important;
font-weight: 400 !important;
}
.md-breadcrumb md-icon {
color: #666 !important;
fill: #666 !important;
}
.md-breadcrumb-page {
display: inline-block;
word-wrap: break-word;
Expand Down Expand Up @@ -799,13 +799,6 @@ docs-demo .doc-demo-content {
margin: 16px;
}
.site-content-toolbar {
background: #f6f6f6 !important;
color: #666 !important;
z-index: 3;
}
.site-content-toolbar {
background: #f6f6f6 !important;
color: #202020 !important;
z-index: 3;
}
.service-desc {
Expand Down Expand Up @@ -889,6 +882,7 @@ table.custom-table {
box-shadow: 0 1px 2px rgba(10, 16, 20, 0.24), 0 0 2px rgba(10, 16, 20, 0.12);
border-radius: 2px;
background: #fafafa;
color: rgba(0,0,0,0.87);
border-spacing: 0;
}
table.custom-table thead > {
Expand Down
5 changes: 5 additions & 0 deletions docs/app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES,
.primaryPalette('yellow')
.dark();

$mdThemingProvider.theme('site-toolbar')
.primaryPalette('grey', {
'default': '100'
});

$mdIconProvider.icon('md-toggle-arrow', 'img/icons/toggle-arrow.svg', 48);
$mdIconProvider
.iconSet('communication', 'img/icons/sets/communication-icons.svg', 24)
Expand Down
2 changes: 1 addition & 1 deletion docs/config/template/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2 class="menu-heading md-subhead" ng-if="section.type === 'heading'" id="headi
</md-sidenav>

<div layout="column" tabIndex="-1" role="main" flex>
<md-toolbar class="md-whiteframe-glow-z1 site-content-toolbar">
<md-toolbar class="md-whiteframe-glow-z1 site-content-toolbar" md-theme="site-toolbar">

<div class="md-toolbar-tools docs-toolbar-tools" tabIndex="-1">
<md-button class="md-icon-button" ng-click="openMenu()" hide-gt-sm aria-label="Toggle Menu">
Expand Down
11 changes: 8 additions & 3 deletions src/components/button/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<div ng-controller="AppCtrl" ng-cloak>
<md-content>

Expand All @@ -9,6 +8,7 @@
<md-button class="md-warn">{{title4}}</md-button>
<div class="label">Flat</div>
</section>
<md-divider></md-divider>

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
<md-button class="md-raised">Button</md-button>
Expand All @@ -17,6 +17,7 @@
<md-button class="md-raised md-warn">Warn</md-button>
<div class="label">Raised</div>
</section>
<md-divider></md-divider>

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
<md-button class="md-fab" aria-label="Eat cake">
Expand Down Expand Up @@ -44,14 +45,17 @@
</md-button>
<div class="label">FAB</div>
</section>
<md-divider></md-divider>

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
<md-button ng-href="{{googleUrl}}" target="_blank">Default Link</md-button>
<md-button class="md-primary" ng-href="{{googleUrl}}" target="_blank">Primary Link</md-button>

<md-button class="md-primary" ng-href="{{googleUrl}}" target="_blank">
Primary Link
</md-button>
<md-button>Default Button</md-button>
<div class="label">Link vs. Button</div>
</section>
<md-divider></md-divider>

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
<md-button class="md-primary md-hue-1">Primary Hue 1</md-button>
Expand All @@ -60,6 +64,7 @@
<md-button class="md-accent md-raised md-hue-1">Accent Hue 1</md-button>
<div class="label">Themed</div>
</section>
<md-divider></md-divider>

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
<md-button class="md-icon-button md-primary" aria-label="Settings">
Expand Down
6 changes: 1 addition & 5 deletions src/components/button/demoBasicUsage/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

angular.module('buttonsDemo1', ['ngMaterial'])

angular.module('buttonsDemoBasic', ['ngMaterial'])
.controller('AppCtrl', function($scope) {
$scope.title1 = 'Button';
$scope.title4 = 'Warn';
$scope.isDisabled = true;

$scope.googleUrl = 'http://google.com';

});
5 changes: 0 additions & 5 deletions src/components/button/demoBasicUsage/style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
section {
background: #f7f7f7;
border-radius: 3px;
text-align: center;
margin: 1em;
position: relative !important;
padding-bottom: 10px;
}
md-content {
margin-right: 7px;
}
section .md-button {
margin-top: 16px;
Expand Down
1 change: 0 additions & 1 deletion src/components/chips/demoCustomInputs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ input[type=number] {
}
.veggie-option .md-item-text {
padding: 8px;
background: #f0f0f0;
border-radius: 3px;
}
.veggie-option .md-item-text h3,
Expand Down
8 changes: 0 additions & 8 deletions src/components/tabs/demoDynamicHeight/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
md-content {
background-color: transparent !important;
md-tabs {
background: #f6f6f6;
border: 1px solid #e1e1e1;
md-tabs-wrapper {
background: white;
}
}
h1:first-child {
margin-top: 0;
}
Expand Down
14 changes: 0 additions & 14 deletions src/components/tabs/demoDynamicTabs/style.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
md-content {
background-color: transparent !important;
md-tabs {
border: 1px solid #e1e1e1;
md-tab-content {
background: #f6f6f6;
}
md-tabs-wrapper {
background: white;
}
}
h1:first-child {
margin-top: 0;
}
Expand All @@ -26,16 +16,12 @@ md-input-container {
.edit-form input {
width: 100%;
}
md-tabs {
border-bottom: 1px solid rgba(0,0,0,0.12);
}
md-tab[disabled] {
opacity: 0.5;
}
label {
text-align: left;
}

.long > input {
width: 264px;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/tabs/demoStaticTabs/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div ng-controller="AppCtrl" ng-cloak>
<md-content class="md-padding">
<md-tabs class="md-accent" md-selected="data.selectedIndex" md-align-tabs="{{data.bottom ? 'bottom' : 'top'}}">
<md-tabs class="md-primary" md-selected="data.selectedIndex"
md-align-tabs="{{data.bottom ? 'bottom' : 'top'}}">
<md-tab id="tab1">
<md-tab-label>Item One</md-tab-label>
<md-tab-body>
Expand Down
5 changes: 2 additions & 3 deletions src/components/tabs/demoStaticTabs/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
md-content {
md-tabs {
border: 1px solid #e1e1e1;
md-tab-content {
padding: 25px;
&:nth-child(1) {
Expand All @@ -23,14 +22,14 @@ md-content {
}
.after-tabs-area {
> span {
margin-top:25px;
margin-top: 25px;
padding-right: 15px;
vertical-align: middle;
line-height: 30px;
height: 35px;
}
> md-checkbox {
margin-top:26px;
margin-top: 26px;
margin-left: 0;
}
}
4 changes: 0 additions & 4 deletions src/components/whiteframe/demoBasicClassUsage/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
md-whiteframe {
background: #fff;
margin: 30px;
height: 100px;
}
Expand All @@ -9,7 +8,6 @@ md-whiteframe {
md-whiteframe {
margin: 7px;
height: 50px;
background-color: #c8e4fa;
}
md-whiteframe > span {
font-size: 0.4em;
Expand All @@ -32,7 +30,6 @@ md-whiteframe {
md-whiteframe {
margin: 20px;
height: 90px;
background-color: #fcddde;
}
md-whiteframe > span {
font-size: 0.9em;
Expand All @@ -44,7 +41,6 @@ md-whiteframe {
md-whiteframe {
margin: 25px;
height: 100px;
background-color: #F2FCE2;
}
md-whiteframe > span {
font-size: 1.0em;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
md-whiteframe, div.padded {
background: #fff;
margin: 30px;
height: 100px;
}
Expand All @@ -9,7 +8,6 @@ md-whiteframe, div.padded {
md-whiteframe, div.padded {
margin: 7px;
height: 50px;
background-color: #c8e4fa;
}
md-whiteframe > span, div.padded > span {
font-size: 0.4em;
Expand All @@ -32,7 +30,6 @@ md-whiteframe, div.padded {
md-whiteframe, div.padded {
margin: 20px;
height: 90px;
background-color: #fcddde;
}
md-whiteframe > span, div.padded > span {
font-size: 0.9em;
Expand All @@ -44,7 +41,6 @@ md-whiteframe, div.padded {
md-whiteframe, div.padded {
margin: 25px;
height: 100px;
background-color: #F2FCE2;
}
md-whiteframe > span, div.padded > span {
font-size: 1.0em;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
md-whiteframe, div.padded {
background: #fff;
height: 100px;
}

Expand All @@ -16,7 +15,6 @@ md-whiteframe:focus, div.padded:focus {
md-whiteframe, div.padded {
margin: 7px;
height: 50px;
background-color: #c8e4fa;
}
md-whiteframe > span, div.padded > span {
font-size: 0.4em;
Expand All @@ -37,7 +35,6 @@ md-whiteframe:focus, div.padded:focus {
@media (min-width: 960px ) and (max-width: 1279px) {
md-whiteframe, div.padded {
height: 90px;
background-color: #fcddde;
}
md-whiteframe > span, div.padded > span {
font-size: 0.9em;
Expand All @@ -48,7 +45,6 @@ md-whiteframe:focus, div.padded:focus {
@media (min-width: 1280px) {
md-whiteframe, div.padded {
height: 100px;
background-color: #F2FCE2;
}
md-whiteframe > span, div.padded > span {
font-size: 1.0em;
Expand Down