Add and use an aspect ratio plugin

This commit is contained in:
Oliver Davies 2020-09-27 19:06:10 +01:00
parent 67a49ecb93
commit a6ce168d97
4 changed files with 15 additions and 3 deletions

View file

@ -19,6 +19,7 @@
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"tailwindcss-aspect-ratio": "^3.0.0",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },
"eslintConfig": { "eslintConfig": {

View file

@ -14,8 +14,7 @@
} }
.embed-responsive { .embed-responsive {
@apply block relative h-0 p-0 overflow-hidden; @apply block relative h-0 overflow-hidden aspect-ratio-16/9
padding-bottom: 56.25%
} }
.embed-responsive .embed-responsive-item, .embed-responsive .embed-responsive-item,

View file

@ -7,6 +7,9 @@ module.exports = {
] ]
}, },
theme: { theme: {
aspectRatio: {
'16/9': [16, 9]
},
colors: { colors: {
black: '#222', black: '#222',
gray: { gray: {
@ -23,7 +26,9 @@ module.exports = {
extend: {}, extend: {},
}, },
variants: {}, variants: {},
plugins: [], plugins: [
require('tailwindcss-aspect-ratio')
],
experimental: { experimental: {
applyComplexClasses: true applyComplexClasses: true
}, },

View file

@ -7726,6 +7726,13 @@ table@^5.2.3:
slice-ansi "^2.1.0" slice-ansi "^2.1.0"
string-width "^3.0.0" string-width "^3.0.0"
tailwindcss-aspect-ratio@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/tailwindcss-aspect-ratio/-/tailwindcss-aspect-ratio-3.0.0.tgz#4f9fc7ca0f3468373290faaa8b92652157bee6a4"
integrity sha512-syVueHOdk0u6S9lFSQQxHwsYS+9AJ0tp1WWBB+vAwmJYzc9g/2OLwq4mHpigYue6t3PUgTSbRi9unQd7WEDjGQ==
dependencies:
lodash "^4.17.15"
tailwindcss@^1.8.5: tailwindcss@^1.8.5:
version "1.8.5" version "1.8.5"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.8.5.tgz#3b4624530b5fd71688fd04d16d8bd8c8d56834de" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.8.5.tgz#3b4624530b5fd71688fd04d16d8bd8c8d56834de"