Skip to content

Commit

Permalink
theme: separate image formatting between prose and header image
Browse files Browse the repository at this point in the history
see #857
  • Loading branch information
davidsneighbour committed Apr 16, 2024
1 parent a0ee9cc commit 1e2605f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 5 deletions.
9 changes: 4 additions & 5 deletions assets/scss/04-components/_figure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,22 @@ figure {
}

.post-slider & {

picture,
img,
.iframe-border,
video {
aspect-ratio: 2/1;

}
}

&:hover {
@extend .border-secondary;
}

@extend .border;
@extend .border-1;
// @extend .border;
// @extend .border-1;
@extend .rounded-1;
@extend .border-primary;

// @extend .border-primary;
@extend .position-relative;
}
50 changes: 50 additions & 0 deletions assets/scss/05-prose/_images.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
figure {
@extend .mx-auto;

font-variant: small-caps;
transition: border 8000ms ease-out;

.inline-icons {
div {
@extend .p-2;
}

@extend .text-primary;
@extend .top-0;
@extend .end-0;
@extend .m-3;
@extend .position-absolute;
@extend .lh-1;
}

picture,
img,
.iframe-border,
video {
object-fit: cover;
overflow: hidden;

@extend .rounded-1;
@extend .w-100;
}

.post-slider & {
picture,
img,
.iframe-border,
video {
aspect-ratio: 2/1;
}
}

&:hover {
@extend .border-secondary;
}

// @extend .border;
// @extend .border-1;
@extend .rounded-1;

// @extend .border-primary;
@extend .position-relative;
}
1 change: 1 addition & 0 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
@import "05-prose/prose";
@import "05-prose/footnotes";
@import "05-prose/components";
@import "05-prose/images";
@import "05-prose/tables";
}

Expand Down

0 comments on commit 1e2605f

Please sign in to comment.