Skip to content

Instantly share code, notes, and snippets.

@michventura
Last active October 1, 2021 17:50
Show Gist options
  • Save michventura/5ce1c1d67857b38e70d75f0476edc7fc to your computer and use it in GitHub Desktop.
Save michventura/5ce1c1d67857b38e70d75f0476edc7fc to your computer and use it in GitHub Desktop.
Untitled
:root {
--clr-primary: hsl(250 30% 40%);
--clr-secondary: hsl(190 40% 40%);
--clr-bg: hsl(0 0% 100% / .8);
}
h1 {
color: var(--clr-secondary);
padding-inline-start: 1rem;
}
article {
background: var(--clr-primary);
margin: 1rem;
display: grid;
border-radius: 0.5rem;
}
article h2 {
color: white;
line-height: 1;
padding-inline-start: 0.5rem;
}
article a {
color: var(--clr-primary);
}
article .content {
background: var(--clr-bg);
padding: 0.5rem;
}
article.alt {
--clr-primary: var(--clr-secondary);
}
<h1>Titulo</h1>
<article>
<h2>Subtitulo 1</h2>
<div class="content">
<p>Blog post content with <a href="#">Link</a></p>
</div>
</article>
<article class="alt">
<h2>Subtitulo 2</h2>
<div class="content">
<p>Blog post 2 content with <a href="#">Link</a></p>
</div>
</article>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"110","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment