summaryrefslogtreecommitdiff
path: root/packages/astro/components/image.css
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/components/image.css')
-rw-r--r--packages/astro/components/image.css17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/astro/components/image.css b/packages/astro/components/image.css
new file mode 100644
index 000000000..d748ba7d5
--- /dev/null
+++ b/packages/astro/components/image.css
@@ -0,0 +1,17 @@
+[data-astro-image] {
+ width: 100%;
+ height: auto;
+ object-fit: var(--fit);
+ object-position: var(--pos);
+ aspect-ratio: var(--w) / var(--h);
+}
+/* Styles for responsive layout */
+[data-astro-image='responsive'] {
+ max-width: calc(var(--w) * 1px);
+ max-height: calc(var(--h) * 1px);
+}
+/* Styles for fixed layout */
+[data-astro-image='fixed'] {
+ width: calc(var(--w) * 1px);
+ height: calc(var(--h) * 1px);
+}