Skip to content
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
5 changes: 3 additions & 2 deletions demo/components/expressive-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ExpressiveComponent extends LitElement {
css`
md-card {
width: 300px;
max-width: 100%;
background: var(--md-sys-color-surface);
overflow: hidden;
}
Expand Down Expand Up @@ -130,7 +131,7 @@ class ExpressiveComponent extends LitElement {
</div>
</form>

<div class="flex g20 aic">
<div class="flexw g20 aic">
<md-switch
value="something"
@change=${(e) => console.log('Switch changed', e.target.selected, e.target.value)}></md-switch>
Expand Down Expand Up @@ -161,7 +162,7 @@ class ExpressiveComponent extends LitElement {
>
</div>

<div class="flex g12 aic">
<div class="flexw g12 aic">
<md-icon-button>
<md-icon>search</md-icon>
</md-icon-button>
Expand Down
11 changes: 11 additions & 0 deletions demo/components/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { css } from 'lit'

export const styles = css`
*,
*::before,
*::after {
box-sizing: border-box;
}
:host {
display: block;
width: 100%;
min-width: 0;
max-width: 100%;
}
.circle {
border-radius: 50%;
}
Expand Down
44 changes: 44 additions & 0 deletions demo/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
@import url(light.css);
@import url(dark.css) (prefers-color-scheme: dark);

*,
*::before,
*::after {
box-sizing: border-box;
}

html,
body {
margin: 0;
overflow-x: hidden;
}

:root {
Expand All @@ -19,6 +26,8 @@ body {
a {
color: var(--md-sys-color-primary);
text-decoration: none;
overflow-wrap: break-word;
word-break: break-word;
}

a:hover {
Expand All @@ -37,6 +46,10 @@ a:hover {
.gte-medium {
display: none;
}

md-snackbar {
--md-snackbar-bottom: 96px;
}
}

@media (width >=600px) {
Expand Down Expand Up @@ -70,13 +83,44 @@ a:hover {
}
}

.layout-container {
width: 100%;
min-width: 0;
}

.content-container {
flex: 1;
min-width: 0;
width: 100%;
max-width: 100%;
}

.search-container {
max-width: 1200px;
width: 100%;
margin: 0 auto;
padding: 0 1rem;
}

.main {
margin: 0 auto;
max-width: 1200px;
width: 100%;
min-width: 0;
padding: 1rem;
/* overflow-y: auto; */
}

.main > .flex.col {
width: 100%;
min-width: 0;
}

md-carousel {
max-width: 100%;
min-width: 0;
}

.circle {
border-radius: 50%;
}
Expand Down
10 changes: 10 additions & 0 deletions demo/date-picker-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
font-weight: 500;
color: var(--md-sys-color-primary, #6750a4);
}

@media (max-width: 600px) {
body {
padding: 16px 12px;
}
.demo-section {
padding: 16px 12px;
border-radius: 16px;
}
}
</style>
</head>
<body>
Expand Down
8 changes: 4 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</script>

<!-- layout is: { left nav rail/drawer, { header, content } } -->
<div class="flex g12">
<div class="flex g12 layout-container">
<!-- left nav -->
<div class="gte-medium">
<div class="flex g4" style="position: sticky; top: 0; overflow-y: auto; height: 100vh">
Expand Down Expand Up @@ -103,7 +103,7 @@
</div>
</div>

<div class="flex col g8 mt8">
<div class="flex col g8 mt8 content-container">
<!-- top nav -->
<!--
<md-app-bar id="appBar">
Expand All @@ -118,7 +118,7 @@
</div>
</md-app-bar>
-->
<div>
<div class="search-container">
<md-search></md-search>
</div>

Expand Down Expand Up @@ -213,7 +213,7 @@ <h3>Loading Indicator (M3 Expressive)</h3>
<md-loading size="64" contained></md-loading>
</div>

<div class="flex aic" style="justify-content: space-between; align-items: center">
<div class="flex aic" style="justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px">
<h3 style="margin: 0">Carousel (M3 Multi-Browse)</h3>
<a
href="./carousel-demo.html"
Expand Down
10 changes: 10 additions & 0 deletions demo/time-picker-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
font-weight: 500;
color: var(--md-sys-color-primary, #6750a4);
}

@media (max-width: 600px) {
body {
padding: 16px 12px;
}
.demo-section {
padding: 16px 12px;
border-radius: 16px;
}
}
</style>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions snackbar/snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SnackBar extends LitElement {
position: fixed;
z-index: 1000;
left: 50%;
bottom: 30px;
bottom: var(--md-snackbar-bottom, 30px);
height: 48px;
}

Expand Down Expand Up @@ -75,14 +75,14 @@ class SnackBar extends LitElement {
opacity: 0;
}
to {
bottom: 30px;
bottom: var(--md-snackbar-bottom, 30px);
opacity: 1;
}
}

@keyframes fadeout {
from {
bottom: 30px;
bottom: var(--md-snackbar-bottom, 30px);
opacity: 1;
}
to {
Expand Down
Loading