2.6.1 base.embedded.img Image
An <img>
element represents an image.
Example
An image that is inline with other text.
Markup: base/embedded/embedded-img.twig
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">p</span>></span>An image <span class="hljs-tag"><<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"kss-assets/sample-inline.png"</span>></span> that is inline with other text.<span class="hljs-tag"></<span class="hljs-name">p</span>></span>
<span class="hljs-tag"><<span class="hljs-name">figure</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 50%; max-width: 300px;"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">figcaption</span>></span>An image inside a figure.<span class="hljs-tag"></<span class="hljs-name">figcaption</span>></span>
<span class="hljs-tag"><<span class="hljs-name">img</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{{modifier_class}}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"kss-assets/sample.png"</span>></span>
<span class="hljs-tag"></<span class="hljs-name">figure</span>></span>
</span>
Source:
base/embedded/_embedded.scss
, line 7