Skip to content

Instantly share code, notes, and snippets.

@xdesro
Created June 5, 2019 16:02
Show Gist options
  • Save xdesro/4ccf5f5e95320ebd9334f9e992aff852 to your computer and use it in GitHub Desktop.
Save xdesro/4ccf5f5e95320ebd9334f9e992aff852 to your computer and use it in GitHub Desktop.
CodePen posts custom styling to fit ~my brand~
@import url("https://rsms.me/inter/inter.css");
$color--primary: #030303;
$color--accent: #FF0080;
$color--background: #fefefe;
@mixin inter {
font-family: "Inter", sans-serif;
@supports (font-variation-settings: normal) {
font-family: "Inter var", sans-serif;
}
}
@mixin border-button {
@include inter;
background-color: transparent;
border: 2px solid $color--primary;
color: $color--primary;
border-radius: 0;
&:hover, &:active, &:focus {
background-color: $color--primary;
color: $color--background;
svg {
fill: $color--background;
}
}
}
article.post {
@include inter;
background: $color--background;
.post-title {
@include inter;
font-weight: 900;
}
.blog-post {
background: $color--background;
}
.post-content {
background: $color--background;
}
}
.post-header {
color: $color--primary;
background: $color--background;
.date-block {
@include border-button;
}
.big-hearter {
border-radius: 0;
background-color: $color--accent;
border: 2px solid $color--accent;
&:hover {
background-color: transparent;
svg {
fill: $color--accent;
}
}
}
.content-author {
border-bottom-color: $color--primary;
.author-link {
color: $color--primary;
}
}
}
.follow-user-button {
@include border-button;
text-transform: uppercase;
font-weight: 730 !important;
}
.post-body {
font-size: 18px;
letter-spacing: -0.01em;
color: $color--primary;
h2,
h3,
h4 {
@include inter;
font-weight: 730;
}
h4 {
letter-spacing: 0.1em;
}
a {
color: inherit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment