🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🕵️ SicherheitslückenMicrosoft-Patchday: 966 Schwachstellen, davon 105 kritisch - BornCity(13.09.2026 um 06:31 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11: Microsoft entfernt WMIC-Tool gegen Ransomware - ad-hoc-news.de(14.09.2026 um 07:58 Uhr)
🕵️ SicherheitslückenMicrosoft schließt Rekordzahl an Sicherheitslücken - techbook(14.09.2026 um 09:00 Uhr)
🪟 Windows TippsGoogle Gemini: Neue Windows-App holt die KI aus dem Browser(14.09.2026 um 06:00 Uhr)
🕵️ SicherheitslückenCVE-2026-85125 | YAMAP up to 17.1.0 WebView access control (EUVD-2026-77253)(14.09.2026 um 10:41 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🕵️ SicherheitslückenMicrosoft-Patchday: 966 Schwachstellen, davon 105 kritisch - BornCity(13.09.2026 um 06:31 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11: Microsoft entfernt WMIC-Tool gegen Ransomware - ad-hoc-news.de(14.09.2026 um 07:58 Uhr)
🕵️ SicherheitslückenMicrosoft schließt Rekordzahl an Sicherheitslücken - techbook(14.09.2026 um 09:00 Uhr)
🪟 Windows TippsGoogle Gemini: Neue Windows-App holt die KI aus dem Browser(14.09.2026 um 06:00 Uhr)
🕵️ SicherheitslückenCVE-2026-85125 | YAMAP up to 17.1.0 WebView access control (EUVD-2026-77253)(14.09.2026 um 10:41 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 2 Min Lesezeit
0

Subgrid

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Introduction



When children of a grid container become grid containers themselves, they don't take track sizing from their parent.



Let's say we want our cards to have two columns with this CSS rule:




CODE
grid-template-columns: minmax(5ch, 20ch) 1fr;









Without subgrid










With subgrid








We can see that without subgrid, each card defines its' columns independently, while with subgrid, the parent defines the child's columns.







How to use subgrid



Here is the simple example of using subgrid:







Let's start with defining html structure:




CODE
<div class="grid">
<div class="subgrid">
<div class="grandchild"></div>
</div>
</div>






We have to set display: grid for the main container and its' child:




CODE
.grid {
display: grid;
}

.subgrid {
display: grid;
}






And now it's time to define track sizing:




CODE
.grid {
grid-template-columns: repeat(8, 1fr);
}

.subgrid {
grid-column: 2 / -1;
grid-template-columns: subgrid;
}







Here, track sizing of the child is inherited from the parent by setting its' own grid-template-columns to subgrid.




So, how to position the grandchild so it will occupy the cell in the third column of the grandparent?




CODE
.grandchild {
grid-column: 2 / 3;
}







Since the child has its' own count, the second column of the child will be the third one of the parent.


Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
You might want to watch what you say.
1 Quelle
A beast by any other name.
1 Quelle
Multiple VLC Media Player Vulnerabilities Allow Attackers to Corrupt or Read Heap Memory
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Subgrid

Thematisch verwandte Begriffe: Subgrid · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...