Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/frjo/hugo-theme-zen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Jonsson <frjo@xdeb.org>2022-09-02 14:02:16 +0300
committerFredrik Jonsson <frjo@xdeb.org>2022-09-02 14:02:16 +0300
commit4d3658251f4e860b5424f2c36f4147a8b36022f1 (patch)
tree30c873dfda57c50aa9edbdaf0b31e6addcedef7a
parent8800bfc2af49873e72b9816069a7293d3453f618 (diff)
Add class left/right/canter support to img shortcode.
-rw-r--r--assets/sass/_zen.scss41
1 files changed, 26 insertions, 15 deletions
diff --git a/assets/sass/_zen.scss b/assets/sass/_zen.scss
index 4168321..095d27e 100644
--- a/assets/sass/_zen.scss
+++ b/assets/sass/_zen.scss
@@ -141,6 +141,32 @@ article {
margin-bottom: .2rem;
}
+figure,
+img {
+ &.image {
+ @include respond-to(s) {
+ &.center {
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ &.left {
+ @include padding(0 .5 .5 0);
+ margin: 0;
+ float: left;
+ clear: both;
+ }
+
+ &.right {
+ @include padding(0 0 .5 .5);
+ margin: 0;
+ float: right;
+ clear: both;
+ }
+ }
+ }
+}
+
figure {
&.image {
figcaption {
@@ -162,28 +188,13 @@ figure {
display: block;
}
- &.center {
- margin-left: auto;
- margin-right: auto;
- }
-
&.left {
- @include padding(0 .5 .5 0);
- margin: 0;
- float: left;
- clear: both;
-
figcaption {
@include padding(0 .5 .5 0);
}
}
&.right {
- @include padding(0 0 .5 .5);
- margin: 0;
- float: right;
- clear: both;
-
figcaption {
@include padding(0 0 .5 .5);
}