From f92d3fbce63133840d0e5caeadf57ae325ad1ed1 Mon Sep 17 00:00:00 2001 From: Fabiano Alencar Date: Fri, 24 Aug 2018 12:29:18 -0300 Subject: [PATCH] Added align image and text with gutenberg. --- src/assets/scss/_post.scss | 40 +++++++++++++++++++++++++++ src/assets/scss/bootstrap_custom.scss | 1 + 2 files changed, 41 insertions(+) diff --git a/src/assets/scss/_post.scss b/src/assets/scss/_post.scss index 750067c..541acce 100644 --- a/src/assets/scss/_post.scss +++ b/src/assets/scss/_post.scss @@ -52,6 +52,32 @@ img[class*="align"], img[class*="wp-image-"], img[class*="attachment-"] { height: auto; } + h1, h2, h3, h4, h5, h6 { + padding-top: .4rem; + &::after{ + display: block; + clear: both; + content: ""; + } + } + .alignleft { + float:left; + margin: 0 1em 1em 0; + } + .alignright { + float:right; + margin: 0 0 1em 1em; + } + @media only screen and (max-width: 576px) { + .alignleft, .alignright { + float: none; + text-align: center; + margin: 0; + img { + width: 275px; + } + } + } img { padding: 6px; max-width: calc( 100% - 14px ); @@ -108,6 +134,9 @@ border: 1px solid black; padding: 5px; } + figure { + margin: 16px 40px; + } .wp-block-cover-image{ width: 99.5vw; position: relative; @@ -127,17 +156,28 @@ .wp-block-gallery{ .blocks-gallery-item{ figure{ + margin: 0 !important; figcaption{ padding: 10px 10px 5px; background: #fff; color: #000; } } + img { + height: 100% !important; + } } @media (max-width: 768px){ padding-left: 0; } } + .wp-block-image { + &.is-resized { + img { + max-width: none !important; + } + } + } .wp-block-pullquote{ border-top: 1px solid #cbcbcb; border-bottom: 1px solid #cbcbcb; diff --git a/src/assets/scss/bootstrap_custom.scss b/src/assets/scss/bootstrap_custom.scss index 6879228..ffab63b 100644 --- a/src/assets/scss/bootstrap_custom.scss +++ b/src/assets/scss/bootstrap_custom.scss @@ -32,4 +32,5 @@ $theme-colors: ( ); $font-family-base: 'Roboto'; $headings-font-family: 'Roboto'; +$headings-font-weight: 400; @import "../vendor/bootstrap/scss/bootstrap"; \ No newline at end of file