rmwc
Version:
A thin React wrapper for Material Design (Web) Components
523 lines (434 loc) • 8.7 kB
CSS
html {
background-color: #f2f2f6;
max-width: 100vw;
}
body,
#root {
display: block;
min-height: 100vh;
-webkit-font-smoothing: antialiased;
}
#root > div {
display: flex;
flex-direction: column;
min-height: 100vh;
}
:not(pre) > code[class*='language-'],
pre[class*='language-'] {
tab-size: 2;
background-color: transparent;
border-radius: 0.375rem;
-webkit-overflow-scrolling: touch;
font-size: 0.875rem;
}
body ul li {
margin: 0;
}
.mdc-temporary-drawer__drawer {
will-change: initial;
}
.app__content {
flex: 1 1 auto;
max-width: 100%;
transition: margin-left 0.3s, max-width 0.3s;
will-change: margin-left;
will-change: max-width;
margin-top: 54px;
}
.mdc-persistent-drawer--open + .app__content {
max-width: calc(100% - 15rem);
}
.app__content a {
color: inherit;
}
.app__content > div,
.container {
padding: 1rem;
max-width: 72.5rem;
margin: 0 auto;
display: block;
}
.app__content > div p code,
.app__content > div table code,
.app__content > div ul code {
font-family: source-code-pro, Menlo, Consolas, Monaco, Andale Mono,
Courier New, monospace;
line-height: 1.5;
background-color: rgba(0, 0, 0, 0.05);
padding: 2.4px 8px;
border-radius: 0.125rem;
}
/* page title */
.app__content > div > h1 {
color: var(--mdc-theme-primary);
font-size: 2.125rem;
font-weight: 400;
line-height: 2.5rem;
margin-bottom: 1.875rem;
}
.app__content > div > h1:first-child {
margin-top: 0.5rem;
}
/* version # */
.app__version {
align-self: center;
opacity: 0.87;
}
/* code examples */
.example.render-with-code,
.example.code-only {
border: 0.0625rem solid rgba(0, 0, 0, 0.15);
border-radius: 0.3125rem;
margin: 1.5rem 0;
background-color: white;
}
.app__content > div .example + .example {
margin-top: -0.5rem;
}
.app__content > div .example:last-child {
margin-bottom: 0;
}
.app__content > div .example:not(.render-only) .run {
padding: 1rem;
}
.app__content > div .example .run + .source {
border-top: 0.0625rem solid rgba(0, 0, 0, 0.15);
}
.document-component,
.document-component h2 {
font-size: 14px;
}
.document-component h3 {
margin-top: 24px;
}
.app__content > div > h2,
.app__content > div .document-component h2 {
padding-top: 3rem;
font-size: 1.5rem;
font-weight: 400;
line-height: 2rem;
margin-bottom: 1.875rem;
overflow: hidden;
color: var(--mdc-theme-primary);
}
.app__content > div hr {
border: 0;
border-top: 0.0625rem solid rgba(0, 0, 0, 0.12);
margin: 5rem 0;
}
p,
ul {
line-height: 1.4;
font-size: 0.875rem;
}
.app__content > div blockquote {
opacity: 0.87;
font-size: 1.25rem;
font-weight: 400;
line-height: 2rem;
margin: 0;
margin-bottom: 1.25rem;
max-width: 58.75rem;
}
.app__content > div blockquote p {
font-size: inherit;
}
.app__content > div > h3 {
opacity: 0.87;
font-size: 1.25rem;
font-weight: 400;
line-height: 2rem;
margin-bottom: 1.25rem;
max-width: 58.75rem;
}
.app__top-app-bar {
z-index: 4;
}
.app__top-app-bar .mdc-top-app-bar__title {
color: inherit;
text-decoration: none;
font-weight: bold;
text-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
transition: text-shadow 0.3s;
}
.app__top-app-bar .mdc-top-app-bar__title:hover {
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#main-nav.mdc-drawer--persistent {
position: fixed;
top: 64px;
left: 0;
height: calc(100vh - 64px);
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
#main-nav .mdc-drawer__drawer {
overflow-y: auto;
}
#main-nav .mdc-drawer__content {
padding-bottom: 88px;
}
#main-nav .mdc-list-item:before {
pointer-events: none;
}
#main-nav .mdc-list-item {
box-sizing: border-box;
}
#main-nav a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 0 1rem;
display: flex;
align-items: center;
text-decoration: none;
color: inherit;
}
#main-nav.mdc-drawer--persistent.mdc-drawer--open + .app__content {
margin-left: 240px;
max-width: calc(100% - 240px);
}
ul li {
margin: 0.5rem 0;
}
.demo-content {
display: flex;
flex: 1;
position: relative;
}
/* page home */
#page-home .app__content {
display: flex;
flex-direction: column;
}
#page-home .mdc-layout-grid {
padding: 0;
}
#page-home .app__content header {
text-align: center;
min-height: 40vh;
display: flex;
align-items: center;
position: relative;
padding: 6rem 0;
box-sizing: border-box;
flex: 1;
}
#page-home .app__content header a {
text-decoration: none;
}
#page-home .app__content header:before {
content: '';
background-image: linear-gradient(white, transparent);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.1;
}
#page-home .app__content header .container {
max-width: 720px;
position: relative;
}
#page-home .app__content .intro__inner {
background-color: rgba(0, 0, 0, 0.1);
width: 100%;
margin-top: 0;
font-weight: normal;
}
#page-home .app__content .intro .container {
max-width: 720px;
text-align: center;
}
#page-home .app__content .intro p {
font-weight: normal;
}
#page-home .app__content .mdc-layout-grid__cell {
display: flex;
flex-direction: column;
}
#page-home .app__content .mdc-layout-grid__cell .mdc-card,
#page-home .app__content .mdc-layout-grid__cell a {
flex: 1;
width: 100%;
justify-content: space-between;
text-decoration: none;
display: flex;
}
#page-home .app__content .mdc-layout-grid__cell a {
text-decoration: none;
}
/* page tabs */
#page-tabs .run > .mdc-tab-bar,
#page-tabs .run > .mdc-tab-bar-scroller {
margin-top: 3rem;
margin-bottom: 3rem;
}
/* page icons */
#page-icons .example > div > i,
#page-icons .example > div > img {
margin: 1rem;
vertical-align: middle;
}
/* page buttons */
#page-buttons .example .mdc-button {
margin: 0.5rem;
}
/* page shapes */
#page-shape .example .mdc-shape-container {
margin: 0.5rem;
}
/* page drawers */
#page-drawers .example .run {
overflow: hidden;
}
/* page ripples */
#page-ripples .example .run p {
width: 140px;
height: 140px;
display: flex;
align-items: center;
justify-content: center;
}
/* page elevation */
#page-elevation .example [class*='mdc-elevation--'] {
padding: 1rem;
margin: 1rem;
display: inline-flex;
width: 6rem;
height: 6rem;
vertical-align: top;
align-items: center;
justify-content: center;
border-radius: 0.25rem;
background-color: white;
}
/* page linear-progress */
#page-linear-progress .example .mdc-linear-progress {
margin: 1rem 0;
}
#page-typography .example [class*='mdc-typography--'] {
margin: 1rem 0;
display: block;
}
#page-switches .example .mdc-form-field {
padding: 1rem;
}
#page-fabs .example .mdc-fab {
margin: 1rem;
}
#page-grid-lists .example .mdc-form-field {
padding: 1rem;
}
#page-theme .example [class*='mdc-theme--'] {
padding: 1rem;
margin: 0.25rem;
display: inline-block;
width: 6rem;
height: 6rem;
vertical-align: top;
}
#page-select-menus .example .mdc-select,
#page-select-menus .example .mdc-multi-select {
float: left;
clear: both;
margin: 0.75rem 0;
}
#page-select-menus .run:after {
clear: both;
content: '';
display: table;
}
#page-select-menus .example .mdc-select:after {
content: '';
display: block;
}
#page-toolbars .example .mdc-toolbar {
margin-bottom: 1rem;
}
#page-form-fields .example .mdc-form-field {
display: block;
margin-bottom: 1.5rem;
}
#page-text-fields .run > * {
float: left;
clear: left;
}
#page-text-fields .run .mdc-text-field {
margin-top: 1.5rem;
}
#page-text-fields .run:after {
content: '';
display: table;
clear: both;
}
/**
* Submenu
*/
.submenu__children {
overflow: hidden;
max-height: 0;
transition: max-height 0.3s;
}
.submenu__children--open {
max-height: 25rem;
}
.submenu__icon {
transition: transform 0.3s;
user-select: none;
}
.submenu__icon--open {
transform: rotate(90deg);
}
.submenu__children .mdc-list-item {
text-indent: 1.5rem;
}
/**
* Data Tables
*/
.mdl-data-table__select {
width: 1rem;
}
.mdl-data-table__cell--non-numeric.mdl-data-table__cell--non-numeric {
text-align: left;
}
.mdl-data-table td,
.mdl-data-table th {
text-align: left;
}
.tabledrag-toggle-weight {
float: right;
margin-right: -0.75rem;
}
.header code {
color: rgb(0, 0, 128);
}
table th,
table td {
text-align: left;
padding: 16px;
}
table {
margin-left: -16px;
}
table th {
font-weight: bold;
}
@media (min-width: 37.5rem) {
.app__content {
margin-top: 64px;
}
}
@media (min-width: 48rem) {
.app__content > div {
padding: 1.5rem;
}
}
@media (min-width: 90rem) {
.app__content > div {
padding: 3.75rem 1.5rem;
}
}