Comments (3)
Hey @kettanaito , that does solve the problem, thanks!
from atomic-layout.
Hey, @ZombieChowder11. Thanks for asking this, I'll try to help.
First that catches my attention is that in your templateTablet
string you have unequal number of areas and columns:
meta actions mex
text hex
/ auto auto auto auto
By specifying 4 columns (/auto auto auto auto
) you need to make sure that your areas (meta, actions, text, hex) fill all those columns. This requirement comes from the CSS Grid spec, and the proper template may look like this:
meta actions mex .
text hex . .
/ auto auto auto auto
I've used a dot (
.
) as a placeholder area in the grid. This means that the associated row/column will not be taken by any areas.
However, from what you've described, using a placeholder isn't what you want. I believe the layout you want can be achieved by repeating the areas you wish to span between columns:
meta meta actions mex
text text text hex
In the template above the
meta
area takes 1 / span 3 columns, leavingactions
andmex
to follow in the 3rd and 4th columns respectively. Thetext
area on the second row takes 1 / span 4 columns, withhex
following in the remaining column.
Repeating an area in a grid-template-areas
is an implicit way to specify its grid-column-start
and grid-column-end
(as well as similar properties for grid-row-*
). This way you don't have to specify start/end explicitly, as well as auto auto ...
for each column.
Here's a sandbox with the solution using the areas from the explanation above.
In case I didn't get the position properly, try to play around with the areas repetition, I'm sure you'll get it as you need. Let me know if this answers your question.
from atomic-layout.
Happy to hear that!
from atomic-layout.
Related Issues (20)
- Add type inference from styled componens HOT 1
- SSR: "useLayoutEffect does nothing on the server" HOT 2
- Support the "order" CSS property
- Responsive props suffixes ignore casing (templateLg = templatelg) HOT 3
- I can't attach a ref to Composition, because Composition does not use React.forwardRef HOT 1
- Rename "useResponsiveComponent" since it's not a hook HOT 2
- Warning: React does not recognize the `A` prop on a DOM element HOT 1
- Add "Area" component HOT 1
- Exported components must have "displayName"
- Rerendering of parent component causes Only to unmount and mount its children HOT 4
- Replace "MediaQuery" component with "useMediaQuery" hook
- Export a utility to compose inline @media queries HOT 2
- Input in a grid item loses focus due to extra parent rerendering HOT 3
- makeResponsive causes memory heap on hot reload
- useResponsiveValue might require to fire an effect for a dependency change HOT 4
- the except prop on the Only component get ignored with a custom breakpoint ref HOT 1
- useResponsiveValue won't use custom breakpoint names HOT 2
- Warning: React does not recognize the `sortingOrder` prop on a DOM element - `DataGrid`
- useResponsiveProps always returns empty object initialy client-side
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomic-layout.