satchlj.com/themes/zenn/sass/_components.scss

222 lines
4.6 KiB
SCSS
Raw Normal View History

2019-07-01 21:26:26 +00:00
/**
* Logo banner.
*/
2020-04-23 17:06:55 +00:00
header#banner {
.logo {
display: inline-block;
margin: 0.5em 0;
padding: 0.5em 1em;
overflow: visible;
white-space: nowrap;
text-decoration: none;
user-select: none;
transition: border-color 0.2s ease-in-out,
color 0.2s ease-in-out,
background-color 0.2s ease-in-out;
color: $logo-color;
border: $logo-color solid 0.2em;
font-family: $font-logo;
font-size: 1.2rem;
font-weight: 700;
letter-spacing: 0.075em;
line-height: 1;
text-transform: uppercase;
2020-04-23 19:05:39 +00:00
border-radius: 0;
2020-04-23 17:06:55 +00:00
&:hover {
border-color: $logo-color-hover !important;
color: $logo-color-hover !important;
}
&:active {
border-color: $logo-color-hover !important;
color: $logo-color-hover !important;
background-color: rgba($logo-color-hover, 0.2) !important;
}
2019-07-01 21:26:26 +00:00
}
2020-04-23 17:06:55 +00:00
section.actions {
a.theme-toggle,
a.navbar-toggle {
padding: 0.35em;
width: 1.5em;
height: 1.5em;
svg {
2020-04-23 19:37:51 +00:00
max-width: 1.5em !important;
max-height: 1.5em !important;
2020-04-23 17:06:55 +00:00
}
}
2019-07-01 21:26:26 +00:00
}
}
/**
* HTML elements in pages.
*/
content {
pre {
padding: 0.5em;
overflow: auto;
font-family: $font-mono;
2019-07-01 21:26:26 +00:00
box-sizing: border-box;
background-color: $color-code-bg !important;
2019-07-01 21:26:26 +00:00
border-radius: 4px;
transition: background-color 0.2s ease,
border 0.2s ease;
// Hack to keep code blocks dark, also in light mode
code {
background-color: $color-code-bg !important;
}
2019-07-01 21:26:26 +00:00
}
img, video {
overflow: scroll;
2019-07-01 21:26:26 +00:00
max-width: 100%;
border-radius: 4px;
2019-07-01 21:26:26 +00:00
}
code {
padding: 0 0.25em;
2019-07-01 21:26:26 +00:00
display: inline-block;
font-family: $font-mono;
background-color: $color-main-bg-alt;
border-radius: 4px;
transition: background-color 0.2s ease,
color 0.2s ease;
2019-07-01 21:26:26 +00:00
}
table {
display: block;
overflow: auto;
max-width: 100%;
border: 1px dashed $color-main-border;
border-spacing: 0.5em;
border-collapse: separate;
td {
min-width: 10em;
}
}
iframe {
overflow: auto;
max-width: 100%;
}
blockquote {
border-left: 4px solid $color-main-bg-alt;
margin-left: 0;
margin-right: 0;
padding-left: 1em;
transition: border 0.2s ease;
}
details > summary {
cursor: pointer;
}
2021-09-07 14:42:45 +00:00
kbd.bind > kbd,
kbd:not(.bind) {
background-color: $color-kbd-bg;
border-radius: 3px;
border: 1px solid $color-kbd-border;
box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 lighten($color-kbd-bg, 5%) inset;
color: $color-kbd-color;
display: inline-block;
font-size: .75em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}
#toc-container {
margin-top: 1em;
padding: 1em;
box-sizing: border-box;
background-color: $color-main-bg-alt;
border-radius: 4px;
transition: background-color 0.2s ease,
border 0.2s ease;
h4 {
margin: 0 0 0.5em 0;
}
select#toc-select {
width: 100%;
padding: 0.5em;
color: $color-text;
background: $color-main-bg;
border: 1px solid $color-main-border;
border-radius: 4px;
transition: background-color 0.2s ease,
border-color 0.2s ease,
color 0.2s ease;
}
}
2019-07-01 21:26:26 +00:00
}
/**
* Text style modifiers.
*/
.muted {
color: $color-text-muted;
transition: color 0.2s ease;
2019-07-01 21:26:26 +00:00
}
.meta {
font-family: $font-main;
}
/**
* Tags
*/
.tags {
display: flex;
flex-wrap: wrap;
}
.tag {
2020-04-23 15:02:03 +00:00
background-color: $color-main-bg-alt;
2019-07-01 21:26:26 +00:00
display: inline-block;
border-radius: 3px;
font-family: $font-main;
padding: 0.2em 0.4em;
line-height: 1;
margin: 0 0.2em 0.2em 0;
2021-03-01 16:06:11 +00:00
transition: background-color 0.2s ease;
2019-07-01 21:26:26 +00:00
}
a.tag {
&:focus {
background-color: rgba($color-link, 0.1);
}
&:active {
background-color: rgba($color-link-hover, 0.2);
}
}
/**
* Title anchors
*/
.anchor {
margin-left: 0.1em;
2019-07-01 21:26:26 +00:00
transition: opacity 0.2s ease;
opacity: 0;
}
.anchor::after {
content: '#';
}
2019-07-01 21:26:26 +00:00
*:hover > .anchor,
.anchor:active,
.anchor:focus {
opacity: 1;
}