hugo-geekdoc/src/sass/_shortcodes.scss

146 lines
2.6 KiB
SCSS
Raw Normal View History

2020-01-12 14:33:02 +00:00
// {{< expand "Label" "icon" >}}
.gdoc-expand {
margin-top: $padding-16;
margin-bottom: $padding-16;
2021-04-27 21:44:35 +00:00
border: $border-1 solid var(--accent-color);
2020-01-12 14:33:02 +00:00
border-radius: $border-radius;
overflow: hidden;
&__head {
2021-04-27 21:44:35 +00:00
background: var(--accent-color-lite);
2020-01-12 14:33:02 +00:00
padding: $padding-8 $padding-16;
cursor: pointer;
}
&__content {
display: none;
padding: $padding-16;
}
&__control:checked + &__content {
display: block;
}
2020-05-31 16:20:39 +00:00
.gdoc-page__anchor {
display: none;
}
2020-01-12 14:33:02 +00:00
}
// {{< tabs >}}
.gdoc-tabs {
margin-top: $padding-16;
margin-bottom: $padding-16;
2021-04-27 21:44:35 +00:00
border: $border-1 solid var(--accent-color);
2020-01-12 14:33:02 +00:00
border-radius: $border-radius;
overflow: hidden;
display: flex;
flex-wrap: wrap;
&__label {
display: inline-block;
padding: $padding-8 $padding-16;
border-bottom: $border-1 transparent;
2020-01-12 14:33:02 +00:00
cursor: pointer;
}
&__content {
order: 999; //Move content blocks to the end
width: 100%;
2021-04-27 21:44:35 +00:00
border-top: $border-1 solid var(--accent-color-lite);
2020-01-12 14:33:02 +00:00
padding: $padding-16;
display: none;
}
&__control:checked + &__label {
2021-04-27 21:44:35 +00:00
border-bottom: $border-2 solid var(--link-color);
2020-01-12 14:33:02 +00:00
}
&__control:checked + &__label + &__content {
display: block;
}
.gdoc-page__anchor {
display: none;
}
2020-01-12 14:33:02 +00:00
}
// {{< columns >}}
.gdoc-columns {
margin-left: -$padding-16;
margin-right: -$padding-16;
&__content {
margin: $padding-16 0;
min-width: $body-min-width * 0.66;
padding: 0 $padding-16;
}
2020-02-26 22:59:30 +00:00
.gdoc-page__anchor {
display: none;
}
2020-01-12 14:33:02 +00:00
}
// {{< button >}}
2020-02-04 23:41:13 +00:00
.gdoc-button {
$root: &;
2020-01-12 14:33:02 +00:00
display: inline-block;
2021-04-27 21:44:35 +00:00
background: var(--accent-color-lite);
border: $border-1 solid var(--accent-color);
2020-01-12 14:33:02 +00:00
border-radius: $border-radius;
2020-02-04 23:41:13 +00:00
margin: $padding-8 0;
2020-01-12 14:33:02 +00:00
cursor: pointer;
2020-02-04 23:41:13 +00:00
&__link {
display: inline-block;
color: inherit !important;
text-decoration: none !important;
}
2020-01-12 14:33:02 +00:00
&:hover {
2021-04-27 21:44:35 +00:00
background: var(--button-background);
border-color: var(--button-border-color);
2020-01-12 14:33:02 +00:00
color: $gray-100;
}
&--regular {
font-size: $font-size-base;
#{$root}__link {
padding: $padding-4 $padding-8;
}
}
&--large {
font-size: $font-size-20;
#{$root}__link {
padding: $padding-8 $padding-16;
}
}
2020-01-12 14:33:02 +00:00
}
// {{< hint >}}
.gdoc-hint {
@each $name, $color in $hint-colors {
&.#{$name} {
border-left-color: $color;
2021-04-27 21:44:35 +00:00
background-color: scale-color($color, $lightness: 95%, $saturation: -30%);
color: $body-font-color;
2020-01-12 14:33:02 +00:00
}
}
.gdoc-page__anchor {
display: none;
}
2020-01-12 14:33:02 +00:00
}
2020-06-02 19:22:10 +00:00
// {{< mermaid >}}
.gdoc-mermaid {
font-family: "Liberation Sans", sans-serif;
}