@carrotsearch/gatsby-transformer-html
Version:
A Gatsby transformer plugin for authoring content in HTML. Supports ToC generation, responsive images, section anchors and HighlightJS code highlighting.
26 lines (23 loc) • 589 B
JavaScript
import React from "react";
export function onRenderBody({ setHeadComponents }) {
setHeadComponents([
<style type="text/css" key="gatsby-remark-images-styles">
{`img.fluid {
width: 100%;
height: 100%;
margin: 0;
vertical-align: middle;
position: absolute;
top: 0;
left: 0;
color: transparent;
}
span.fluid.preview {
display: block;
position: relative;
bottom: 0; left: 0;
background-size: cover;
}`}
</style>
]);
}