[jss-expand] Add optional syntax for CSS grids templateAreas
See original GitHub issueCSS grid template areas’ ascii-layout is “special” and would probably benefit from being documented.
The best way I’ve come up with to get it working involves back-tick and single quotes.
templateAreas: `
'head head head'
'left panel right'
'foot foot foot'`
An alternative that might be supported (and might lend itself to better dynamics) is using an array syntax:
templateAreas: [
'head head head',
'left panel right',
'foot foot foot']
- document current syntax
- add a nicer syntax to jss-expand
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Grid template areas - CSS: Cascading Style Sheets | MDN
When you use CSS Grid Layout you always have lines, and this can be a ... This method involves placing our items using...
Read more >grid-template-areas | CSS-Tricks
The grid-template-areas CSS property allows you to define and name the cells (or “areas”) in a CSS grid container.
Read more >Understanding CSS Grid: Grid Template Areas
The grid-template-areas property accepts one or more strings as a value. Each string (enclosed in quotes) represents a row of your grid. You...
Read more >CSS grid-template-areas Property - W3docs
Yes. Items are animatable. Version, CSS Grid Layout Module Level 1. DOM Syntax, object.style.gridTemplateAreas = ''item1 item1 . .
Read more >CSS grid-template-areas property - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, there is just no better syntax than this yet:
Okay, thanks for the information.
I’m new to React. If I were to want to use
template-areas
with a JSS component, I’d have to use it itsstyle
prop, right? Just making sure I know a workaround until this is implemented.