![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@savvywombat/tailwindcss-grid-areas
Advanced tools
A plugin to provide TailwindCSS utilities for grid areas.
A plugin to provide TailwindCSS utilities for grid areas.
The latest release of this plugin (version 1.1 onwards) will work with TailwindCSS versions 1 and 2.
# npm
npm install --save-dev @savvywombat/tailwindcss-grid-areas
# yarn
yarn add --dev @savvywombat/tailwindcss-grid-areas
Require the plugin into your tailwindcss.config.js
file, and define your template areas:
// tailwindcss.config.js
module.exports = {
theme: {
gridTemplateAreas: {
'layout': [
'header header header',
'. main .',
'footer footer footer',
],
},
},
plugins: [
require('@savvywombat/tailwindcss-grid-areas')
]
}
This will generate the following utilities (in addition to the default):
grid-areas-layout
grid-in-header
grid-in-main
grid-in-footer
col-start-header
col-start-main
col-start-footer
col-end-header
col-end-main
col-end-footer
row-start-header
row-start-main
row-start-footer
row-end-header
row-end-main
row-end-footer
Just as with CSS, gridTemplateAreas
works with the core gridTemplateColumns
and gridTemplateRows
plugins to allow you to control the heights and widths of the grid cells:
// tailwindcss.config.js
module.exports = {
theme: {
gridTemplateAreas: {
'layout': [
'header header header',
'nav main .',
'footer footer footer',
],
},
gridTemplateColumns: {
'layout': '24rem 1fr 2rem',
},
gridTemplateRows: {
'layout': '4rem 1fr auto',
},
},
plugins: [
require('@savvywombat/tailwindcss-grid-areas')
],
variants: {
gridTemplateAreas: ['responsive']
}
}
<body class="grid grid-areas-layout grid-cols-layout grid-rows-layout h-full">
<header class="grid-in-header"></header>
<nav class="grid-in-nav"></nav>
<main class="grid-in-main"></main>
<footer class="grid-in-footer"></footer>
</body>
// tailwindcss.config.js
module.exports = {
theme: {
gridTemplateAreas: {
'wide': [
'header header header',
'. main .',
'footer footer footer',
],
'slim': [
'header',
'main',
'footer',
],
},
},
plugins: [
require('@savvywombat/tailwindcss-grid-areas')
],
variants: {
gridTemplateAreas: ['responsive']
}
}
Configuring variants for gridTemplateAreas
will generate variants for the grid-areas-*
utility.
This allows you to modify the grid topology for responsive layouts:
<div class="grid grid-areas-slim md:grid-areas-wide"></div>
The other utilities will not generate variants, since it is better to modify the template areas instead since the column/row start/end lines will adapt to suit.
A plugin to provide TailwindCSS utilities for named grid lines.
FAQs
A plugin to provide Tailwind CSS utilities for grid areas.
We found that @savvywombat/tailwindcss-grid-areas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.