Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(demos): Use demo-* class names for custom styles instead of mdc-* in drawer demo #1779

Closed
wants to merge 1 commit into from
Closed
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
63 changes: 63 additions & 0 deletions demos/drawer/drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,66 @@
@import "../../packages/mdc-drawer/mdc-drawer";
@import "../../packages/mdc-elevation/mdc-elevation";
@import "../../packages/mdc-list/mdc-list";

/* Ensure layout covers the entire screen. */
html {
height: 100%;
}

/* Place drawer and content side by side. */
.demo-body {
display: flex;
padding: 0;
margin: 0;
box-sizing: border-box;
min-height: 100%;
}

/* Stack toolbar and main on top of each other. */
.demo-content {
height: 100%;
box-sizing: border-box;
}

/* Place drawer above toolbar shadow. */
.demo-drawer-above-permanent {
z-index: 2;
}

.demo-main {
padding-left: 16px;
}

.extra-content-wrapper {
padding: 10px;
}

#extra-wide-content {
width: 200vw;
}

#extra-tall-content {
height: 200vh;
}

.demo-body--drawer-above,
.demo-body--drawer-persistent {
flex-direction: row;
width: 100%;
}

.demo-body--drawer-below {
flex-direction: column;
}

.demo-content--drawer-below {
display: flex;
flex: 1 1 auto;
}

.demo-content--drawer-above,
.demo-content--drawer-persistent {
display: inline-flex;
flex-direction: column;
flex-grow: 1;
}
51 changes: 2 additions & 49 deletions demos/drawer/permanent-drawer-above-toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,56 +24,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<style>
/* Ensure layout covers the entire screen. */
html {
height: 100%;
}

/* Place drawer and content side by side. */
.demo-body {
display: flex;
flex-direction: row;
padding: 0;
margin: 0;
box-sizing: border-box;
min-height: 100%;
width: 100%;
}

/* Stack toolbar and main on top of each other. */
.demo-content {
display: inline-flex;
flex-direction: column;
flex-grow: 1;
height: 100%;
box-sizing: border-box;
}

/* Place drawer above toolbar shadow. */
.mdc-permanent-drawer {
z-index: 2;
}

.demo-main {
padding-left: 16px;
}

.extra-content-wrapper {
padding: 10px;
}

#extra-wide-content {
width: 200vw;
}

#extra-tall-content {
height: 200vh;
}
</style>
</head>
<body class="mdc-typography demo-body">
<nav class="mdc-permanent-drawer">
<nav class="mdc-permanent-drawer demo-drawer-above-permanent">
<div class="mdc-permanent-drawer__toolbar-spacer"></div>
<div class="mdc-list-group">
<nav class="mdc-list">
Expand Down Expand Up @@ -106,7 +59,7 @@
</nav>
</div>
</nav>
<div class="demo-content">
<div class="demo-content demo-content--drawer-above">
<!-- TODO: #324 - Should switch to .mdc-toolbar--fixed -->
<header class="mdc-toolbar mdc-elevation--z4">
<div class="mdc-toolbar__row">
Expand Down
44 changes: 2 additions & 42 deletions demos/drawer/permanent-drawer-below-toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,8 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<style>
/* Ensure layout covers the entire screen. */
html {
height: 100%;
}

/* Stack toolbar and content on top of each other. */
.demo-body {
display: flex;
flex-direction: column;
padding: 0;
margin: 0;
box-sizing: border-box;
min-height: 100%;
}

/* Place drawer and main next to each other. */
.demo-content {
display: flex;
flex: 1 1 auto;
height: 100%;
box-sizing: border-box;
}

.demo-main {
padding-left: 16px;
}

.extra-content-wrapper {
padding: 10px;
}

#extra-wide-content {
width: 200vw;
}

#extra-tall-content {
height: 200vh;
}
</style>
</head>
<body class="mdc-typography demo-body">
<body class="mdc-typography demo-body demo-body--drawer-below">
<header class="mdc-toolbar mdc-toolbar--fixed">
<div class="mdc-toolbar__row">
<section class="mdc-toolbar__section mdc-toolbar__section--align-start">
Expand All @@ -77,7 +37,7 @@
</div>
</header>

<div class="demo-content mdc-toolbar-fixed-adjust">
<div class="demo-content demo-content--drawer-below mdc-toolbar-fixed-adjust">
<nav class="mdc-permanent-drawer">
<div class="mdc-list-group">
<nav class="mdc-list">
Expand Down
34 changes: 2 additions & 32 deletions demos/drawer/persistent-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,8 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<style>
/* Ensure layout covers the entire screen. */
html {
height: 100%;
}

/* Place drawer and content side by side. */
.demo-body {
display: flex;
flex-direction: row;
padding: 0;
margin: 0;
box-sizing: border-box;
height: 100%;
width: 100%;
}

/* Stack toolbar and main on top of each other. */
.demo-content {
display: inline-flex;
flex-direction: column;
flex-grow: 1;
height: 100%;
box-sizing: border-box;
}

.demo-main {
padding-left: 16px;
}
</style>
</head>
<body class="mdc-typography demo-body">
<body class="mdc-typography demo-body demo-body--drawer-persistent">
<aside class="mdc-persistent-drawer">
<nav class="mdc-persistent-drawer__drawer">
<div class="mdc-persistent-drawer__toolbar-spacer"></div>
Expand Down Expand Up @@ -91,7 +61,7 @@
</div>
</nav>
</aside>
<div class="demo-content">
<div class="demo-content demo-content--drawer-persistent">
<header class="mdc-toolbar mdc-elevation--z4">
<div class="mdc-toolbar__row">
<section class="mdc-toolbar__section mdc-toolbar__section--align-start">
Expand Down
12 changes: 0 additions & 12 deletions demos/drawer/temporary-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<style>
.demo-body {
padding: 0;
margin: 0;
box-sizing: border-box;
}

.demo-main {
padding-left: 16px;
overflow: auto;
}
</style>
</head>
<body class="mdc-typography demo-body">
<div class="mdc-toolbar mdc-toolbar--fixed">
Expand Down