block and graphic block text styles
This commit is contained in:
parent
a658b5291e
commit
d7517c13c9
7 changed files with 57 additions and 29 deletions
|
|
@ -35,14 +35,10 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '../../scss/mixins';
|
@import '../../scss/mixins';
|
||||||
|
|
||||||
div.article-block {
|
.article-block {
|
||||||
max-width: var(--normal-column-width, 660px);
|
max-width: var(--normal-column-width, 660px);
|
||||||
margin-left: auto;
|
@include fmx-auto;
|
||||||
margin-right: auto;
|
@include fmy-5;
|
||||||
margin-top: 0;
|
|
||||||
&:not(:last-child) {
|
|
||||||
margin-bottom: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.narrower {
|
&.narrower {
|
||||||
max-width: var(--narrower-column-width, 330px);
|
max-width: var(--narrower-column-width, 330px);
|
||||||
|
|
|
||||||
|
|
@ -136,23 +136,16 @@
|
||||||
<style lang="scss" global>
|
<style lang="scss" global>
|
||||||
@import '../../scss/mixins';
|
@import '../../scss/mixins';
|
||||||
|
|
||||||
div.article-block.graphic {
|
.article-block.graphic {
|
||||||
|
// Dek
|
||||||
p {
|
p {
|
||||||
@include font-note;
|
@include body-note;
|
||||||
@include text-sm;
|
|
||||||
@include text-primary;
|
|
||||||
&:last-of-type {
|
|
||||||
@include fmb-1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Notes text...
|
// Caption and Sources
|
||||||
aside {
|
aside {
|
||||||
|
@include fmt-2;
|
||||||
p {
|
p {
|
||||||
@include font-note;
|
@include body-caption;
|
||||||
@include text-secondary;
|
|
||||||
@include text-xs;
|
|
||||||
@include leading-tight;
|
|
||||||
margin-block-end: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<style lang="scss" global>
|
<style lang="scss" global>
|
||||||
@import '../../scss/mixins';
|
@import '../../scss/mixins';
|
||||||
|
|
||||||
div.article-block.notes {
|
.article-block.notes {
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,7 @@
|
||||||
</div>
|
</div>
|
||||||
<aside class="article-metadata mt-2 font-subhed">
|
<aside class="article-metadata mt-2 font-subhed">
|
||||||
<div class="byline-container">
|
<div class="byline-container">
|
||||||
<div
|
<div class="byline body-caption !font-bold">
|
||||||
class="byline text-xs text-primary font-bold leading-tighter fmb-1"
|
|
||||||
>
|
|
||||||
By
|
By
|
||||||
{#if authors.length > 0}
|
{#if authors.length > 0}
|
||||||
{#each authors as author, i}
|
{#each authors as author, i}
|
||||||
|
|
@ -137,9 +135,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="dateline-container fmt-0 body-caption">
|
||||||
class="dateline-container fmt-0 text-secondary text-xs leading-tighter"
|
|
||||||
>
|
|
||||||
{#if isValidDate(publishTime)}
|
{#if isValidDate(publishTime)}
|
||||||
<div>
|
<div>
|
||||||
Published
|
Published
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,4 @@
|
||||||
@forward 'vertical-align';
|
@forward 'vertical-align';
|
||||||
@forward 'white-space';
|
@forward 'white-space';
|
||||||
@forward 'word-break';
|
@forward 'word-break';
|
||||||
|
@forward 'text-role';
|
||||||
|
|
|
||||||
33
src/scss/tokens/text/_text-role.scss
Normal file
33
src/scss/tokens/text/_text-role.scss
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
@use 'mixins/text-role' as *;
|
||||||
|
|
||||||
|
.h1 {
|
||||||
|
@include h1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h2 {
|
||||||
|
@include h2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h3 {
|
||||||
|
@include h3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h4 {
|
||||||
|
@include h4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-text {
|
||||||
|
@include body-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-note {
|
||||||
|
@include body-note;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-caption {
|
||||||
|
@include body-caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-link {
|
||||||
|
@include body-link;
|
||||||
|
}
|
||||||
|
|
@ -61,15 +61,24 @@
|
||||||
|
|
||||||
@mixin body-note {
|
@mixin body-note {
|
||||||
@include fmt-0;
|
@include fmt-0;
|
||||||
@include fmb-1;
|
@include fmb-2;
|
||||||
@include fmx-0;
|
@include fmx-0;
|
||||||
@include font-note;
|
@include font-note;
|
||||||
@include text-base;
|
font-size: calc(0.95 * var(--theme-font-size-base));
|
||||||
@include font-light;
|
@include font-light;
|
||||||
@include text-primary;
|
@include text-primary;
|
||||||
@include leading-tight;
|
@include leading-tight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin body-caption {
|
||||||
|
@include font-note;
|
||||||
|
@include text-secondary;
|
||||||
|
@include text-xs;
|
||||||
|
@include leading-tighter;
|
||||||
|
@include font-regular;
|
||||||
|
@include fmb-1;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin body-link {
|
@mixin body-link {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue