Sha256: 3b0d4b1982e4f4bce30ad2e0d3a53250d0f2623f5b7a47258df5d16f688d2605
Contents?: true
Size: 672 Bytes
Versions: 21
Compression:
Stored size: 672 Bytes
Contents
const plugin = require("tailwindcss/plugin"); // Safari 14-compatible aspect ratio module.exports = plugin(function ({ matchUtilities, theme }) { matchUtilities( { aspect: (value) => ({ "@supports (aspect-ratio: 1 / 1)": { aspectRatio: value, }, "@supports not (aspect-ratio: 1 / 1)": { "&::before": { content: '""', float: "left", paddingTop: `calc(100% / (${value}))`, }, "&::after": { clear: "left", content: '""', display: "block", }, }, }), }, { values: theme("aspectRatio") } ); });
Version data entries
21 entries across 21 versions & 1 rubygems