embed-svg
Version:
Dynamically inline SVG files so they can be customised without bundling
174 lines (149 loc) • 2.47 kB
CSS
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
@media (min-width: 768px) {
body {
padding: 2rem;
}
}
h1 {
font-size: 2em;
line-height: 1.1;
margin-bottom: 1rem;
}
@media (min-width: 768px) {
h1 {
font-size: 2.5em;
margin-bottom: 1.5rem;
}
}
h2 {
font-size: 1.5em;
margin-top: 0;
margin-bottom: 1rem;
color: #646cff;
}
h3 {
color: #888;
font-size: 1.2em;
margin-top: 2rem;
margin-bottom: 0.5rem;
}
#app {
max-width: 1280px;
width: 100%;
margin: 0 auto;
text-align: center;
}
ul {
list-style: none;
padding: 0;
margin: 0;
& li {
margin-bottom: 0.5rem;
}
}
.demo-section {
margin: 2rem auto;
padding: 1rem;
border-radius: 8px;
background-color: rgba(255, 255, 255, 0.05);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) {
.demo-section {
margin-bottom: 3rem;
padding: 1.5rem;
}
}
.example-code {
max-width: 100%;
overflow-x: auto;
}
pre {
background-color: #1a1a1a;
padding: 0.75rem;
border-radius: 4px;
overflow-x: auto;
text-align: left;
font-size: 0.85em;
margin: 1rem 0;
}
@media (min-width: 768px) {
pre {
padding: 1rem;
font-size: 0.9em;
}
}
code {
font-family: 'Courier New', Courier, monospace;
color: #e6e6e6;
}
.styled-svg {
transition: transform 0.3s ease;
}
.styled-svg:hover {
transform: scale(1.1);
}
.svg-container {
display: flex;
justify-content: center;
align-items: center;
margin: 1rem 0;
}
.mobile-svg {
max-width: 100%;
height: auto;
}
@media (min-width: 768px) {
.mobile-svg {
width: auto;
height: auto;
}
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
.demo-section {
background-color: rgba(0, 0, 0, 0.03);
}
pre {
background-color: #f1f1f1;
}
code {
color: #333;
}
h2 {
color: #535bf2;
}
}