rsnext/examples/image-component/styles.module.css
Steven 87301834b3
chore: add light/dark mode theme detection to image component example (#53760)
This PR adds documentation for light/dark mode detection with `next/image`.

In the future, we could also document the picture solution once https://github.com/vercel/next.js/pull/51205 goes stable (although some of the preloading would not be possible).

* x-ref: https://twitter.com/victorbayas/status/1688596439704780822
2023-08-09 14:55:42 +00:00

64 lines
849 B
CSS

.container {
padding: 4rem 1rem;
}
.container p {
margin: 1.5rem 0;
}
.card {
max-width: 60rem;
box-shadow: -10px 10px 80px rgba(255, 255, 255, 0.1);
border: 1px solid #333;
border-radius: 8px;
padding: 2rem;
margin: 0 auto;
}
.inlineCode {
color: #be00ff;
font-size: 16px;
white-space: pre-wrap;
}
.inlineCode::before,
.inlineCode::after {
content: '`';
}
.hr {
border: 0;
border-top: 1px solid #333;
margin: 1.5rem 0;
}
.bgWrap {
position: fixed;
height: 100vh;
width: 100vw;
overflow: hidden;
z-index: -1;
}
.bgText {
margin: 0;
font-size: 2rem;
line-height: 3rem;
text-align: center;
padding-top: 40vh;
text-shadow: 1px 1px 1px #3c5c5e;
}
.imgDark {
display: none;
}
@media (prefers-color-scheme: dark) {
.imgLight {
display: none;
}
.imgDark {
display: unset;
}
}