X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=assets%2Fmain%2Fsass%2Fcomponents%2F_section.scss;fp=assets%2Fmain%2Fsass%2Fcomponents%2F_section.scss;h=0f5d96d1bbc81c8ce07120655df5cc6481a5e565;hb=8af2079e4b096e77ba2f922d6a18224ce01cb7bd;hp=0000000000000000000000000000000000000000;hpb=d047bc8b5126c4af647c4e508022ca94452fc856;p=editorial.git diff --git a/assets/main/sass/components/_section.scss b/assets/main/sass/components/_section.scss new file mode 100644 index 0000000..0f5d96d --- /dev/null +++ b/assets/main/sass/components/_section.scss @@ -0,0 +1,112 @@ +/// +/// Massively by HTML5 UP +/// html5up.net | @ajlkn +/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +/// + +/* Section/Article */ + + section, article { + &.special { + text-align: center; + } + } + + header { + cursor: default; + + > .date { + display: block; + font-size: 0.8rem; + height: 1; + margin: 0 0 (_size(element-margin) * 0.5) 0; + position: relative; + } + + > p { + font-style: italic; + } + + > h1 + p { + font-size: 1.1rem; + margin-top: -0.5rem; + line-height: 2; + } + + > h2 + p { + font-size: 1rem; + margin-top: -0.75rem; + } + + > h3 + p { + font-size: 0.9rem; + margin-top: -0.75rem; + } + + > h4 + p { + font-size: 0.8rem; + margin-top: -0.75rem; + } + + &.major { + margin: 0 0 (_size(element-margin) * 2) 0; + text-align: center; + + > :last-child { + margin-bottom: 0; + } + + > p { + margin-top: 0; + text-align: center; + } + + > .date { + font-size: 1rem; + margin: 0 0 (_size(element-margin) * 2) 0; + + &:before, &:after { + content: ''; + display: block; + position: absolute; + top: 50%; + width: calc(50% - 6rem); + border-top: solid 2px; + } + + &:before { + left: 0; + } + + &:after { + right: 0; + } + } + } + + @include breakpoint('<=medium') { + br { + display: none; + } + } + + @include breakpoint('<=small') { + &.major { + margin: 0 0 _size(element-margin) 0; + } + } + } + + @mixin color-section($p: null) { + header { + &.major { + .date { + &:before, &:after { + border-top-color: _palette($p, border); + } + } + } + } + } + + @include color-section; \ No newline at end of file